From eaff118938aa9333199454974a61c091a7ce6d66 Mon Sep 17 00:00:00 2001 From: winrid Date: Wed, 28 Oct 2026 09:24:12 -0700 Subject: [PATCH] Release v3.1.0: polls, webhooks, batch jobs, page migrations, comment translations --- README.md | 12 +- client/.openapi-generator/FILES | 177 + client/README.md | 86 +- client/api/openapi.yaml | 4506 +++- client/build.gradle | 2 +- client/build.sbt | 2 +- client/docs/APIAuditLog.md | 4 + client/docs/APIBatchJob.md | 22 + .../APIBatchJobPageMigrationResultsInner.md | 19 + client/docs/APITenant.md | 1 + client/docs/BillingInfo.md | 1 + client/docs/CommentData.md | 3 +- client/docs/CommentLogData.md | 4 + client/docs/CommentLogType.md | 20 + client/docs/CommentPoll.md | 19 + client/docs/CommentPollInput.md | 17 + client/docs/CommentPollOption.md | 15 + client/docs/CommentPollOptionInput.md | 14 + client/docs/CommentPollPatch.md | 17 + client/docs/CommentPollPatchOptionsInner.md | 14 + client/docs/CommentPollPutInput.md | 17 + client/docs/CommentTranslation.md | 17 + client/docs/CommentTranslationMode.md | 15 + client/docs/CommentTranslationPublic.md | 14 + client/docs/CommentTranslationsRequest.md | 13 + client/docs/CommentTranslationsResponse.md | 16 + client/docs/CreateAgentTenantBody.md | 15 + client/docs/CreateAgentTenantResponse.md | 19 + client/docs/CreateCommentParams.md | 3 +- client/docs/CreatePollVoteBody.md | 17 + client/docs/CreatePollVoteResponse.md | 15 + client/docs/CreateQuestionConfigBody.md | 5 +- client/docs/CreateQuestionResultBody.md | 3 +- client/docs/CreateTenantBody.md | 1 - client/docs/CreateWebhookParams.md | 16 + client/docs/CreateWebhookResponse.md | 14 + client/docs/CustomConfigParameters.md | 5 + client/docs/DefaultApi.md | 2897 ++- client/docs/DeletePollVoteResponse.md | 14 + client/docs/EventLogEntry.md | 1 + client/docs/FComment.md | 3 + client/docs/GetBatchJobAPIResponse.md | 16 + client/docs/GetBatchJobsAPIResponse.md | 16 + client/docs/GetMeResponse.md | 20 + client/docs/GetPageLikesAPIResponse.md | 17 + client/docs/GetPageReactsAPIResponse.md | 17 + client/docs/GetPollResponse.md | 14 + client/docs/GetPollVoteResponse.md | 14 + client/docs/GetPollVotesResponse.md | 14 + client/docs/GetTranslationsResponse.md | 1 + client/docs/GetV1PageLikes.md | 1 + client/docs/GetV2PageReacts.md | 1 + .../docs/GetWebhookSamplePayloadsResponse.md | 14 + client/docs/GetWebhooksResponse.md | 14 + client/docs/ImportedSiteType.md | 2 + client/docs/LiveEvent.md | 2 + client/docs/LiveEventType.md | 2 + client/docs/MeAuthType.md | 13 + client/docs/MigrateAPIPagesData.md | 13 + client/docs/NotificationSkipReason.md | 41 + client/docs/NotificationType.md | 4 + client/docs/OAuthScope.md | 13 + client/docs/PageCustomReactUser.md | 17 + client/docs/PageMigration.md | 15 + client/docs/PageMigrationFailure.md | 18 + client/docs/PageMigrationSuccess.md | 17 + client/docs/PageMigrationType.md | 13 + client/docs/PageMigrationUndoCounts.md | 15 + client/docs/PageReactIncludeUserInfo.md | 13 + client/docs/PageReactUser.md | 16 + ...ommentPollOptionsOrTotalVotesOrClosesAt.md | 16 + client/docs/PollCreationMode.md | 15 + client/docs/PollPrivacy.md | 15 + client/docs/PollVotingMode.md | 13 + client/docs/PubSubComment.md | 1 + client/docs/PubSubCommentBase.md | 1 + client/docs/PublicApi.md | 129 +- client/docs/PublicComment.md | 1 + client/docs/PublicPollVote.md | 21 + client/docs/PublicWebhook.md | 34 + client/docs/QuestionCondition.md | 15 + client/docs/QuestionConditionOperator.md | 25 + client/docs/QuestionConfig.md | 7 +- client/docs/QuestionResult.md | 3 +- .../docs/QueuePageMigrationJobAPIResponse.md | 16 + ...dStringStringOrNumberOrNumberArrayValue.md | 12 + client/docs/SavePollResponse.md | 14 + client/docs/SubQuestionCondition.md | 15 + client/docs/TenantPackage.md | 1 + client/docs/UpdateQuestionConfigBody.md | 5 +- client/docs/UpdateQuestionResultBody.md | 1 + client/docs/UpdateTenantBody.md | 1 - client/docs/WebhookComment.md | 41 + client/docs/WebhookEventName.md | 15 + client/docs/WebhookHTTPMethod.md | 15 + client/docs/WebhookSource.md | 13 + client/pom.xml | 2 +- .../java/com/fastcomments/api/DefaultApi.java | 10607 +++++++--- .../java/com/fastcomments/api/PublicApi.java | 611 +- .../com/fastcomments/invoker/ApiClient.java | 2 +- .../fastcomments/invoker/Configuration.java | 2 +- .../java/com/fastcomments/invoker/JSON.java | 46 + .../com/fastcomments/model/APIAuditLog.java | 122 +- .../com/fastcomments/model/APIBatchJob.java | 564 + .../APIBatchJobPageMigrationResultsInner.java | 269 + .../com/fastcomments/model/APITenant.java | 30 +- .../com/fastcomments/model/BillingInfo.java | 35 +- .../com/fastcomments/model/CommentData.java | 47 +- .../fastcomments/model/CommentLogData.java | 121 +- .../fastcomments/model/CommentLogType.java | 22 +- .../com/fastcomments/model/CommentPoll.java | 366 + .../fastcomments/model/CommentPollInput.java | 332 + .../fastcomments/model/CommentPollOption.java | 264 + .../model/CommentPollOptionInput.java | 238 + .../fastcomments/model/CommentPollPatch.java | 334 + .../model/CommentPollPatchOptionsInner.java | 319 + .../model/CommentPollPutInput.java | 337 + .../model/CommentTranslation.java | 323 + .../model/CommentTranslationMode.java | 80 + .../model/CommentTranslationPublic.java | 238 + .../model/CommentTranslationsRequest.java | 222 + .../model/CommentTranslationsResponse.java | 317 + .../model/CreateAgentTenantBody.java | 271 + .../model/CreateAgentTenantResponse.java | 383 + .../model/CreateCommentParams.java | 47 +- .../model/CreatePollVoteBody.java | 325 + .../model/CreatePollVoteResponse.java | 267 + .../model/CreateQuestionConfigBody.java | 115 +- .../model/CreateQuestionResultBody.java | 54 +- .../fastcomments/model/CreateTenantBody.java | 33 +- .../model/CreateWebhookParams.java | 298 + .../model/CreateWebhookResponse.java | 238 + .../model/CustomConfigParameters.java | 151 +- .../model/DeletePollVoteResponse.java | 238 + .../com/fastcomments/model/EventLogEntry.java | 35 +- .../java/com/fastcomments/model/FComment.java | 101 +- .../model/GetBatchJobAPIResponse.java | 379 + .../model/GetBatchJobsAPIResponse.java | 399 + .../com/fastcomments/model/GetMeResponse.java | 426 + .../model/GetPageLikesAPIResponse.java | 425 + .../model/GetPageReactsAPIResponse.java | 435 + .../fastcomments/model/GetPollResponse.java | 238 + .../model/GetPollVoteResponse.java | 238 + .../model/GetPollVotesResponse.java | 256 + .../model/GetTranslationsResponse.java | 37 +- .../fastcomments/model/GetV1PageLikes.java | 57 +- .../fastcomments/model/GetV2PageReacts.java | 55 +- .../GetWebhookSamplePayloadsResponse.java | 256 + .../model/GetWebhooksResponse.java | 256 + .../fastcomments/model/ImportedSiteType.java | 4 +- .../com/fastcomments/model/LiveEvent.java | 64 +- .../com/fastcomments/model/LiveEventType.java | 4 +- .../com/fastcomments/model/MeAuthType.java | 78 + .../model/MigrateAPIPagesData.java | 308 + .../model/NotificationSkipReason.java | 106 + .../fastcomments/model/NotificationType.java | 6 +- .../com/fastcomments/model/OAuthScope.java | 78 + .../model/PageCustomReactUser.java | 406 + .../com/fastcomments/model/PageMigration.java | 267 + .../model/PageMigrationFailure.java | 354 + .../model/PageMigrationSuccess.java | 322 + .../fastcomments/model/PageMigrationType.java | 78 + .../model/PageMigrationUndoCounts.java | 258 + .../model/PageReactIncludeUserInfo.java | 78 + .../com/fastcomments/model/PageReactUser.java | 377 + ...mentPollOptionsOrTotalVotesOrClosesAt.java | 361 + .../fastcomments/model/PollCreationMode.java | 80 + .../com/fastcomments/model/PollPrivacy.java | 80 + .../fastcomments/model/PollVotingMode.java | 78 + .../com/fastcomments/model/PubSubComment.java | 35 +- .../fastcomments/model/PubSubCommentBase.java | 35 +- .../com/fastcomments/model/PublicComment.java | 42 +- .../fastcomments/model/PublicPollVote.java | 407 + .../com/fastcomments/model/PublicWebhook.java | 596 + .../fastcomments/model/QuestionCondition.java | 235 + .../model/QuestionConditionOperator.java | 90 + .../fastcomments/model/QuestionConfig.java | 117 +- .../fastcomments/model/QuestionResult.java | 44 +- .../QueuePageMigrationJobAPIResponse.java | 377 + ...tringStringOrNumberOrNumberArrayValue.java | 336 + .../fastcomments/model/SavePollResponse.java | 238 + .../model/SubQuestionCondition.java | 264 + .../com/fastcomments/model/TenantPackage.java | 30 +- .../model/UpdateQuestionConfigBody.java | 115 +- .../model/UpdateQuestionResultBody.java | 42 +- .../fastcomments/model/UpdateTenantBody.java | 33 +- .../fastcomments/model/WebhookComment.java | 1014 + .../fastcomments/model/WebhookEventName.java | 80 + .../fastcomments/model/WebhookHTTPMethod.java | 80 + .../com/fastcomments/model/WebhookSource.java | 78 + .../com/fastcomments/api/DefaultApiTest.java | 350 +- .../com/fastcomments/api/PublicApiTest.java | 46 + .../fastcomments/model/APIAuditLogTest.java | 32 + ...BatchJobPageMigrationResultsInnerTest.java | 100 + .../fastcomments/model/APIBatchJobTest.java | 125 + .../com/fastcomments/model/APITenantTest.java | 8 + .../fastcomments/model/BillingInfoTest.java | 8 + .../fastcomments/model/CommentDataTest.java | 11 +- .../model/CommentLogDataTest.java | 33 + .../model/CommentPollInputTest.java | 82 + .../model/CommentPollOptionInputTest.java | 56 + .../model/CommentPollOptionTest.java | 64 + .../CommentPollPatchOptionsInnerTest.java | 56 + .../model/CommentPollPatchTest.java | 83 + .../model/CommentPollPutInputTest.java | 83 + .../fastcomments/model/CommentPollTest.java | 93 + .../model/CommentTranslationModeTest.java | 32 + .../model/CommentTranslationPublicTest.java | 56 + .../model/CommentTranslationTest.java | 81 + .../model/CommentTranslationsRequestTest.java | 50 + .../CommentTranslationsResponseTest.java | 78 + .../model/CreateAgentTenantBodyTest.java | 66 + .../model/CreateAgentTenantResponseTest.java | 97 + .../model/CreateCommentParamsTest.java | 11 +- .../model/CreatePollVoteBodyTest.java | 80 + .../model/CreatePollVoteResponseTest.java | 67 + .../model/CreateQuestionConfigBodyTest.java | 26 + .../model/CreateQuestionResultBodyTest.java | 8 + .../model/CreateTenantBodyTest.java | 8 - .../model/CreateWebhookParamsTest.java | 74 + .../model/CreateWebhookResponseTest.java | 58 + .../model/CustomConfigParametersTest.java | 43 + .../model/DeletePollVoteResponseTest.java | 58 + .../fastcomments/model/EventLogEntryTest.java | 8 + .../com/fastcomments/model/FCommentTest.java | 28 + .../model/GetBatchJobAPIResponseTest.java | 73 + .../model/GetBatchJobsAPIResponseTest.java | 75 + .../fastcomments/model/GetMeResponseTest.java | 109 + .../model/GetPageLikesAPIResponseTest.java | 83 + .../model/GetPageReactsAPIResponseTest.java | 85 + .../model/GetPollResponseTest.java | 58 + .../model/GetPollVoteResponseTest.java | 58 + .../model/GetPollVotesResponseTest.java | 60 + .../model/GetTranslationsResponseTest.java | 8 + .../model/GetV1PageLikesTest.java | 11 + .../model/GetV2PageReactsTest.java | 9 + .../GetWebhookSamplePayloadsResponseTest.java | 60 + .../model/GetWebhooksResponseTest.java | 60 + .../com/fastcomments/model/LiveEventTest.java | 17 + .../fastcomments/model/MeAuthTypeTest.java | 32 + .../model/MigrateAPIPagesDataTest.java | 51 + .../model/NotificationSkipReasonTest.java | 32 + .../fastcomments/model/OAuthScopeTest.java | 32 + .../model/PageCustomReactUserTest.java | 80 + .../model/PageMigrationFailureTest.java | 90 + .../model/PageMigrationSuccessTest.java | 82 + .../fastcomments/model/PageMigrationTest.java | 65 + .../model/PageMigrationTypeTest.java | 32 + .../model/PageMigrationUndoCountsTest.java | 64 + .../model/PageReactIncludeUserInfoTest.java | 32 + .../fastcomments/model/PageReactUserTest.java | 72 + ...PollOptionsOrTotalVotesOrClosesAtTest.java | 68 + .../model/PollCreationModeTest.java | 32 + .../fastcomments/model/PollPrivacyTest.java | 32 + .../model/PollVotingModeTest.java | 32 + .../model/PubSubCommentBaseTest.java | 9 + .../fastcomments/model/PubSubCommentTest.java | 9 + .../fastcomments/model/PublicCommentTest.java | 8 + .../model/PublicPollVoteTest.java | 105 + .../fastcomments/model/PublicWebhookTest.java | 148 + .../model/QuestionConditionOperatorTest.java | 32 + .../model/QuestionConditionTest.java | 57 + .../model/QuestionConfigTest.java | 26 + .../model/QuestionResultTest.java | 8 + .../QueuePageMigrationJobAPIResponseTest.java | 72 + ...gStringOrNumberOrNumberArrayValueTest.java | 34 + .../model/SavePollResponseTest.java | 58 + .../model/SubQuestionConditionTest.java | 65 + .../fastcomments/model/TenantPackageTest.java | 8 + .../model/UpdateQuestionConfigBodyTest.java | 26 + .../model/UpdateQuestionResultBodyTest.java | 8 + .../model/UpdateTenantBodyTest.java | 8 - .../model/WebhookCommentTest.java | 275 + .../model/WebhookEventNameTest.java | 32 + .../model/WebhookHTTPMethodTest.java | 32 + .../fastcomments/model/WebhookSourceTest.java | 32 + config.json | 2 +- openapi.json | 16912 +++++++++------- pubsub/README.md | 4 +- 279 files changed, 48070 insertions(+), 12084 deletions(-) create mode 100644 client/docs/APIBatchJob.md create mode 100644 client/docs/APIBatchJobPageMigrationResultsInner.md create mode 100644 client/docs/CommentPoll.md create mode 100644 client/docs/CommentPollInput.md create mode 100644 client/docs/CommentPollOption.md create mode 100644 client/docs/CommentPollOptionInput.md create mode 100644 client/docs/CommentPollPatch.md create mode 100644 client/docs/CommentPollPatchOptionsInner.md create mode 100644 client/docs/CommentPollPutInput.md create mode 100644 client/docs/CommentTranslation.md create mode 100644 client/docs/CommentTranslationMode.md create mode 100644 client/docs/CommentTranslationPublic.md create mode 100644 client/docs/CommentTranslationsRequest.md create mode 100644 client/docs/CommentTranslationsResponse.md create mode 100644 client/docs/CreateAgentTenantBody.md create mode 100644 client/docs/CreateAgentTenantResponse.md create mode 100644 client/docs/CreatePollVoteBody.md create mode 100644 client/docs/CreatePollVoteResponse.md create mode 100644 client/docs/CreateWebhookParams.md create mode 100644 client/docs/CreateWebhookResponse.md create mode 100644 client/docs/DeletePollVoteResponse.md create mode 100644 client/docs/GetBatchJobAPIResponse.md create mode 100644 client/docs/GetBatchJobsAPIResponse.md create mode 100644 client/docs/GetMeResponse.md create mode 100644 client/docs/GetPageLikesAPIResponse.md create mode 100644 client/docs/GetPageReactsAPIResponse.md create mode 100644 client/docs/GetPollResponse.md create mode 100644 client/docs/GetPollVoteResponse.md create mode 100644 client/docs/GetPollVotesResponse.md create mode 100644 client/docs/GetWebhookSamplePayloadsResponse.md create mode 100644 client/docs/GetWebhooksResponse.md create mode 100644 client/docs/MeAuthType.md create mode 100644 client/docs/MigrateAPIPagesData.md create mode 100644 client/docs/NotificationSkipReason.md create mode 100644 client/docs/OAuthScope.md create mode 100644 client/docs/PageCustomReactUser.md create mode 100644 client/docs/PageMigration.md create mode 100644 client/docs/PageMigrationFailure.md create mode 100644 client/docs/PageMigrationSuccess.md create mode 100644 client/docs/PageMigrationType.md create mode 100644 client/docs/PageMigrationUndoCounts.md create mode 100644 client/docs/PageReactIncludeUserInfo.md create mode 100644 client/docs/PageReactUser.md create mode 100644 client/docs/PickCommentPollOptionsOrTotalVotesOrClosesAt.md create mode 100644 client/docs/PollCreationMode.md create mode 100644 client/docs/PollPrivacy.md create mode 100644 client/docs/PollVotingMode.md create mode 100644 client/docs/PublicPollVote.md create mode 100644 client/docs/PublicWebhook.md create mode 100644 client/docs/QuestionCondition.md create mode 100644 client/docs/QuestionConditionOperator.md create mode 100644 client/docs/QueuePageMigrationJobAPIResponse.md create mode 100644 client/docs/RecordStringStringOrNumberOrNumberArrayValue.md create mode 100644 client/docs/SavePollResponse.md create mode 100644 client/docs/SubQuestionCondition.md create mode 100644 client/docs/WebhookComment.md create mode 100644 client/docs/WebhookEventName.md create mode 100644 client/docs/WebhookHTTPMethod.md create mode 100644 client/docs/WebhookSource.md create mode 100644 client/src/main/java/com/fastcomments/model/APIBatchJob.java create mode 100644 client/src/main/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInner.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentPoll.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentPollInput.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentPollOption.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentPollOptionInput.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentPollPatch.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentPollPatchOptionsInner.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentPollPutInput.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentTranslation.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentTranslationMode.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentTranslationPublic.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentTranslationsRequest.java create mode 100644 client/src/main/java/com/fastcomments/model/CommentTranslationsResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/CreateAgentTenantBody.java create mode 100644 client/src/main/java/com/fastcomments/model/CreateAgentTenantResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/CreatePollVoteBody.java create mode 100644 client/src/main/java/com/fastcomments/model/CreatePollVoteResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/CreateWebhookParams.java create mode 100644 client/src/main/java/com/fastcomments/model/CreateWebhookResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/DeletePollVoteResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetBatchJobAPIResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetBatchJobsAPIResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetMeResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetPageLikesAPIResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetPageReactsAPIResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetPollResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetPollVoteResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetPollVotesResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetWebhookSamplePayloadsResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/GetWebhooksResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/MeAuthType.java create mode 100644 client/src/main/java/com/fastcomments/model/MigrateAPIPagesData.java create mode 100644 client/src/main/java/com/fastcomments/model/NotificationSkipReason.java create mode 100644 client/src/main/java/com/fastcomments/model/OAuthScope.java create mode 100644 client/src/main/java/com/fastcomments/model/PageCustomReactUser.java create mode 100644 client/src/main/java/com/fastcomments/model/PageMigration.java create mode 100644 client/src/main/java/com/fastcomments/model/PageMigrationFailure.java create mode 100644 client/src/main/java/com/fastcomments/model/PageMigrationSuccess.java create mode 100644 client/src/main/java/com/fastcomments/model/PageMigrationType.java create mode 100644 client/src/main/java/com/fastcomments/model/PageMigrationUndoCounts.java create mode 100644 client/src/main/java/com/fastcomments/model/PageReactIncludeUserInfo.java create mode 100644 client/src/main/java/com/fastcomments/model/PageReactUser.java create mode 100644 client/src/main/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAt.java create mode 100644 client/src/main/java/com/fastcomments/model/PollCreationMode.java create mode 100644 client/src/main/java/com/fastcomments/model/PollPrivacy.java create mode 100644 client/src/main/java/com/fastcomments/model/PollVotingMode.java create mode 100644 client/src/main/java/com/fastcomments/model/PublicPollVote.java create mode 100644 client/src/main/java/com/fastcomments/model/PublicWebhook.java create mode 100644 client/src/main/java/com/fastcomments/model/QuestionCondition.java create mode 100644 client/src/main/java/com/fastcomments/model/QuestionConditionOperator.java create mode 100644 client/src/main/java/com/fastcomments/model/QueuePageMigrationJobAPIResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValue.java create mode 100644 client/src/main/java/com/fastcomments/model/SavePollResponse.java create mode 100644 client/src/main/java/com/fastcomments/model/SubQuestionCondition.java create mode 100644 client/src/main/java/com/fastcomments/model/WebhookComment.java create mode 100644 client/src/main/java/com/fastcomments/model/WebhookEventName.java create mode 100644 client/src/main/java/com/fastcomments/model/WebhookHTTPMethod.java create mode 100644 client/src/main/java/com/fastcomments/model/WebhookSource.java create mode 100644 client/src/test/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInnerTest.java create mode 100644 client/src/test/java/com/fastcomments/model/APIBatchJobTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentPollInputTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentPollOptionInputTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentPollOptionTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentPollPatchOptionsInnerTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentPollPatchTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentPollPutInputTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentPollTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentTranslationModeTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentTranslationPublicTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentTranslationTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentTranslationsRequestTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CommentTranslationsResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CreateAgentTenantBodyTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CreateAgentTenantResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CreatePollVoteBodyTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CreatePollVoteResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CreateWebhookParamsTest.java create mode 100644 client/src/test/java/com/fastcomments/model/CreateWebhookResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/DeletePollVoteResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetBatchJobAPIResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetBatchJobsAPIResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetMeResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetPageLikesAPIResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetPageReactsAPIResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetPollResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetPollVoteResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetPollVotesResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetWebhookSamplePayloadsResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/GetWebhooksResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/MeAuthTypeTest.java create mode 100644 client/src/test/java/com/fastcomments/model/MigrateAPIPagesDataTest.java create mode 100644 client/src/test/java/com/fastcomments/model/NotificationSkipReasonTest.java create mode 100644 client/src/test/java/com/fastcomments/model/OAuthScopeTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PageCustomReactUserTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PageMigrationFailureTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PageMigrationSuccessTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PageMigrationTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PageMigrationTypeTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PageMigrationUndoCountsTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PageReactIncludeUserInfoTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PageReactUserTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAtTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PollCreationModeTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PollPrivacyTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PollVotingModeTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PublicPollVoteTest.java create mode 100644 client/src/test/java/com/fastcomments/model/PublicWebhookTest.java create mode 100644 client/src/test/java/com/fastcomments/model/QuestionConditionOperatorTest.java create mode 100644 client/src/test/java/com/fastcomments/model/QuestionConditionTest.java create mode 100644 client/src/test/java/com/fastcomments/model/QueuePageMigrationJobAPIResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValueTest.java create mode 100644 client/src/test/java/com/fastcomments/model/SavePollResponseTest.java create mode 100644 client/src/test/java/com/fastcomments/model/SubQuestionConditionTest.java create mode 100644 client/src/test/java/com/fastcomments/model/WebhookCommentTest.java create mode 100644 client/src/test/java/com/fastcomments/model/WebhookEventNameTest.java create mode 100644 client/src/test/java/com/fastcomments/model/WebhookHTTPMethodTest.java create mode 100644 client/src/test/java/com/fastcomments/model/WebhookSourceTest.java diff --git a/README.md b/README.md index 431c77ab..d3bea8d1 100644 --- a/README.md +++ b/README.md @@ -25,21 +25,21 @@ Then add the dependencies you need: com.fastcomments client - 3.0.1 + 3.1.0 com.fastcomments core - 3.0.1 + 3.1.0 com.fastcomments pubsub - 3.0.1 + 3.1.0 ``` @@ -58,13 +58,13 @@ repositories { dependencies { // API Client - implementation "com.fastcomments:client:3.0.1" + implementation "com.fastcomments:client:3.1.0" // Core Library (includes SSO) - implementation "com.fastcomments:core:3.0.1" + implementation "com.fastcomments:core:3.1.0" // PubSub Library (for live events) - implementation "com.fastcomments:pubsub:3.0.1" + implementation "com.fastcomments:pubsub:3.1.0" } ``` diff --git a/client/.openapi-generator/FILES b/client/.openapi-generator/FILES index 947bc5b4..0b97f8a7 100644 --- a/client/.openapi-generator/FILES +++ b/client/.openapi-generator/FILES @@ -10,6 +10,8 @@ docs/APIBanUserChangeLog.md docs/APIBanUserChangedValues.md docs/APIBannedUser.md docs/APIBannedUserWithMultiMatchInfo.md +docs/APIBatchJob.md +docs/APIBatchJobPageMigrationResultsInner.md docs/APIComment.md docs/APICommentBase.md docs/APICommentBaseMeta.md @@ -86,10 +88,22 @@ docs/CommentHTMLRenderingMode.md docs/CommentLogData.md docs/CommentLogEntry.md docs/CommentLogType.md +docs/CommentPoll.md +docs/CommentPollInput.md +docs/CommentPollOption.md +docs/CommentPollOptionInput.md +docs/CommentPollPatch.md +docs/CommentPollPatchOptionsInner.md +docs/CommentPollPutInput.md docs/CommentQuestionResultsRenderingType.md docs/CommentQuestionsRequired.md docs/CommentTextUpdateRequest.md docs/CommentThreadDeletionMode.md +docs/CommentTranslation.md +docs/CommentTranslationMode.md +docs/CommentTranslationPublic.md +docs/CommentTranslationsRequest.md +docs/CommentTranslationsResponse.md docs/CommentUserBadgeInfo.md docs/CommentUserHashTagInfo.md docs/CommentUserMentionInfo.md @@ -98,6 +112,8 @@ docs/CommentsByIdsParams.md docs/CreateAPIPageData.md docs/CreateAPISSOUserData.md docs/CreateAPIUserSubscriptionData.md +docs/CreateAgentTenantBody.md +docs/CreateAgentTenantResponse.md docs/CreateCommentParams.md docs/CreateEmailTemplateBody.md docs/CreateEmailTemplateResponse.md @@ -108,6 +124,8 @@ docs/CreateHashTagBody.md docs/CreateHashTagResponse.md docs/CreateModeratorBody.md docs/CreateModeratorResponse.md +docs/CreatePollVoteBody.md +docs/CreatePollVoteResponse.md docs/CreateQuestionConfigBody.md docs/CreateQuestionConfigResponse.md docs/CreateQuestionResultBody.md @@ -123,6 +141,8 @@ docs/CreateTicketBody.md docs/CreateTicketResponse.md docs/CreateUserBadgeParams.md docs/CreateV1PageReact.md +docs/CreateWebhookParams.md +docs/CreateWebhookResponse.md docs/CustomConfigParameters.md docs/CustomEmailTemplate.md docs/DefaultApi.md @@ -132,6 +152,7 @@ docs/DeleteDomainConfigResponse.md docs/DeleteFeedPostPublicResponse.md docs/DeleteHashTagRequestBody.md docs/DeletePageAPIResponse.md +docs/DeletePollVoteResponse.md docs/DeleteSSOUserAPIResponse.md docs/DeleteSubscriptionAPIResponse.md docs/DeletedCommentResultComment.md @@ -153,6 +174,8 @@ docs/FlagCommentResponse.md docs/GetAuditLogsResponse.md docs/GetBannedUsersCountResponse.md docs/GetBannedUsersFromCommentResponse.md +docs/GetBatchJobAPIResponse.md +docs/GetBatchJobsAPIResponse.md docs/GetCachedNotificationCountResponse.md docs/GetCommentBanStatusResponse.md docs/GetCommentTextResponse.md @@ -173,15 +196,21 @@ docs/GetFeedPostsResponse.md docs/GetGifsSearchResponse.md docs/GetGifsTrendingResponse.md docs/GetHashTagsResponse.md +docs/GetMeResponse.md docs/GetModeratorResponse.md docs/GetModeratorsResponse.md docs/GetMyNotificationsResponse.md docs/GetNotificationCountResponse.md docs/GetNotificationsResponse.md docs/GetPageByURLIdAPIResponse.md +docs/GetPageLikesAPIResponse.md +docs/GetPageReactsAPIResponse.md docs/GetPagesAPIResponse.md docs/GetPendingWebhookEventCountResponse.md docs/GetPendingWebhookEventsResponse.md +docs/GetPollResponse.md +docs/GetPollVoteResponse.md +docs/GetPollVotesResponse.md docs/GetPublicFeedPostsResponse.md docs/GetPublicPagesResponse.md docs/GetQuestionConfigResponse.md @@ -215,6 +244,8 @@ docs/GetV2PageReactUsersResponse.md docs/GetV2PageReacts.md docs/GetVotesForUserResponse.md docs/GetVotesResponse.md +docs/GetWebhookSamplePayloadsResponse.md +docs/GetWebhooksResponse.md docs/GifGetLargeResponse.md docs/GifRating.md docs/GifSearchInternalError.md @@ -229,9 +260,11 @@ docs/ImportedSiteType.md docs/LiveEvent.md docs/LiveEventExtraInfo.md docs/LiveEventType.md +docs/MeAuthType.md docs/MediaAsset.md docs/MentionAutoCompleteMode.md docs/MetaItem.md +docs/MigrateAPIPagesData.md docs/ModerationAPIChildCommentsResponse.md docs/ModerationAPIComment.md docs/ModerationAPICommentLog.md @@ -255,7 +288,17 @@ docs/ModerationUserSearchResponse.md docs/Moderator.md docs/NotificationAndCount.md docs/NotificationObjectType.md +docs/NotificationSkipReason.md docs/NotificationType.md +docs/OAuthScope.md +docs/PageCustomReactUser.md +docs/PageMigration.md +docs/PageMigrationFailure.md +docs/PageMigrationSuccess.md +docs/PageMigrationType.md +docs/PageMigrationUndoCounts.md +docs/PageReactIncludeUserInfo.md +docs/PageReactUser.md docs/PageUserEntry.md docs/PageUsersInfoResponse.md docs/PageUsersOfflineResponse.md @@ -266,6 +309,10 @@ docs/PatchDomainConfigResponse.md docs/PatchPageAPIResponse.md docs/PatchSSOUserAPIResponse.md docs/PendingCommentToSyncOutbound.md +docs/PickCommentPollOptionsOrTotalVotesOrClosesAt.md +docs/PollCreationMode.md +docs/PollPrivacy.md +docs/PollVotingMode.md docs/PostRemoveCommentApiResponse.md docs/PreBanSummary.md docs/PubSubComment.md @@ -280,11 +327,15 @@ docs/PublicComment.md docs/PublicCommentBase.md docs/PublicFeedPostsResponse.md docs/PublicPage.md +docs/PublicPollVote.md docs/PublicVote.md +docs/PublicWebhook.md docs/PutDomainConfigResponse.md docs/PutSSOUserAPIResponse.md docs/QueryPredicate.md docs/QueryPredicateValue.md +docs/QuestionCondition.md +docs/QuestionConditionOperator.md docs/QuestionConfig.md docs/QuestionConfigCustomOptionsInner.md docs/QuestionDatum.md @@ -293,9 +344,11 @@ docs/QuestionResult.md docs/QuestionResultAggregationOverall.md docs/QuestionSubQuestionVisibility.md docs/QuestionWhenSave.md +docs/QueuePageMigrationJobAPIResponse.md docs/ReactBodyParams.md docs/ReactFeedPostResponse.md docs/RecordStringBeforeStringOrNullAfterStringOrNullValue.md +docs/RecordStringStringOrNumberOrNumberArrayValue.md docs/RemoveCommentActionResponse.md docs/RemoveUserBadgeResponse.md docs/RenderEmailTemplateBody.md @@ -311,6 +364,7 @@ docs/SSOSecurityLevel.md docs/SaveCommentResponseOptimized.md docs/SaveCommentsBulkResponse.md docs/SaveCommentsResponseWithPresence.md +docs/SavePollResponse.md docs/SearchUsersResponse.md docs/SearchUsersResult.md docs/SearchUsersSectionedResponse.md @@ -322,6 +376,7 @@ docs/SetUserTrustFactorResponse.md docs/SizePreset.md docs/SortDirections.md docs/SpamRule.md +docs/SubQuestionCondition.md docs/TOSConfig.md docs/TenantBadge.md docs/TenantHashTag.md @@ -368,6 +423,10 @@ docs/VoteDeleteResponse.md docs/VoteResponse.md docs/VoteResponseUser.md docs/VoteStyle.md +docs/WebhookComment.md +docs/WebhookEventName.md +docs/WebhookHTTPMethod.md +docs/WebhookSource.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -402,6 +461,8 @@ src/main/java/com/fastcomments/model/APIBanUserChangeLog.java src/main/java/com/fastcomments/model/APIBanUserChangedValues.java src/main/java/com/fastcomments/model/APIBannedUser.java src/main/java/com/fastcomments/model/APIBannedUserWithMultiMatchInfo.java +src/main/java/com/fastcomments/model/APIBatchJob.java +src/main/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInner.java src/main/java/com/fastcomments/model/APIComment.java src/main/java/com/fastcomments/model/APICommentBase.java src/main/java/com/fastcomments/model/APICommentBaseMeta.java @@ -479,10 +540,22 @@ src/main/java/com/fastcomments/model/CommentHTMLRenderingMode.java src/main/java/com/fastcomments/model/CommentLogData.java src/main/java/com/fastcomments/model/CommentLogEntry.java src/main/java/com/fastcomments/model/CommentLogType.java +src/main/java/com/fastcomments/model/CommentPoll.java +src/main/java/com/fastcomments/model/CommentPollInput.java +src/main/java/com/fastcomments/model/CommentPollOption.java +src/main/java/com/fastcomments/model/CommentPollOptionInput.java +src/main/java/com/fastcomments/model/CommentPollPatch.java +src/main/java/com/fastcomments/model/CommentPollPatchOptionsInner.java +src/main/java/com/fastcomments/model/CommentPollPutInput.java src/main/java/com/fastcomments/model/CommentQuestionResultsRenderingType.java src/main/java/com/fastcomments/model/CommentQuestionsRequired.java src/main/java/com/fastcomments/model/CommentTextUpdateRequest.java src/main/java/com/fastcomments/model/CommentThreadDeletionMode.java +src/main/java/com/fastcomments/model/CommentTranslation.java +src/main/java/com/fastcomments/model/CommentTranslationMode.java +src/main/java/com/fastcomments/model/CommentTranslationPublic.java +src/main/java/com/fastcomments/model/CommentTranslationsRequest.java +src/main/java/com/fastcomments/model/CommentTranslationsResponse.java src/main/java/com/fastcomments/model/CommentUserBadgeInfo.java src/main/java/com/fastcomments/model/CommentUserHashTagInfo.java src/main/java/com/fastcomments/model/CommentUserMentionInfo.java @@ -491,6 +564,8 @@ src/main/java/com/fastcomments/model/CommentsByIdsParams.java src/main/java/com/fastcomments/model/CreateAPIPageData.java src/main/java/com/fastcomments/model/CreateAPISSOUserData.java src/main/java/com/fastcomments/model/CreateAPIUserSubscriptionData.java +src/main/java/com/fastcomments/model/CreateAgentTenantBody.java +src/main/java/com/fastcomments/model/CreateAgentTenantResponse.java src/main/java/com/fastcomments/model/CreateCommentParams.java src/main/java/com/fastcomments/model/CreateEmailTemplateBody.java src/main/java/com/fastcomments/model/CreateEmailTemplateResponse.java @@ -501,6 +576,8 @@ src/main/java/com/fastcomments/model/CreateHashTagBody.java src/main/java/com/fastcomments/model/CreateHashTagResponse.java src/main/java/com/fastcomments/model/CreateModeratorBody.java src/main/java/com/fastcomments/model/CreateModeratorResponse.java +src/main/java/com/fastcomments/model/CreatePollVoteBody.java +src/main/java/com/fastcomments/model/CreatePollVoteResponse.java src/main/java/com/fastcomments/model/CreateQuestionConfigBody.java src/main/java/com/fastcomments/model/CreateQuestionConfigResponse.java src/main/java/com/fastcomments/model/CreateQuestionResultBody.java @@ -516,6 +593,8 @@ src/main/java/com/fastcomments/model/CreateTicketBody.java src/main/java/com/fastcomments/model/CreateTicketResponse.java src/main/java/com/fastcomments/model/CreateUserBadgeParams.java src/main/java/com/fastcomments/model/CreateV1PageReact.java +src/main/java/com/fastcomments/model/CreateWebhookParams.java +src/main/java/com/fastcomments/model/CreateWebhookResponse.java src/main/java/com/fastcomments/model/CustomConfigParameters.java src/main/java/com/fastcomments/model/CustomEmailTemplate.java src/main/java/com/fastcomments/model/DeleteCommentAction.java @@ -524,6 +603,7 @@ src/main/java/com/fastcomments/model/DeleteDomainConfigResponse.java src/main/java/com/fastcomments/model/DeleteFeedPostPublicResponse.java src/main/java/com/fastcomments/model/DeleteHashTagRequestBody.java src/main/java/com/fastcomments/model/DeletePageAPIResponse.java +src/main/java/com/fastcomments/model/DeletePollVoteResponse.java src/main/java/com/fastcomments/model/DeleteSSOUserAPIResponse.java src/main/java/com/fastcomments/model/DeleteSubscriptionAPIResponse.java src/main/java/com/fastcomments/model/DeletedCommentResultComment.java @@ -545,6 +625,8 @@ src/main/java/com/fastcomments/model/FlagCommentResponse.java src/main/java/com/fastcomments/model/GetAuditLogsResponse.java src/main/java/com/fastcomments/model/GetBannedUsersCountResponse.java src/main/java/com/fastcomments/model/GetBannedUsersFromCommentResponse.java +src/main/java/com/fastcomments/model/GetBatchJobAPIResponse.java +src/main/java/com/fastcomments/model/GetBatchJobsAPIResponse.java src/main/java/com/fastcomments/model/GetCachedNotificationCountResponse.java src/main/java/com/fastcomments/model/GetCommentBanStatusResponse.java src/main/java/com/fastcomments/model/GetCommentTextResponse.java @@ -565,15 +647,21 @@ src/main/java/com/fastcomments/model/GetFeedPostsResponse.java src/main/java/com/fastcomments/model/GetGifsSearchResponse.java src/main/java/com/fastcomments/model/GetGifsTrendingResponse.java src/main/java/com/fastcomments/model/GetHashTagsResponse.java +src/main/java/com/fastcomments/model/GetMeResponse.java src/main/java/com/fastcomments/model/GetModeratorResponse.java src/main/java/com/fastcomments/model/GetModeratorsResponse.java src/main/java/com/fastcomments/model/GetMyNotificationsResponse.java src/main/java/com/fastcomments/model/GetNotificationCountResponse.java src/main/java/com/fastcomments/model/GetNotificationsResponse.java src/main/java/com/fastcomments/model/GetPageByURLIdAPIResponse.java +src/main/java/com/fastcomments/model/GetPageLikesAPIResponse.java +src/main/java/com/fastcomments/model/GetPageReactsAPIResponse.java src/main/java/com/fastcomments/model/GetPagesAPIResponse.java src/main/java/com/fastcomments/model/GetPendingWebhookEventCountResponse.java src/main/java/com/fastcomments/model/GetPendingWebhookEventsResponse.java +src/main/java/com/fastcomments/model/GetPollResponse.java +src/main/java/com/fastcomments/model/GetPollVoteResponse.java +src/main/java/com/fastcomments/model/GetPollVotesResponse.java src/main/java/com/fastcomments/model/GetPublicFeedPostsResponse.java src/main/java/com/fastcomments/model/GetPublicPagesResponse.java src/main/java/com/fastcomments/model/GetQuestionConfigResponse.java @@ -607,6 +695,8 @@ src/main/java/com/fastcomments/model/GetV2PageReactUsersResponse.java src/main/java/com/fastcomments/model/GetV2PageReacts.java src/main/java/com/fastcomments/model/GetVotesForUserResponse.java src/main/java/com/fastcomments/model/GetVotesResponse.java +src/main/java/com/fastcomments/model/GetWebhookSamplePayloadsResponse.java +src/main/java/com/fastcomments/model/GetWebhooksResponse.java src/main/java/com/fastcomments/model/GifGetLargeResponse.java src/main/java/com/fastcomments/model/GifRating.java src/main/java/com/fastcomments/model/GifSearchInternalError.java @@ -621,9 +711,11 @@ src/main/java/com/fastcomments/model/ImportedSiteType.java src/main/java/com/fastcomments/model/LiveEvent.java src/main/java/com/fastcomments/model/LiveEventExtraInfo.java src/main/java/com/fastcomments/model/LiveEventType.java +src/main/java/com/fastcomments/model/MeAuthType.java src/main/java/com/fastcomments/model/MediaAsset.java src/main/java/com/fastcomments/model/MentionAutoCompleteMode.java src/main/java/com/fastcomments/model/MetaItem.java +src/main/java/com/fastcomments/model/MigrateAPIPagesData.java src/main/java/com/fastcomments/model/ModerationAPIChildCommentsResponse.java src/main/java/com/fastcomments/model/ModerationAPIComment.java src/main/java/com/fastcomments/model/ModerationAPICommentLog.java @@ -646,7 +738,17 @@ src/main/java/com/fastcomments/model/ModerationUserSearchResponse.java src/main/java/com/fastcomments/model/Moderator.java src/main/java/com/fastcomments/model/NotificationAndCount.java src/main/java/com/fastcomments/model/NotificationObjectType.java +src/main/java/com/fastcomments/model/NotificationSkipReason.java src/main/java/com/fastcomments/model/NotificationType.java +src/main/java/com/fastcomments/model/OAuthScope.java +src/main/java/com/fastcomments/model/PageCustomReactUser.java +src/main/java/com/fastcomments/model/PageMigration.java +src/main/java/com/fastcomments/model/PageMigrationFailure.java +src/main/java/com/fastcomments/model/PageMigrationSuccess.java +src/main/java/com/fastcomments/model/PageMigrationType.java +src/main/java/com/fastcomments/model/PageMigrationUndoCounts.java +src/main/java/com/fastcomments/model/PageReactIncludeUserInfo.java +src/main/java/com/fastcomments/model/PageReactUser.java src/main/java/com/fastcomments/model/PageUserEntry.java src/main/java/com/fastcomments/model/PageUsersInfoResponse.java src/main/java/com/fastcomments/model/PageUsersOfflineResponse.java @@ -657,6 +759,10 @@ src/main/java/com/fastcomments/model/PatchDomainConfigResponse.java src/main/java/com/fastcomments/model/PatchPageAPIResponse.java src/main/java/com/fastcomments/model/PatchSSOUserAPIResponse.java src/main/java/com/fastcomments/model/PendingCommentToSyncOutbound.java +src/main/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAt.java +src/main/java/com/fastcomments/model/PollCreationMode.java +src/main/java/com/fastcomments/model/PollPrivacy.java +src/main/java/com/fastcomments/model/PollVotingMode.java src/main/java/com/fastcomments/model/PostRemoveCommentApiResponse.java src/main/java/com/fastcomments/model/PreBanSummary.java src/main/java/com/fastcomments/model/PubSubComment.java @@ -670,11 +776,15 @@ src/main/java/com/fastcomments/model/PublicComment.java src/main/java/com/fastcomments/model/PublicCommentBase.java src/main/java/com/fastcomments/model/PublicFeedPostsResponse.java src/main/java/com/fastcomments/model/PublicPage.java +src/main/java/com/fastcomments/model/PublicPollVote.java src/main/java/com/fastcomments/model/PublicVote.java +src/main/java/com/fastcomments/model/PublicWebhook.java src/main/java/com/fastcomments/model/PutDomainConfigResponse.java src/main/java/com/fastcomments/model/PutSSOUserAPIResponse.java src/main/java/com/fastcomments/model/QueryPredicate.java src/main/java/com/fastcomments/model/QueryPredicateValue.java +src/main/java/com/fastcomments/model/QuestionCondition.java +src/main/java/com/fastcomments/model/QuestionConditionOperator.java src/main/java/com/fastcomments/model/QuestionConfig.java src/main/java/com/fastcomments/model/QuestionConfigCustomOptionsInner.java src/main/java/com/fastcomments/model/QuestionDatum.java @@ -683,9 +793,11 @@ src/main/java/com/fastcomments/model/QuestionResult.java src/main/java/com/fastcomments/model/QuestionResultAggregationOverall.java src/main/java/com/fastcomments/model/QuestionSubQuestionVisibility.java src/main/java/com/fastcomments/model/QuestionWhenSave.java +src/main/java/com/fastcomments/model/QueuePageMigrationJobAPIResponse.java src/main/java/com/fastcomments/model/ReactBodyParams.java src/main/java/com/fastcomments/model/ReactFeedPostResponse.java src/main/java/com/fastcomments/model/RecordStringBeforeStringOrNullAfterStringOrNullValue.java +src/main/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValue.java src/main/java/com/fastcomments/model/RemoveCommentActionResponse.java src/main/java/com/fastcomments/model/RemoveUserBadgeResponse.java src/main/java/com/fastcomments/model/RenderEmailTemplateBody.java @@ -701,6 +813,7 @@ src/main/java/com/fastcomments/model/SSOSecurityLevel.java src/main/java/com/fastcomments/model/SaveCommentResponseOptimized.java src/main/java/com/fastcomments/model/SaveCommentsBulkResponse.java src/main/java/com/fastcomments/model/SaveCommentsResponseWithPresence.java +src/main/java/com/fastcomments/model/SavePollResponse.java src/main/java/com/fastcomments/model/SearchUsersResponse.java src/main/java/com/fastcomments/model/SearchUsersResult.java src/main/java/com/fastcomments/model/SearchUsersSectionedResponse.java @@ -712,6 +825,7 @@ src/main/java/com/fastcomments/model/SetUserTrustFactorResponse.java src/main/java/com/fastcomments/model/SizePreset.java src/main/java/com/fastcomments/model/SortDirections.java src/main/java/com/fastcomments/model/SpamRule.java +src/main/java/com/fastcomments/model/SubQuestionCondition.java src/main/java/com/fastcomments/model/TOSConfig.java src/main/java/com/fastcomments/model/TenantBadge.java src/main/java/com/fastcomments/model/TenantHashTag.java @@ -758,6 +872,10 @@ src/main/java/com/fastcomments/model/VoteDeleteResponse.java src/main/java/com/fastcomments/model/VoteResponse.java src/main/java/com/fastcomments/model/VoteResponseUser.java src/main/java/com/fastcomments/model/VoteStyle.java +src/main/java/com/fastcomments/model/WebhookComment.java +src/main/java/com/fastcomments/model/WebhookEventName.java +src/main/java/com/fastcomments/model/WebhookHTTPMethod.java +src/main/java/com/fastcomments/model/WebhookSource.java src/test/java/com/fastcomments/api/DefaultApiTest.java src/test/java/com/fastcomments/api/ModerationApiTest.java src/test/java/com/fastcomments/api/PublicApiTest.java @@ -766,6 +884,8 @@ src/test/java/com/fastcomments/model/APIBanUserChangeLogTest.java src/test/java/com/fastcomments/model/APIBanUserChangedValuesTest.java src/test/java/com/fastcomments/model/APIBannedUserTest.java src/test/java/com/fastcomments/model/APIBannedUserWithMultiMatchInfoTest.java +src/test/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInnerTest.java +src/test/java/com/fastcomments/model/APIBatchJobTest.java src/test/java/com/fastcomments/model/APICommentBaseMetaTest.java src/test/java/com/fastcomments/model/APICommentBaseTest.java src/test/java/com/fastcomments/model/APICommentCommonBannedUserTest.java @@ -842,10 +962,22 @@ src/test/java/com/fastcomments/model/CommentHTMLRenderingModeTest.java src/test/java/com/fastcomments/model/CommentLogDataTest.java src/test/java/com/fastcomments/model/CommentLogEntryTest.java src/test/java/com/fastcomments/model/CommentLogTypeTest.java +src/test/java/com/fastcomments/model/CommentPollInputTest.java +src/test/java/com/fastcomments/model/CommentPollOptionInputTest.java +src/test/java/com/fastcomments/model/CommentPollOptionTest.java +src/test/java/com/fastcomments/model/CommentPollPatchOptionsInnerTest.java +src/test/java/com/fastcomments/model/CommentPollPatchTest.java +src/test/java/com/fastcomments/model/CommentPollPutInputTest.java +src/test/java/com/fastcomments/model/CommentPollTest.java src/test/java/com/fastcomments/model/CommentQuestionResultsRenderingTypeTest.java src/test/java/com/fastcomments/model/CommentQuestionsRequiredTest.java src/test/java/com/fastcomments/model/CommentTextUpdateRequestTest.java src/test/java/com/fastcomments/model/CommentThreadDeletionModeTest.java +src/test/java/com/fastcomments/model/CommentTranslationModeTest.java +src/test/java/com/fastcomments/model/CommentTranslationPublicTest.java +src/test/java/com/fastcomments/model/CommentTranslationTest.java +src/test/java/com/fastcomments/model/CommentTranslationsRequestTest.java +src/test/java/com/fastcomments/model/CommentTranslationsResponseTest.java src/test/java/com/fastcomments/model/CommentUserBadgeInfoTest.java src/test/java/com/fastcomments/model/CommentUserHashTagInfoTest.java src/test/java/com/fastcomments/model/CommentUserMentionInfoTest.java @@ -854,6 +986,8 @@ src/test/java/com/fastcomments/model/CommentsByIdsParamsTest.java src/test/java/com/fastcomments/model/CreateAPIPageDataTest.java src/test/java/com/fastcomments/model/CreateAPISSOUserDataTest.java src/test/java/com/fastcomments/model/CreateAPIUserSubscriptionDataTest.java +src/test/java/com/fastcomments/model/CreateAgentTenantBodyTest.java +src/test/java/com/fastcomments/model/CreateAgentTenantResponseTest.java src/test/java/com/fastcomments/model/CreateCommentParamsTest.java src/test/java/com/fastcomments/model/CreateEmailTemplateBodyTest.java src/test/java/com/fastcomments/model/CreateEmailTemplateResponseTest.java @@ -864,6 +998,8 @@ src/test/java/com/fastcomments/model/CreateHashTagBodyTest.java src/test/java/com/fastcomments/model/CreateHashTagResponseTest.java src/test/java/com/fastcomments/model/CreateModeratorBodyTest.java src/test/java/com/fastcomments/model/CreateModeratorResponseTest.java +src/test/java/com/fastcomments/model/CreatePollVoteBodyTest.java +src/test/java/com/fastcomments/model/CreatePollVoteResponseTest.java src/test/java/com/fastcomments/model/CreateQuestionConfigBodyTest.java src/test/java/com/fastcomments/model/CreateQuestionConfigResponseTest.java src/test/java/com/fastcomments/model/CreateQuestionResultBodyTest.java @@ -879,6 +1015,8 @@ src/test/java/com/fastcomments/model/CreateTicketBodyTest.java src/test/java/com/fastcomments/model/CreateTicketResponseTest.java src/test/java/com/fastcomments/model/CreateUserBadgeParamsTest.java src/test/java/com/fastcomments/model/CreateV1PageReactTest.java +src/test/java/com/fastcomments/model/CreateWebhookParamsTest.java +src/test/java/com/fastcomments/model/CreateWebhookResponseTest.java src/test/java/com/fastcomments/model/CustomConfigParametersTest.java src/test/java/com/fastcomments/model/CustomEmailTemplateTest.java src/test/java/com/fastcomments/model/DeleteCommentActionTest.java @@ -887,6 +1025,7 @@ src/test/java/com/fastcomments/model/DeleteDomainConfigResponseTest.java src/test/java/com/fastcomments/model/DeleteFeedPostPublicResponseTest.java src/test/java/com/fastcomments/model/DeleteHashTagRequestBodyTest.java src/test/java/com/fastcomments/model/DeletePageAPIResponseTest.java +src/test/java/com/fastcomments/model/DeletePollVoteResponseTest.java src/test/java/com/fastcomments/model/DeleteSSOUserAPIResponseTest.java src/test/java/com/fastcomments/model/DeleteSubscriptionAPIResponseTest.java src/test/java/com/fastcomments/model/DeletedCommentResultCommentTest.java @@ -908,6 +1047,8 @@ src/test/java/com/fastcomments/model/FlagCommentResponseTest.java src/test/java/com/fastcomments/model/GetAuditLogsResponseTest.java src/test/java/com/fastcomments/model/GetBannedUsersCountResponseTest.java src/test/java/com/fastcomments/model/GetBannedUsersFromCommentResponseTest.java +src/test/java/com/fastcomments/model/GetBatchJobAPIResponseTest.java +src/test/java/com/fastcomments/model/GetBatchJobsAPIResponseTest.java src/test/java/com/fastcomments/model/GetCachedNotificationCountResponseTest.java src/test/java/com/fastcomments/model/GetCommentBanStatusResponseTest.java src/test/java/com/fastcomments/model/GetCommentTextResponseTest.java @@ -928,15 +1069,21 @@ src/test/java/com/fastcomments/model/GetFeedPostsResponseTest.java src/test/java/com/fastcomments/model/GetGifsSearchResponseTest.java src/test/java/com/fastcomments/model/GetGifsTrendingResponseTest.java src/test/java/com/fastcomments/model/GetHashTagsResponseTest.java +src/test/java/com/fastcomments/model/GetMeResponseTest.java src/test/java/com/fastcomments/model/GetModeratorResponseTest.java src/test/java/com/fastcomments/model/GetModeratorsResponseTest.java src/test/java/com/fastcomments/model/GetMyNotificationsResponseTest.java src/test/java/com/fastcomments/model/GetNotificationCountResponseTest.java src/test/java/com/fastcomments/model/GetNotificationsResponseTest.java src/test/java/com/fastcomments/model/GetPageByURLIdAPIResponseTest.java +src/test/java/com/fastcomments/model/GetPageLikesAPIResponseTest.java +src/test/java/com/fastcomments/model/GetPageReactsAPIResponseTest.java src/test/java/com/fastcomments/model/GetPagesAPIResponseTest.java src/test/java/com/fastcomments/model/GetPendingWebhookEventCountResponseTest.java src/test/java/com/fastcomments/model/GetPendingWebhookEventsResponseTest.java +src/test/java/com/fastcomments/model/GetPollResponseTest.java +src/test/java/com/fastcomments/model/GetPollVoteResponseTest.java +src/test/java/com/fastcomments/model/GetPollVotesResponseTest.java src/test/java/com/fastcomments/model/GetPublicFeedPostsResponseTest.java src/test/java/com/fastcomments/model/GetPublicPagesResponseTest.java src/test/java/com/fastcomments/model/GetQuestionConfigResponseTest.java @@ -970,6 +1117,8 @@ src/test/java/com/fastcomments/model/GetV2PageReactUsersResponseTest.java src/test/java/com/fastcomments/model/GetV2PageReactsTest.java src/test/java/com/fastcomments/model/GetVotesForUserResponseTest.java src/test/java/com/fastcomments/model/GetVotesResponseTest.java +src/test/java/com/fastcomments/model/GetWebhookSamplePayloadsResponseTest.java +src/test/java/com/fastcomments/model/GetWebhooksResponseTest.java src/test/java/com/fastcomments/model/GifGetLargeResponseTest.java src/test/java/com/fastcomments/model/GifRatingTest.java src/test/java/com/fastcomments/model/GifSearchInternalErrorTest.java @@ -984,9 +1133,11 @@ src/test/java/com/fastcomments/model/ImportedSiteTypeTest.java src/test/java/com/fastcomments/model/LiveEventExtraInfoTest.java src/test/java/com/fastcomments/model/LiveEventTest.java src/test/java/com/fastcomments/model/LiveEventTypeTest.java +src/test/java/com/fastcomments/model/MeAuthTypeTest.java src/test/java/com/fastcomments/model/MediaAssetTest.java src/test/java/com/fastcomments/model/MentionAutoCompleteModeTest.java src/test/java/com/fastcomments/model/MetaItemTest.java +src/test/java/com/fastcomments/model/MigrateAPIPagesDataTest.java src/test/java/com/fastcomments/model/ModerationAPIChildCommentsResponseTest.java src/test/java/com/fastcomments/model/ModerationAPICommentLogTest.java src/test/java/com/fastcomments/model/ModerationAPICommentResponseTest.java @@ -1009,7 +1160,17 @@ src/test/java/com/fastcomments/model/ModerationUserSearchResponseTest.java src/test/java/com/fastcomments/model/ModeratorTest.java src/test/java/com/fastcomments/model/NotificationAndCountTest.java src/test/java/com/fastcomments/model/NotificationObjectTypeTest.java +src/test/java/com/fastcomments/model/NotificationSkipReasonTest.java src/test/java/com/fastcomments/model/NotificationTypeTest.java +src/test/java/com/fastcomments/model/OAuthScopeTest.java +src/test/java/com/fastcomments/model/PageCustomReactUserTest.java +src/test/java/com/fastcomments/model/PageMigrationFailureTest.java +src/test/java/com/fastcomments/model/PageMigrationSuccessTest.java +src/test/java/com/fastcomments/model/PageMigrationTest.java +src/test/java/com/fastcomments/model/PageMigrationTypeTest.java +src/test/java/com/fastcomments/model/PageMigrationUndoCountsTest.java +src/test/java/com/fastcomments/model/PageReactIncludeUserInfoTest.java +src/test/java/com/fastcomments/model/PageReactUserTest.java src/test/java/com/fastcomments/model/PageUserEntryTest.java src/test/java/com/fastcomments/model/PageUsersInfoResponseTest.java src/test/java/com/fastcomments/model/PageUsersOfflineResponseTest.java @@ -1020,6 +1181,10 @@ src/test/java/com/fastcomments/model/PatchDomainConfigResponseTest.java src/test/java/com/fastcomments/model/PatchPageAPIResponseTest.java src/test/java/com/fastcomments/model/PatchSSOUserAPIResponseTest.java src/test/java/com/fastcomments/model/PendingCommentToSyncOutboundTest.java +src/test/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAtTest.java +src/test/java/com/fastcomments/model/PollCreationModeTest.java +src/test/java/com/fastcomments/model/PollPrivacyTest.java +src/test/java/com/fastcomments/model/PollVotingModeTest.java src/test/java/com/fastcomments/model/PostRemoveCommentApiResponseTest.java src/test/java/com/fastcomments/model/PreBanSummaryTest.java src/test/java/com/fastcomments/model/PubSubCommentBaseTest.java @@ -1033,11 +1198,15 @@ src/test/java/com/fastcomments/model/PublicCommentBaseTest.java src/test/java/com/fastcomments/model/PublicCommentTest.java src/test/java/com/fastcomments/model/PublicFeedPostsResponseTest.java src/test/java/com/fastcomments/model/PublicPageTest.java +src/test/java/com/fastcomments/model/PublicPollVoteTest.java src/test/java/com/fastcomments/model/PublicVoteTest.java +src/test/java/com/fastcomments/model/PublicWebhookTest.java src/test/java/com/fastcomments/model/PutDomainConfigResponseTest.java src/test/java/com/fastcomments/model/PutSSOUserAPIResponseTest.java src/test/java/com/fastcomments/model/QueryPredicateTest.java src/test/java/com/fastcomments/model/QueryPredicateValueTest.java +src/test/java/com/fastcomments/model/QuestionConditionOperatorTest.java +src/test/java/com/fastcomments/model/QuestionConditionTest.java src/test/java/com/fastcomments/model/QuestionConfigCustomOptionsInnerTest.java src/test/java/com/fastcomments/model/QuestionConfigTest.java src/test/java/com/fastcomments/model/QuestionDatumTest.java @@ -1046,9 +1215,11 @@ src/test/java/com/fastcomments/model/QuestionResultAggregationOverallTest.java src/test/java/com/fastcomments/model/QuestionResultTest.java src/test/java/com/fastcomments/model/QuestionSubQuestionVisibilityTest.java src/test/java/com/fastcomments/model/QuestionWhenSaveTest.java +src/test/java/com/fastcomments/model/QueuePageMigrationJobAPIResponseTest.java src/test/java/com/fastcomments/model/ReactBodyParamsTest.java src/test/java/com/fastcomments/model/ReactFeedPostResponseTest.java src/test/java/com/fastcomments/model/RecordStringBeforeStringOrNullAfterStringOrNullValueTest.java +src/test/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValueTest.java src/test/java/com/fastcomments/model/RemoveCommentActionResponseTest.java src/test/java/com/fastcomments/model/RemoveUserBadgeResponseTest.java src/test/java/com/fastcomments/model/RenderEmailTemplateBodyTest.java @@ -1064,6 +1235,7 @@ src/test/java/com/fastcomments/model/SSOSecurityLevelTest.java src/test/java/com/fastcomments/model/SaveCommentResponseOptimizedTest.java src/test/java/com/fastcomments/model/SaveCommentsBulkResponseTest.java src/test/java/com/fastcomments/model/SaveCommentsResponseWithPresenceTest.java +src/test/java/com/fastcomments/model/SavePollResponseTest.java src/test/java/com/fastcomments/model/SearchUsersResponseTest.java src/test/java/com/fastcomments/model/SearchUsersResultTest.java src/test/java/com/fastcomments/model/SearchUsersSectionedResponseTest.java @@ -1075,6 +1247,7 @@ src/test/java/com/fastcomments/model/SetUserTrustFactorResponseTest.java src/test/java/com/fastcomments/model/SizePresetTest.java src/test/java/com/fastcomments/model/SortDirectionsTest.java src/test/java/com/fastcomments/model/SpamRuleTest.java +src/test/java/com/fastcomments/model/SubQuestionConditionTest.java src/test/java/com/fastcomments/model/TOSConfigTest.java src/test/java/com/fastcomments/model/TenantBadgeTest.java src/test/java/com/fastcomments/model/TenantHashTagTest.java @@ -1121,3 +1294,7 @@ src/test/java/com/fastcomments/model/VoteDeleteResponseTest.java src/test/java/com/fastcomments/model/VoteResponseTest.java src/test/java/com/fastcomments/model/VoteResponseUserTest.java src/test/java/com/fastcomments/model/VoteStyleTest.java +src/test/java/com/fastcomments/model/WebhookCommentTest.java +src/test/java/com/fastcomments/model/WebhookEventNameTest.java +src/test/java/com/fastcomments/model/WebhookHTTPMethodTest.java +src/test/java/com/fastcomments/model/WebhookSourceTest.java diff --git a/client/README.md b/client/README.md index 8480f70a..5bf44026 100644 --- a/client/README.md +++ b/client/README.md @@ -40,7 +40,7 @@ Add this dependency to your project's POM: com.fastcomments client - 3.0.0 + 3.1.0 compile ``` @@ -56,7 +56,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.fastcomments:client:3.0.0" + implementation "com.fastcomments:client:3.1.0" } ``` @@ -70,7 +70,7 @@ mvn clean package Then manually install the following JARs: -* `target/client-3.0.0.jar` +* `target/client-3.1.0.jar` * `target/lib/*.jar` ## Getting Started @@ -134,9 +134,11 @@ Class | Method | HTTP request | Description *DefaultApi* | [**bulkAggregateQuestionResults**](docs/DefaultApi.md#bulkAggregateQuestionResults) | **POST** /api/v1/question-results-aggregation/bulk | *DefaultApi* | [**changeTicketState**](docs/DefaultApi.md#changeTicketState) | **PATCH** /api/v1/tickets/{id}/state | *DefaultApi* | [**combineCommentsWithQuestionResults**](docs/DefaultApi.md#combineCommentsWithQuestionResults) | **GET** /api/v1/question-results-aggregation/combine/comments | +*DefaultApi* | [**createAgentTenant**](docs/DefaultApi.md#createAgentTenant) | **POST** /api/v1/agent-tenants | *DefaultApi* | [**createEmailTemplate**](docs/DefaultApi.md#createEmailTemplate) | **POST** /api/v1/email-templates | *DefaultApi* | [**createFeedPost**](docs/DefaultApi.md#createFeedPost) | **POST** /api/v1/feed-posts | *DefaultApi* | [**createModerator**](docs/DefaultApi.md#createModerator) | **POST** /api/v1/moderators | +*DefaultApi* | [**createPollVote**](docs/DefaultApi.md#createPollVote) | **POST** /api/v1/poll-votes | *DefaultApi* | [**createQuestionConfig**](docs/DefaultApi.md#createQuestionConfig) | **POST** /api/v1/question-configs | *DefaultApi* | [**createQuestionResult**](docs/DefaultApi.md#createQuestionResult) | **POST** /api/v1/question-results | *DefaultApi* | [**createSubscription**](docs/DefaultApi.md#createSubscription) | **POST** /api/v1/subscriptions | @@ -146,6 +148,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**createTicket**](docs/DefaultApi.md#createTicket) | **POST** /api/v1/tickets | *DefaultApi* | [**createUserBadge**](docs/DefaultApi.md#createUserBadge) | **POST** /api/v1/user-badges | *DefaultApi* | [**createVote**](docs/DefaultApi.md#createVote) | **POST** /api/v1/votes | +*DefaultApi* | [**createWebhook**](docs/DefaultApi.md#createWebhook) | **POST** /api/v1/webhooks | *DefaultApi* | [**deleteComment**](docs/DefaultApi.md#deleteComment) | **DELETE** /api/v1/comments/{id} | *DefaultApi* | [**deleteDomainConfig**](docs/DefaultApi.md#deleteDomainConfig) | **DELETE** /api/v1/domain-configs/{domain} | *DefaultApi* | [**deleteEmailTemplate**](docs/DefaultApi.md#deleteEmailTemplate) | **DELETE** /api/v1/email-templates/{id} | @@ -155,6 +158,8 @@ Class | Method | HTTP request | Description *DefaultApi* | [**deleteNotificationCount**](docs/DefaultApi.md#deleteNotificationCount) | **DELETE** /api/v1/notification-count/{id} | *DefaultApi* | [**deletePage**](docs/DefaultApi.md#deletePage) | **DELETE** /api/v1/pages/{id} | *DefaultApi* | [**deletePendingWebhookEvent**](docs/DefaultApi.md#deletePendingWebhookEvent) | **DELETE** /api/v1/pending-webhook-events/{id} | +*DefaultApi* | [**deletePoll**](docs/DefaultApi.md#deletePoll) | **DELETE** /api/v1/polls/{commentId} | +*DefaultApi* | [**deletePollVote**](docs/DefaultApi.md#deletePollVote) | **DELETE** /api/v1/poll-votes/{id} | *DefaultApi* | [**deleteQuestionConfig**](docs/DefaultApi.md#deleteQuestionConfig) | **DELETE** /api/v1/question-configs/{id} | *DefaultApi* | [**deleteQuestionResult**](docs/DefaultApi.md#deleteQuestionResult) | **DELETE** /api/v1/question-results/{id} | *DefaultApi* | [**deleteSSOUser**](docs/DefaultApi.md#deleteSSOUser) | **DELETE** /api/v1/sso-users/{id} | @@ -164,8 +169,11 @@ Class | Method | HTTP request | Description *DefaultApi* | [**deleteTenantUser**](docs/DefaultApi.md#deleteTenantUser) | **DELETE** /api/v1/tenant-users/{id} | *DefaultApi* | [**deleteUserBadge**](docs/DefaultApi.md#deleteUserBadge) | **DELETE** /api/v1/user-badges/{id} | *DefaultApi* | [**deleteVote**](docs/DefaultApi.md#deleteVote) | **DELETE** /api/v1/votes/{id} | +*DefaultApi* | [**deleteWebhook**](docs/DefaultApi.md#deleteWebhook) | **DELETE** /api/v1/webhooks/{id} | *DefaultApi* | [**flagComment**](docs/DefaultApi.md#flagComment) | **POST** /api/v1/comments/{id}/flag | *DefaultApi* | [**getAuditLogs**](docs/DefaultApi.md#getAuditLogs) | **GET** /api/v1/audit-logs | +*DefaultApi* | [**getBatchJob**](docs/DefaultApi.md#getBatchJob) | **GET** /api/v1/batch-jobs/{id} | +*DefaultApi* | [**getBatchJobs**](docs/DefaultApi.md#getBatchJobs) | **GET** /api/v1/batch-jobs | *DefaultApi* | [**getCachedNotificationCount**](docs/DefaultApi.md#getCachedNotificationCount) | **GET** /api/v1/notification-count/{id} | *DefaultApi* | [**getComment**](docs/DefaultApi.md#getComment) | **GET** /api/v1/comments/{id} | *DefaultApi* | [**getComments**](docs/DefaultApi.md#getComments) | **GET** /api/v1/comments | @@ -177,14 +185,20 @@ Class | Method | HTTP request | Description *DefaultApi* | [**getEmailTemplates**](docs/DefaultApi.md#getEmailTemplates) | **GET** /api/v1/email-templates | *DefaultApi* | [**getFeedPosts**](docs/DefaultApi.md#getFeedPosts) | **GET** /api/v1/feed-posts | *DefaultApi* | [**getHashTags**](docs/DefaultApi.md#getHashTags) | **GET** /api/v1/hash-tags | +*DefaultApi* | [**getMe**](docs/DefaultApi.md#getMe) | **GET** /api/v1/me | *DefaultApi* | [**getModerator**](docs/DefaultApi.md#getModerator) | **GET** /api/v1/moderators/{id} | *DefaultApi* | [**getModerators**](docs/DefaultApi.md#getModerators) | **GET** /api/v1/moderators | *DefaultApi* | [**getNotificationCount**](docs/DefaultApi.md#getNotificationCount) | **GET** /api/v1/notifications/count | *DefaultApi* | [**getNotifications**](docs/DefaultApi.md#getNotifications) | **GET** /api/v1/notifications | *DefaultApi* | [**getPageByURLId**](docs/DefaultApi.md#getPageByURLId) | **GET** /api/v1/pages/by-url-id | +*DefaultApi* | [**getPageLikes**](docs/DefaultApi.md#getPageLikes) | **GET** /api/v1/pages/likes | +*DefaultApi* | [**getPageReacts**](docs/DefaultApi.md#getPageReacts) | **GET** /api/v1/pages/reacts | *DefaultApi* | [**getPages**](docs/DefaultApi.md#getPages) | **GET** /api/v1/pages | *DefaultApi* | [**getPendingWebhookEventCount**](docs/DefaultApi.md#getPendingWebhookEventCount) | **GET** /api/v1/pending-webhook-events/count | *DefaultApi* | [**getPendingWebhookEvents**](docs/DefaultApi.md#getPendingWebhookEvents) | **GET** /api/v1/pending-webhook-events | +*DefaultApi* | [**getPoll**](docs/DefaultApi.md#getPoll) | **GET** /api/v1/polls/{commentId} | +*DefaultApi* | [**getPollVote**](docs/DefaultApi.md#getPollVote) | **GET** /api/v1/poll-votes/{id} | +*DefaultApi* | [**getPollVotes**](docs/DefaultApi.md#getPollVotes) | **GET** /api/v1/poll-votes | *DefaultApi* | [**getQuestionConfig**](docs/DefaultApi.md#getQuestionConfig) | **GET** /api/v1/question-configs/{id} | *DefaultApi* | [**getQuestionConfigs**](docs/DefaultApi.md#getQuestionConfigs) | **GET** /api/v1/question-configs | *DefaultApi* | [**getQuestionResult**](docs/DefaultApi.md#getQuestionResult) | **GET** /api/v1/question-results/{id} | @@ -210,11 +224,16 @@ Class | Method | HTTP request | Description *DefaultApi* | [**getUserBadges**](docs/DefaultApi.md#getUserBadges) | **GET** /api/v1/user-badges | *DefaultApi* | [**getVotes**](docs/DefaultApi.md#getVotes) | **GET** /api/v1/votes | *DefaultApi* | [**getVotesForUser**](docs/DefaultApi.md#getVotesForUser) | **GET** /api/v1/votes/for-user | +*DefaultApi* | [**getWebhookSamplePayloads**](docs/DefaultApi.md#getWebhookSamplePayloads) | **GET** /api/v1/webhooks/sample-payloads | +*DefaultApi* | [**getWebhooks**](docs/DefaultApi.md#getWebhooks) | **GET** /api/v1/webhooks | +*DefaultApi* | [**migratePages**](docs/DefaultApi.md#migratePages) | **POST** /api/v1/pages/migrations | *DefaultApi* | [**patchDomainConfig**](docs/DefaultApi.md#patchDomainConfig) | **PATCH** /api/v1/domain-configs/{domainToUpdate} | *DefaultApi* | [**patchHashTag**](docs/DefaultApi.md#patchHashTag) | **PATCH** /api/v1/hash-tags/{tag} | *DefaultApi* | [**patchPage**](docs/DefaultApi.md#patchPage) | **PATCH** /api/v1/pages/{id} | +*DefaultApi* | [**patchPoll**](docs/DefaultApi.md#patchPoll) | **PATCH** /api/v1/polls/{commentId} | *DefaultApi* | [**patchSSOUser**](docs/DefaultApi.md#patchSSOUser) | **PATCH** /api/v1/sso-users/{id} | *DefaultApi* | [**putDomainConfig**](docs/DefaultApi.md#putDomainConfig) | **PUT** /api/v1/domain-configs/{domainToUpdate} | +*DefaultApi* | [**putPoll**](docs/DefaultApi.md#putPoll) | **PUT** /api/v1/polls/{commentId} | *DefaultApi* | [**putSSOUser**](docs/DefaultApi.md#putSSOUser) | **PUT** /api/v1/sso-users/{id} | *DefaultApi* | [**renderEmailTemplate**](docs/DefaultApi.md#renderEmailTemplate) | **POST** /api/v1/email-templates/render | *DefaultApi* | [**replaceTenantPackage**](docs/DefaultApi.md#replaceTenantPackage) | **PUT** /api/v1/tenant-packages/{id} | @@ -225,6 +244,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**sendLoginLink**](docs/DefaultApi.md#sendLoginLink) | **POST** /api/v1/tenant-users/{id}/send-login-link | *DefaultApi* | [**unBlockUserFromComment**](docs/DefaultApi.md#unBlockUserFromComment) | **POST** /api/v1/comments/{id}/un-block | *DefaultApi* | [**unFlagComment**](docs/DefaultApi.md#unFlagComment) | **POST** /api/v1/comments/{id}/un-flag | +*DefaultApi* | [**undoPageMigrations**](docs/DefaultApi.md#undoPageMigrations) | **POST** /api/v1/pages/migrations/{undoId}/undo | *DefaultApi* | [**updateComment**](docs/DefaultApi.md#updateComment) | **PATCH** /api/v1/comments/{id} | *DefaultApi* | [**updateEmailTemplate**](docs/DefaultApi.md#updateEmailTemplate) | **PATCH** /api/v1/email-templates/{id} | *DefaultApi* | [**updateFeedPost**](docs/DefaultApi.md#updateFeedPost) | **PATCH** /api/v1/feed-posts/{id} | @@ -323,6 +343,7 @@ Class | Method | HTTP request | Description *PublicApi* | [**resetUserNotifications**](docs/PublicApi.md#resetUserNotifications) | **POST** /user-notifications/reset | *PublicApi* | [**searchUsers**](docs/PublicApi.md#searchUsers) | **GET** /user-search/{tenantId} | *PublicApi* | [**setCommentText**](docs/PublicApi.md#setCommentText) | **POST** /comments/{tenantId}/{commentId}/update-text | +*PublicApi* | [**translateComments**](docs/PublicApi.md#translateComments) | **POST** /comments/{tenantId}/translations | *PublicApi* | [**unBlockCommentPublic**](docs/PublicApi.md#unBlockCommentPublic) | **DELETE** /block-from-comment/{commentId} | *PublicApi* | [**unLockComment**](docs/PublicApi.md#unLockComment) | **POST** /comments/{tenantId}/{commentId}/unlock | *PublicApi* | [**unPinComment**](docs/PublicApi.md#unPinComment) | **POST** /comments/{tenantId}/{commentId}/unpin | @@ -341,6 +362,8 @@ Class | Method | HTTP request | Description - [APIBanUserChangedValues](docs/APIBanUserChangedValues.md) - [APIBannedUser](docs/APIBannedUser.md) - [APIBannedUserWithMultiMatchInfo](docs/APIBannedUserWithMultiMatchInfo.md) + - [APIBatchJob](docs/APIBatchJob.md) + - [APIBatchJobPageMigrationResultsInner](docs/APIBatchJobPageMigrationResultsInner.md) - [APIComment](docs/APIComment.md) - [APICommentBase](docs/APICommentBase.md) - [APICommentBaseMeta](docs/APICommentBaseMeta.md) @@ -417,10 +440,22 @@ Class | Method | HTTP request | Description - [CommentLogData](docs/CommentLogData.md) - [CommentLogEntry](docs/CommentLogEntry.md) - [CommentLogType](docs/CommentLogType.md) + - [CommentPoll](docs/CommentPoll.md) + - [CommentPollInput](docs/CommentPollInput.md) + - [CommentPollOption](docs/CommentPollOption.md) + - [CommentPollOptionInput](docs/CommentPollOptionInput.md) + - [CommentPollPatch](docs/CommentPollPatch.md) + - [CommentPollPatchOptionsInner](docs/CommentPollPatchOptionsInner.md) + - [CommentPollPutInput](docs/CommentPollPutInput.md) - [CommentQuestionResultsRenderingType](docs/CommentQuestionResultsRenderingType.md) - [CommentQuestionsRequired](docs/CommentQuestionsRequired.md) - [CommentTextUpdateRequest](docs/CommentTextUpdateRequest.md) - [CommentThreadDeletionMode](docs/CommentThreadDeletionMode.md) + - [CommentTranslation](docs/CommentTranslation.md) + - [CommentTranslationMode](docs/CommentTranslationMode.md) + - [CommentTranslationPublic](docs/CommentTranslationPublic.md) + - [CommentTranslationsRequest](docs/CommentTranslationsRequest.md) + - [CommentTranslationsResponse](docs/CommentTranslationsResponse.md) - [CommentUserBadgeInfo](docs/CommentUserBadgeInfo.md) - [CommentUserHashTagInfo](docs/CommentUserHashTagInfo.md) - [CommentUserMentionInfo](docs/CommentUserMentionInfo.md) @@ -429,6 +464,8 @@ Class | Method | HTTP request | Description - [CreateAPIPageData](docs/CreateAPIPageData.md) - [CreateAPISSOUserData](docs/CreateAPISSOUserData.md) - [CreateAPIUserSubscriptionData](docs/CreateAPIUserSubscriptionData.md) + - [CreateAgentTenantBody](docs/CreateAgentTenantBody.md) + - [CreateAgentTenantResponse](docs/CreateAgentTenantResponse.md) - [CreateCommentParams](docs/CreateCommentParams.md) - [CreateEmailTemplateBody](docs/CreateEmailTemplateBody.md) - [CreateEmailTemplateResponse](docs/CreateEmailTemplateResponse.md) @@ -439,6 +476,8 @@ Class | Method | HTTP request | Description - [CreateHashTagResponse](docs/CreateHashTagResponse.md) - [CreateModeratorBody](docs/CreateModeratorBody.md) - [CreateModeratorResponse](docs/CreateModeratorResponse.md) + - [CreatePollVoteBody](docs/CreatePollVoteBody.md) + - [CreatePollVoteResponse](docs/CreatePollVoteResponse.md) - [CreateQuestionConfigBody](docs/CreateQuestionConfigBody.md) - [CreateQuestionConfigResponse](docs/CreateQuestionConfigResponse.md) - [CreateQuestionResultBody](docs/CreateQuestionResultBody.md) @@ -454,6 +493,8 @@ Class | Method | HTTP request | Description - [CreateTicketResponse](docs/CreateTicketResponse.md) - [CreateUserBadgeParams](docs/CreateUserBadgeParams.md) - [CreateV1PageReact](docs/CreateV1PageReact.md) + - [CreateWebhookParams](docs/CreateWebhookParams.md) + - [CreateWebhookResponse](docs/CreateWebhookResponse.md) - [CustomConfigParameters](docs/CustomConfigParameters.md) - [CustomEmailTemplate](docs/CustomEmailTemplate.md) - [DeleteCommentAction](docs/DeleteCommentAction.md) @@ -462,6 +503,7 @@ Class | Method | HTTP request | Description - [DeleteFeedPostPublicResponse](docs/DeleteFeedPostPublicResponse.md) - [DeleteHashTagRequestBody](docs/DeleteHashTagRequestBody.md) - [DeletePageAPIResponse](docs/DeletePageAPIResponse.md) + - [DeletePollVoteResponse](docs/DeletePollVoteResponse.md) - [DeleteSSOUserAPIResponse](docs/DeleteSSOUserAPIResponse.md) - [DeleteSubscriptionAPIResponse](docs/DeleteSubscriptionAPIResponse.md) - [DeletedCommentResultComment](docs/DeletedCommentResultComment.md) @@ -483,6 +525,8 @@ Class | Method | HTTP request | Description - [GetAuditLogsResponse](docs/GetAuditLogsResponse.md) - [GetBannedUsersCountResponse](docs/GetBannedUsersCountResponse.md) - [GetBannedUsersFromCommentResponse](docs/GetBannedUsersFromCommentResponse.md) + - [GetBatchJobAPIResponse](docs/GetBatchJobAPIResponse.md) + - [GetBatchJobsAPIResponse](docs/GetBatchJobsAPIResponse.md) - [GetCachedNotificationCountResponse](docs/GetCachedNotificationCountResponse.md) - [GetCommentBanStatusResponse](docs/GetCommentBanStatusResponse.md) - [GetCommentTextResponse](docs/GetCommentTextResponse.md) @@ -503,15 +547,21 @@ Class | Method | HTTP request | Description - [GetGifsSearchResponse](docs/GetGifsSearchResponse.md) - [GetGifsTrendingResponse](docs/GetGifsTrendingResponse.md) - [GetHashTagsResponse](docs/GetHashTagsResponse.md) + - [GetMeResponse](docs/GetMeResponse.md) - [GetModeratorResponse](docs/GetModeratorResponse.md) - [GetModeratorsResponse](docs/GetModeratorsResponse.md) - [GetMyNotificationsResponse](docs/GetMyNotificationsResponse.md) - [GetNotificationCountResponse](docs/GetNotificationCountResponse.md) - [GetNotificationsResponse](docs/GetNotificationsResponse.md) - [GetPageByURLIdAPIResponse](docs/GetPageByURLIdAPIResponse.md) + - [GetPageLikesAPIResponse](docs/GetPageLikesAPIResponse.md) + - [GetPageReactsAPIResponse](docs/GetPageReactsAPIResponse.md) - [GetPagesAPIResponse](docs/GetPagesAPIResponse.md) - [GetPendingWebhookEventCountResponse](docs/GetPendingWebhookEventCountResponse.md) - [GetPendingWebhookEventsResponse](docs/GetPendingWebhookEventsResponse.md) + - [GetPollResponse](docs/GetPollResponse.md) + - [GetPollVoteResponse](docs/GetPollVoteResponse.md) + - [GetPollVotesResponse](docs/GetPollVotesResponse.md) - [GetPublicFeedPostsResponse](docs/GetPublicFeedPostsResponse.md) - [GetPublicPagesResponse](docs/GetPublicPagesResponse.md) - [GetQuestionConfigResponse](docs/GetQuestionConfigResponse.md) @@ -545,6 +595,8 @@ Class | Method | HTTP request | Description - [GetV2PageReacts](docs/GetV2PageReacts.md) - [GetVotesForUserResponse](docs/GetVotesForUserResponse.md) - [GetVotesResponse](docs/GetVotesResponse.md) + - [GetWebhookSamplePayloadsResponse](docs/GetWebhookSamplePayloadsResponse.md) + - [GetWebhooksResponse](docs/GetWebhooksResponse.md) - [GifGetLargeResponse](docs/GifGetLargeResponse.md) - [GifRating](docs/GifRating.md) - [GifSearchInternalError](docs/GifSearchInternalError.md) @@ -559,9 +611,11 @@ Class | Method | HTTP request | Description - [LiveEvent](docs/LiveEvent.md) - [LiveEventExtraInfo](docs/LiveEventExtraInfo.md) - [LiveEventType](docs/LiveEventType.md) + - [MeAuthType](docs/MeAuthType.md) - [MediaAsset](docs/MediaAsset.md) - [MentionAutoCompleteMode](docs/MentionAutoCompleteMode.md) - [MetaItem](docs/MetaItem.md) + - [MigrateAPIPagesData](docs/MigrateAPIPagesData.md) - [ModerationAPIChildCommentsResponse](docs/ModerationAPIChildCommentsResponse.md) - [ModerationAPIComment](docs/ModerationAPIComment.md) - [ModerationAPICommentLog](docs/ModerationAPICommentLog.md) @@ -584,7 +638,17 @@ Class | Method | HTTP request | Description - [Moderator](docs/Moderator.md) - [NotificationAndCount](docs/NotificationAndCount.md) - [NotificationObjectType](docs/NotificationObjectType.md) + - [NotificationSkipReason](docs/NotificationSkipReason.md) - [NotificationType](docs/NotificationType.md) + - [OAuthScope](docs/OAuthScope.md) + - [PageCustomReactUser](docs/PageCustomReactUser.md) + - [PageMigration](docs/PageMigration.md) + - [PageMigrationFailure](docs/PageMigrationFailure.md) + - [PageMigrationSuccess](docs/PageMigrationSuccess.md) + - [PageMigrationType](docs/PageMigrationType.md) + - [PageMigrationUndoCounts](docs/PageMigrationUndoCounts.md) + - [PageReactIncludeUserInfo](docs/PageReactIncludeUserInfo.md) + - [PageReactUser](docs/PageReactUser.md) - [PageUserEntry](docs/PageUserEntry.md) - [PageUsersInfoResponse](docs/PageUsersInfoResponse.md) - [PageUsersOfflineResponse](docs/PageUsersOfflineResponse.md) @@ -595,6 +659,10 @@ Class | Method | HTTP request | Description - [PatchPageAPIResponse](docs/PatchPageAPIResponse.md) - [PatchSSOUserAPIResponse](docs/PatchSSOUserAPIResponse.md) - [PendingCommentToSyncOutbound](docs/PendingCommentToSyncOutbound.md) + - [PickCommentPollOptionsOrTotalVotesOrClosesAt](docs/PickCommentPollOptionsOrTotalVotesOrClosesAt.md) + - [PollCreationMode](docs/PollCreationMode.md) + - [PollPrivacy](docs/PollPrivacy.md) + - [PollVotingMode](docs/PollVotingMode.md) - [PostRemoveCommentApiResponse](docs/PostRemoveCommentApiResponse.md) - [PreBanSummary](docs/PreBanSummary.md) - [PubSubComment](docs/PubSubComment.md) @@ -608,11 +676,15 @@ Class | Method | HTTP request | Description - [PublicCommentBase](docs/PublicCommentBase.md) - [PublicFeedPostsResponse](docs/PublicFeedPostsResponse.md) - [PublicPage](docs/PublicPage.md) + - [PublicPollVote](docs/PublicPollVote.md) - [PublicVote](docs/PublicVote.md) + - [PublicWebhook](docs/PublicWebhook.md) - [PutDomainConfigResponse](docs/PutDomainConfigResponse.md) - [PutSSOUserAPIResponse](docs/PutSSOUserAPIResponse.md) - [QueryPredicate](docs/QueryPredicate.md) - [QueryPredicateValue](docs/QueryPredicateValue.md) + - [QuestionCondition](docs/QuestionCondition.md) + - [QuestionConditionOperator](docs/QuestionConditionOperator.md) - [QuestionConfig](docs/QuestionConfig.md) - [QuestionConfigCustomOptionsInner](docs/QuestionConfigCustomOptionsInner.md) - [QuestionDatum](docs/QuestionDatum.md) @@ -621,9 +693,11 @@ Class | Method | HTTP request | Description - [QuestionResultAggregationOverall](docs/QuestionResultAggregationOverall.md) - [QuestionSubQuestionVisibility](docs/QuestionSubQuestionVisibility.md) - [QuestionWhenSave](docs/QuestionWhenSave.md) + - [QueuePageMigrationJobAPIResponse](docs/QueuePageMigrationJobAPIResponse.md) - [ReactBodyParams](docs/ReactBodyParams.md) - [ReactFeedPostResponse](docs/ReactFeedPostResponse.md) - [RecordStringBeforeStringOrNullAfterStringOrNullValue](docs/RecordStringBeforeStringOrNullAfterStringOrNullValue.md) + - [RecordStringStringOrNumberOrNumberArrayValue](docs/RecordStringStringOrNumberOrNumberArrayValue.md) - [RemoveCommentActionResponse](docs/RemoveCommentActionResponse.md) - [RemoveUserBadgeResponse](docs/RemoveUserBadgeResponse.md) - [RenderEmailTemplateBody](docs/RenderEmailTemplateBody.md) @@ -639,6 +713,7 @@ Class | Method | HTTP request | Description - [SaveCommentResponseOptimized](docs/SaveCommentResponseOptimized.md) - [SaveCommentsBulkResponse](docs/SaveCommentsBulkResponse.md) - [SaveCommentsResponseWithPresence](docs/SaveCommentsResponseWithPresence.md) + - [SavePollResponse](docs/SavePollResponse.md) - [SearchUsersResponse](docs/SearchUsersResponse.md) - [SearchUsersResult](docs/SearchUsersResult.md) - [SearchUsersSectionedResponse](docs/SearchUsersSectionedResponse.md) @@ -650,6 +725,7 @@ Class | Method | HTTP request | Description - [SizePreset](docs/SizePreset.md) - [SortDirections](docs/SortDirections.md) - [SpamRule](docs/SpamRule.md) + - [SubQuestionCondition](docs/SubQuestionCondition.md) - [TOSConfig](docs/TOSConfig.md) - [TenantBadge](docs/TenantBadge.md) - [TenantHashTag](docs/TenantHashTag.md) @@ -696,6 +772,10 @@ Class | Method | HTTP request | Description - [VoteResponse](docs/VoteResponse.md) - [VoteResponseUser](docs/VoteResponseUser.md) - [VoteStyle](docs/VoteStyle.md) + - [WebhookComment](docs/WebhookComment.md) + - [WebhookEventName](docs/WebhookEventName.md) + - [WebhookHTTPMethod](docs/WebhookHTTPMethod.md) + - [WebhookSource](docs/WebhookSource.md) diff --git a/client/api/openapi.yaml b/client/api/openapi.yaml index 19a5ed7c..102d1d87 100644 --- a/client/api/openapi.yaml +++ b/client/api/openapi.yaml @@ -953,6 +953,13 @@ paths: schema: type: string style: form + - explode: true + in: query + name: sso + required: false + schema: + type: string + style: form responses: "200": content: @@ -988,6 +995,22 @@ paths: schema: type: string style: form + - explode: true + in: query + name: sso + required: false + schema: + type: string + style: form + - description: "When set, returns the users who liked the page (avatars and\ + \ usernames). Only \"public\" is accepted, which omits private profiles." + explode: true + in: query + name: includeUserInfo + required: false + schema: + $ref: "#/components/schemas/PageReactIncludeUserInfo" + style: form responses: "200": content: @@ -1030,6 +1053,13 @@ paths: schema: type: string style: form + - explode: true + in: query + name: sso + required: false + schema: + type: string + style: form responses: "200": content: @@ -1073,6 +1103,13 @@ paths: schema: type: string style: form + - explode: true + in: query + name: sso + required: false + schema: + type: string + style: form responses: "200": content: @@ -1116,6 +1153,13 @@ paths: schema: type: string style: form + - explode: true + in: query + name: sso + required: false + schema: + type: string + style: form responses: "200": content: @@ -1151,6 +1195,22 @@ paths: schema: type: string style: form + - explode: true + in: query + name: sso + required: false + schema: + type: string + style: form + - description: "When set, returns the users for each react id (avatars and usernames).\ + \ Only \"public\" is accepted, which omits private profiles." + explode: true + in: query + name: includeUserInfo + required: false + schema: + $ref: "#/components/schemas/PageReactIncludeUserInfo" + style: form responses: "200": content: @@ -1200,6 +1260,13 @@ paths: schema: type: string style: form + - explode: true + in: query + name: sso + required: false + schema: + type: string + style: form responses: "200": content: @@ -4621,6 +4688,21 @@ paths: schema: type: string style: form + - explode: true + in: query + name: questionId + required: false + schema: + type: string + style: form + - explode: true + in: query + name: questionValue + required: false + schema: + format: int32 + type: integer + style: form responses: "200": content: @@ -4677,6 +4759,13 @@ paths: schema: type: string style: form + - explode: true + in: query + name: locale + required: false + schema: + type: string + style: form requestBody: content: application/json: @@ -4996,6 +5085,66 @@ paths: - Public x-accepts: - application/json + /comments/{tenantId}/translations: + post: + description: |- + Translates the given comments into the widget locale. Only available when the matching widget + customization rule has Comment Translation set to Automatic or Manual. + operationId: TranslateComments + parameters: + - explode: false + in: path + name: tenantId + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: urlId + required: true + schema: + type: string + style: form + - explode: true + in: query + name: sso + required: false + schema: + type: string + style: form + - explode: true + in: query + name: locale + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CommentTranslationsRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CommentTranslationsResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: [] + tags: + - Public + x-content-type: application/json + x-accepts: + - application/json /comments/{tenantId}/{commentId}/pin: post: operationId: PinComment @@ -5768,9 +5917,10 @@ paths: - api_key: [] x-accepts: - application/json - /api/v1/pages/{id}: - delete: - operationId: DeletePage + /api/v1/pages/likes: + get: + description: "Like count for a page, optionally with the users who liked it." + operationId: GetPageLikes parameters: - explode: true in: query @@ -5779,26 +5929,38 @@ paths: schema: type: string style: form - - explode: false - in: path - name: id + - explode: true + in: query + name: urlId required: true schema: type: string - style: simple + style: form + - description: "\"public\" omits users with private profiles, \"include-private\"\ + \ includes them." + explode: true + in: query + name: includeUserInfo + required: false + schema: + $ref: "#/components/schemas/PageReactIncludeUserInfo" + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/DeletePageAPIResponse" + $ref: "#/components/schemas/GetPageLikesAPIResponse" description: Ok security: - api_key: [] x-accepts: - application/json - patch: - operationId: PatchPage + /api/v1/pages/reacts: + get: + description: "Custom react counts for a page, optionally with the users who\ + \ reacted." + operationId: GetPageReacts parameters: - explode: true in: query @@ -5807,34 +5969,40 @@ paths: schema: type: string style: form - - explode: false - in: path - name: id + - explode: true + in: query + name: urlId required: true schema: type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateAPIPageData" - required: true + style: form + - description: "\"public\" omits users with private profiles, \"include-private\"\ + \ includes them." + explode: true + in: query + name: includeUserInfo + required: false + schema: + $ref: "#/components/schemas/PageReactIncludeUserInfo" + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PatchPageAPIResponse" + $ref: "#/components/schemas/GetPageReactsAPIResponse" description: Ok security: - api_key: [] - x-content-type: application/json x-accepts: - application/json - /api/v1/votes: - get: - operationId: GetVotes + /api/v1/pages/migrations: + post: + description: |- + Queues a batch job that moves comments, pages and related records from one urlId or domain to another. + "urlId" migrations only match the exact urlId. "domain" migrations find/replace the value inside every urlId and url. + Poll GET /api/v1/batch-jobs/{batchJobId}: once it is done it carries per-migration results and an undoId. + operationId: MigratePages parameters: - explode: true in: query @@ -5843,32 +6011,31 @@ paths: schema: type: string style: form - - explode: true - in: query - name: urlId + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MigrateAPIPagesData" required: true - schema: - type: string - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetVotesResponse" + $ref: "#/components/schemas/QueuePageMigrationJobAPIResponse" description: Ok - default: - content: - application/json: - schema: - $ref: "#/components/schemas/APIError" - description: Error security: - api_key: [] + x-content-type: application/json x-accepts: - application/json + /api/v1/pages/migrations/{undoId}/undo: post: - operationId: CreateVote + description: |- + Queues a batch job that reverses every migration from one migrate-pages job, newest first. Available for 90 days. + Records changed since the migration are left alone, so a later edit is never overwritten. + Poll GET /api/v1/batch-jobs/{batchJobId} for the restored/skipped counts. + operationId: UndoPageMigrations parameters: - explode: true in: query @@ -5877,57 +6044,27 @@ paths: schema: type: string style: form - - explode: true - in: query - name: commentId - required: true - schema: - type: string - style: form - - explode: true - in: query - name: direction + - explode: false + in: path + name: undoId required: true - schema: - enum: - - up - - down - type: string - style: form - - explode: true - in: query - name: userId - required: false - schema: - type: string - style: form - - explode: true - in: query - name: anonUserId - required: false schema: type: string - style: form + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/VoteResponse" + $ref: "#/components/schemas/QueuePageMigrationJobAPIResponse" description: Ok - default: - content: - application/json: - schema: - $ref: "#/components/schemas/APIError" - description: Error security: - api_key: [] x-accepts: - application/json - /api/v1/votes/for-user: - get: - operationId: GetVotesForUser + /api/v1/pages/{id}: + delete: + operationId: DeletePage parameters: - explode: true in: query @@ -5936,47 +6073,64 @@ paths: schema: type: string style: form - - explode: true - in: query - name: urlId + - explode: false + in: path + name: id required: true schema: type: string - style: form + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeletePageAPIResponse" + description: Ok + security: + - api_key: [] + x-accepts: + - application/json + patch: + operationId: PatchPage + parameters: - explode: true in: query - name: userId - required: false + name: tenantId + required: true schema: type: string style: form - - explode: true - in: query - name: anonUserId - required: false + - explode: false + in: path + name: id + required: true schema: type: string - style: form + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateAPIPageData" + required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetVotesForUserResponse" + $ref: "#/components/schemas/PatchPageAPIResponse" description: Ok - default: - content: - application/json: - schema: - $ref: "#/components/schemas/APIError" - description: Error security: - api_key: [] + x-content-type: application/json x-accepts: - application/json - /api/v1/votes/{id}: - delete: - operationId: DeleteVote + /api/v1/webhooks: + get: + description: "Lists the webhooks configured for the tenant, both dashboard-managed\ + \ rows and API subscriptions." + operationId: GetWebhooks parameters: - explode: true in: query @@ -5985,26 +6139,41 @@ paths: schema: type: string style: form - - explode: false - in: path - name: id - required: true + - explode: true + in: query + name: event + required: false schema: - type: string - style: simple + $ref: "#/components/schemas/WebhookEventName" + style: form - explode: true in: query - name: editKey + name: domain required: false schema: type: string style: form + - explode: true + in: query + name: source + required: false + schema: + $ref: "#/components/schemas/WebhookSource" + style: form + - explode: true + in: query + name: skip + required: false + schema: + format: double + type: number + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/VoteDeleteResponse" + $ref: "#/components/schemas/GetWebhooksResponse" description: Ok default: content: @@ -6016,9 +6185,12 @@ paths: - api_key: [] x-accepts: - application/json - /api/v1/users/{id}: - get: - operationId: GetUser + post: + description: |- + Subscribes a URL to a comment event (REST hook subscribe). Subscribing the same URL to the same + event and domain again returns the existing subscription. Deliveries are HMAC signed, see the + webhooks guide; the legacy `token` header is never sent to API subscriptions. + operationId: CreateWebhook parameters: - explode: true in: query @@ -6027,19 +6199,18 @@ paths: schema: type: string style: form - - explode: false - in: path - name: id + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateWebhookParams" required: true - schema: - type: string - style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetUserResponse" + $ref: "#/components/schemas/CreateWebhookResponse" description: Ok default: content: @@ -6049,11 +6220,15 @@ paths: description: Error security: - api_key: [] + x-content-type: application/json x-accepts: - application/json - /api/v1/user-badges/{id}: - delete: - operationId: DeleteUserBadge + /api/v1/webhooks/sample-payloads: + get: + description: |- + Recent comments in exactly the shape webhook deliveries use, for building integrations (for example Zapier + sample data). Every event delivers the same comment object, so `event` only has to be valid. + operationId: GetWebhookSamplePayloads parameters: - explode: true in: query @@ -6062,19 +6237,27 @@ paths: schema: type: string style: form - - explode: false - in: path - name: id - required: true + - explode: true + in: query + name: event + required: false schema: - type: string - style: simple + $ref: "#/components/schemas/WebhookEventName" + style: form + - explode: true + in: query + name: limit + required: false + schema: + format: double + type: number + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/APIEmptySuccessResponse" + $ref: "#/components/schemas/GetWebhookSamplePayloadsResponse" description: Ok default: content: @@ -6086,8 +6269,12 @@ paths: - api_key: [] x-accepts: - application/json - get: - operationId: GetUserBadge + /api/v1/webhooks/{id}: + delete: + description: |- + Unsubscribes (REST hook unsubscribe). Only subscriptions created through this API can be + deleted here; dashboard-managed webhooks are edited in the dashboard. + operationId: DeleteWebhook parameters: - explode: true in: query @@ -6108,7 +6295,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/APIGetUserBadgeResponse" + $ref: "#/components/schemas/APIEmptyResponse" description: Ok default: content: @@ -6120,8 +6307,9 @@ paths: - api_key: [] x-accepts: - application/json - put: - operationId: UpdateUserBadge + /api/v1/votes: + get: + operationId: GetVotes parameters: - explode: true in: query @@ -6130,25 +6318,19 @@ paths: schema: type: string style: form - - explode: false - in: path - name: id + - explode: true + in: query + name: urlId required: true schema: type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateUserBadgeParams" - required: true + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/APIEmptySuccessResponse" + $ref: "#/components/schemas/GetVotesResponse" description: Ok default: content: @@ -6158,12 +6340,10 @@ paths: description: Error security: - api_key: [] - x-content-type: application/json x-accepts: - application/json - /api/v1/user-badges: - get: - operationId: GetUserBadges + post: + operationId: CreateVote parameters: - explode: true in: query @@ -6172,6 +6352,23 @@ paths: schema: type: string style: form + - explode: true + in: query + name: commentId + required: true + schema: + type: string + style: form + - explode: true + in: query + name: direction + required: true + schema: + enum: + - up + - down + type: string + style: form - explode: true in: query name: userId @@ -6181,48 +6378,66 @@ paths: style: form - explode: true in: query - name: badgeId + name: anonUserId required: false schema: type: string style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VoteResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + /api/v1/votes/for-user: + get: + operationId: GetVotesForUser + parameters: - explode: true in: query - name: type - required: false + name: tenantId + required: true schema: - format: double - type: number + type: string style: form - explode: true in: query - name: displayedOnComments - required: false + name: urlId + required: true schema: - type: boolean + type: string style: form - explode: true in: query - name: limit + name: userId required: false schema: - format: double - type: number + type: string style: form - explode: true in: query - name: skip + name: anonUserId required: false schema: - format: double - type: number + type: string style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/APIGetUserBadgesResponse" + $ref: "#/components/schemas/GetVotesForUserResponse" description: Ok default: content: @@ -6234,8 +6449,9 @@ paths: - api_key: [] x-accepts: - application/json - post: - operationId: CreateUserBadge + /api/v1/votes/{id}: + delete: + operationId: DeleteVote parameters: - explode: true in: query @@ -6244,18 +6460,26 @@ paths: schema: type: string style: form - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateUserBadgeParams" + - explode: false + in: path + name: id required: true + schema: + type: string + style: simple + - explode: true + in: query + name: editKey + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/APICreateUserBadgeResponse" + $ref: "#/components/schemas/VoteDeleteResponse" description: Ok default: content: @@ -6265,12 +6489,11 @@ paths: description: Error security: - api_key: [] - x-content-type: application/json x-accepts: - application/json - /api/v1/user-badge-progress/{id}: + /api/v1/users/{id}: get: - operationId: GetUserBadgeProgressById + operationId: GetUser parameters: - explode: true in: query @@ -6291,7 +6514,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/APIGetUserBadgeProgressResponse" + $ref: "#/components/schemas/GetUserResponse" description: Ok default: content: @@ -6303,9 +6526,9 @@ paths: - api_key: [] x-accepts: - application/json - /api/v1/user-badge-progress: - get: - operationId: GetUserBadgeProgressList + /api/v1/user-badges/{id}: + delete: + operationId: DeleteUserBadge parameters: - explode: true in: query @@ -6314,35 +6537,53 @@ paths: schema: type: string style: form - - explode: true - in: query - name: userId - required: false - schema: + - explode: false + in: path + name: id + required: true + schema: type: string - style: form + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/APIEmptySuccessResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + get: + operationId: GetUserBadge + parameters: - explode: true in: query - name: limit - required: false + name: tenantId + required: true schema: - format: double - type: number + type: string style: form - - explode: true - in: query - name: skip - required: false + - explode: false + in: path + name: id + required: true schema: - format: double - type: number - style: form + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/APIGetUserBadgeProgressListResponse" + $ref: "#/components/schemas/APIGetUserBadgeResponse" description: Ok default: content: @@ -6354,9 +6595,8 @@ paths: - api_key: [] x-accepts: - application/json - /api/v1/user-badge-progress/user/{userId}: - get: - operationId: GetUserBadgeProgressByUserId + put: + operationId: UpdateUserBadge parameters: - explode: true in: query @@ -6367,17 +6607,23 @@ paths: style: form - explode: false in: path - name: userId + name: id required: true schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateUserBadgeParams" + required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/APIGetUserBadgeProgressResponse" + $ref: "#/components/schemas/APIEmptySuccessResponse" description: Ok default: content: @@ -6387,11 +6633,12 @@ paths: description: Error security: - api_key: [] + x-content-type: application/json x-accepts: - application/json - /api/v1/tickets: + /api/v1/user-badges: get: - operationId: GetTickets + operationId: GetUserBadges parameters: - explode: true in: query @@ -6409,7 +6656,14 @@ paths: style: form - explode: true in: query - name: state + name: badgeId + required: false + schema: + type: string + style: form + - explode: true + in: query + name: type required: false schema: format: double @@ -6417,7 +6671,14 @@ paths: style: form - explode: true in: query - name: skip + name: displayedOnComments + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: limit required: false schema: format: double @@ -6425,7 +6686,7 @@ paths: style: form - explode: true in: query - name: limit + name: skip required: false schema: format: double @@ -6436,7 +6697,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/GetTicketsResponse" + $ref: "#/components/schemas/APIGetUserBadgesResponse" description: Ok default: content: @@ -6449,7 +6710,7 @@ paths: x-accepts: - application/json post: - operationId: CreateTicket + operationId: CreateUserBadge parameters: - explode: true in: query @@ -6458,25 +6719,18 @@ paths: schema: type: string style: form - - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form requestBody: content: application/json: schema: - $ref: "#/components/schemas/CreateTicketBody" + $ref: "#/components/schemas/CreateUserBadgeParams" required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/CreateTicketResponse" + $ref: "#/components/schemas/APICreateUserBadgeResponse" description: Ok default: content: @@ -6489,9 +6743,9 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/v1/tickets/{id}: + /api/v1/user-badge-progress/{id}: get: - operationId: GetTicket + operationId: GetUserBadgeProgressById parameters: - explode: true in: query @@ -6507,19 +6761,12 @@ paths: schema: type: string style: simple - - explode: true - in: query - name: userId - required: false - schema: - type: string - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetTicketResponse" + $ref: "#/components/schemas/APIGetUserBadgeProgressResponse" description: Ok default: content: @@ -6531,9 +6778,9 @@ paths: - api_key: [] x-accepts: - application/json - /api/v1/tickets/{id}/state: - patch: - operationId: ChangeTicketState + /api/v1/user-badge-progress: + get: + operationId: GetUserBadgeProgressList parameters: - explode: true in: query @@ -6545,29 +6792,32 @@ paths: - explode: true in: query name: userId - required: true + required: false schema: type: string style: form - - explode: false - in: path - name: id - required: true + - explode: true + in: query + name: limit + required: false schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ChangeTicketStateBody" - required: true + format: double + type: number + style: form + - explode: true + in: query + name: skip + required: false + schema: + format: double + type: number + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ChangeTicketStateResponse" + $ref: "#/components/schemas/APIGetUserBadgeProgressListResponse" description: Ok default: content: @@ -6577,12 +6827,11 @@ paths: description: Error security: - api_key: [] - x-content-type: application/json x-accepts: - application/json - /api/v1/tenants/{id}: - delete: - operationId: DeleteTenant + /api/v1/user-badge-progress/user/{userId}: + get: + operationId: GetUserBadgeProgressByUserId parameters: - explode: true in: query @@ -6593,24 +6842,17 @@ paths: style: form - explode: false in: path - name: id + name: userId required: true schema: type: string style: simple - - explode: true - in: query - name: sure - required: false - schema: - type: string - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/APIEmptyResponse" + $ref: "#/components/schemas/APIGetUserBadgeProgressResponse" description: Ok default: content: @@ -6622,8 +6864,9 @@ paths: - api_key: [] x-accepts: - application/json + /api/v1/tickets: get: - operationId: GetTenant + operationId: GetTickets parameters: - explode: true in: query @@ -6632,19 +6875,43 @@ paths: schema: type: string style: form - - explode: false - in: path - name: id - required: true + - explode: true + in: query + name: userId + required: false schema: type: string - style: simple + style: form + - explode: true + in: query + name: state + required: false + schema: + format: double + type: number + style: form + - explode: true + in: query + name: skip + required: false + schema: + format: double + type: number + style: form + - explode: true + in: query + name: limit + required: false + schema: + format: double + type: number + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetTenantResponse" + $ref: "#/components/schemas/GetTicketsResponse" description: Ok default: content: @@ -6656,8 +6923,8 @@ paths: - api_key: [] x-accepts: - application/json - patch: - operationId: UpdateTenant + post: + operationId: CreateTicket parameters: - explode: true in: query @@ -6666,25 +6933,25 @@ paths: schema: type: string style: form - - explode: false - in: path - name: id + - explode: true + in: query + name: userId required: true schema: type: string - style: simple + style: form requestBody: content: application/json: schema: - $ref: "#/components/schemas/UpdateTenantBody" + $ref: "#/components/schemas/CreateTicketBody" required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/APIEmptyResponse" + $ref: "#/components/schemas/CreateTicketResponse" description: Ok default: content: @@ -6697,9 +6964,9 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/v1/tenants: + /api/v1/tickets/{id}: get: - operationId: GetTenants + operationId: GetTicket parameters: - explode: true in: query @@ -6708,27 +6975,26 @@ paths: schema: type: string style: form - - explode: true - in: query - name: meta - required: false + - explode: false + in: path + name: id + required: true schema: type: string - style: form + style: simple - explode: true in: query - name: skip + name: userId required: false schema: - format: double - type: number + type: string style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetTenantsResponse" + $ref: "#/components/schemas/GetTicketResponse" description: Ok default: content: @@ -6740,8 +7006,9 @@ paths: - api_key: [] x-accepts: - application/json - post: - operationId: CreateTenant + /api/v1/tickets/{id}/state: + patch: + operationId: ChangeTicketState parameters: - explode: true in: query @@ -6750,9 +7017,217 @@ paths: schema: type: string style: form - requestBody: - content: - application/json: + - explode: true + in: query + name: userId + required: true + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChangeTicketStateBody" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ChangeTicketStateResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-content-type: application/json + x-accepts: + - application/json + /api/v1/tenants/{id}: + delete: + operationId: DeleteTenant + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: sure + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/APIEmptyResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + get: + operationId: GetTenant + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetTenantResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + patch: + operationId: UpdateTenant + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateTenantBody" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/APIEmptyResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-content-type: application/json + x-accepts: + - application/json + /api/v1/tenants: + get: + operationId: GetTenants + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + - explode: true + in: query + name: meta + required: false + schema: + type: string + style: form + - explode: true + in: query + name: skip + required: false + schema: + format: double + type: number + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetTenantsResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + post: + operationId: CreateTenant + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + requestBody: + content: + application/json: schema: $ref: "#/components/schemas/CreateTenantBody" required: true @@ -7946,9 +8421,11 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/v1/pending-webhook-events: - get: - operationId: GetPendingWebhookEvents + /api/v1/polls/{commentId}: + delete: + description: "Remove a poll from its comment, along with every vote cast on\ + \ it. The comment itself is left alone." + operationId: DeletePoll parameters: - explode: true in: query @@ -7957,63 +8434,152 @@ paths: schema: type: string style: form - - explode: true - in: query + - explode: false + in: path name: commentId - required: false + required: true schema: type: string - style: form + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/APIEmptyResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + get: + operationId: GetPoll + parameters: - explode: true in: query - name: externalId - required: false + name: tenantId + required: true schema: type: string style: form - - explode: true - in: query - name: eventType - required: false + - explode: false + in: path + name: commentId + required: true schema: type: string - style: form - - explode: true + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetPollResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + patch: + description: |- + Edit a poll in place, keeping its tallies: change the question, relabel an option, close or reopen it, + or change who may see the voters. Options are addressed by id - to add, remove or reorder them, PUT the full list. + operationId: PatchPoll + parameters: + - explode: true in: query - name: type - required: false + name: tenantId + required: true schema: type: string style: form - - explode: true - in: query - name: domain - required: false + - explode: false + in: path + name: commentId + required: true schema: type: string - style: form + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CommentPollPatch" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SavePollResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-content-type: application/json + x-accepts: + - application/json + put: + description: |- + Attach a poll to a comment, or set the full state of the poll it already has. + + Options are matched by id: an option sent with the id of an existing option keeps its votes (and takes the + new label and position), an option sent without an id is added, and existing options left out of the list + are removed along with the votes cast on them. + + Keeping no existing option ids on a poll that has votes deletes all of them, so that needs replaceVotes=true. + operationId: PutPoll + parameters: - explode: true in: query - name: attemptCountGT - required: false + name: tenantId + required: true schema: - format: double - type: number + type: string style: form + - explode: false + in: path + name: commentId + required: true + schema: + type: string + style: simple - explode: true in: query - name: skip + name: replaceVotes required: false schema: - format: double - type: number + type: boolean style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CommentPollPutInput" + required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetPendingWebhookEventsResponse" + $ref: "#/components/schemas/SavePollResponse" description: Ok default: content: @@ -8023,11 +8589,19 @@ paths: description: Error security: - api_key: [] + x-content-type: application/json x-accepts: - application/json - /api/v1/pending-webhook-events/count: + /api/v1/poll-votes: get: - operationId: GetPendingWebhookEventCount + description: |- + The individual votes behind one poll's tallies, oldest first. + + A poll belongs to a comment, so votes are always read one poll at a time - commentId is required. That + keeps every query on the indexes the collection already has. + + Obeys the poll's privacy: an anonymous poll's votes cannot be read (poll-anonymous), here or by id. + operationId: GetPollVotes parameters: - explode: true in: query @@ -8039,52 +8613,114 @@ paths: - explode: true in: query name: commentId - required: false + required: true schema: type: string style: form - explode: true in: query - name: externalId + name: voterId required: false schema: type: string style: form - explode: true in: query - name: eventType + name: optionId required: false schema: type: string style: form - explode: true in: query - name: type + name: skip required: false schema: - type: string + format: int32 + type: integer style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetPollVotesResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + post: + description: |- + Record a vote on a poll, or move an existing one to a different option. A voter has at most one vote per + poll, so calling this again for the same voter moves their vote rather than adding one. + + This obeys the site's poll settings: if voting is set to logged-in users only, a vote with just an + anonUserId is rejected, and anonymous votes are rate limited per IP per poll. + operationId: CreatePollVote + parameters: - explode: true in: query - name: domain - required: false + name: tenantId + required: true schema: type: string style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreatePollVoteBody" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CreatePollVoteResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-content-type: application/json + x-accepts: + - application/json + /api/v1/poll-votes/{id}: + delete: + description: Retract a vote. The option it was cast on gives its tally back. + operationId: DeletePollVote + parameters: - explode: true in: query - name: attemptCountGT - required: false + name: tenantId + required: true schema: - format: double - type: number + type: string style: form + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetPendingWebhookEventCountResponse" + $ref: "#/components/schemas/DeletePollVoteResponse" description: Ok default: content: @@ -8096,9 +8732,8 @@ paths: - api_key: [] x-accepts: - application/json - /api/v1/pending-webhook-events/{id}: - delete: - operationId: DeletePendingWebhookEvent + get: + operationId: GetPollVote parameters: - explode: true in: query @@ -8119,7 +8754,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/APIEmptyResponse" + $ref: "#/components/schemas/GetPollVoteResponse" description: Ok default: content: @@ -8131,9 +8766,9 @@ paths: - api_key: [] x-accepts: - application/json - /api/v1/notifications: + /api/v1/pending-webhook-events: get: - operationId: GetNotifications + operationId: GetPendingWebhookEvents parameters: - explode: true in: query @@ -8144,39 +8779,47 @@ paths: style: form - explode: true in: query - name: userId + name: commentId required: false schema: type: string style: form - explode: true in: query - name: urlId + name: externalId required: false schema: type: string style: form - explode: true in: query - name: fromCommentId + name: eventType required: false schema: type: string style: form - explode: true in: query - name: viewed + name: type required: false schema: - type: boolean + type: string style: form - explode: true in: query - name: type + name: domain required: false schema: type: string style: form + - explode: true + in: query + name: attemptCountGT + required: false + schema: + format: double + type: number + style: form - explode: true in: query name: skip @@ -8190,7 +8833,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/GetNotificationsResponse" + $ref: "#/components/schemas/GetPendingWebhookEventsResponse" description: Ok default: content: @@ -8202,9 +8845,9 @@ paths: - api_key: [] x-accepts: - application/json - /api/v1/notifications/count: + /api/v1/pending-webhook-events/count: get: - operationId: GetNotificationCount + operationId: GetPendingWebhookEventCount parameters: - explode: true in: query @@ -8215,45 +8858,53 @@ paths: style: form - explode: true in: query - name: userId + name: commentId required: false schema: type: string style: form - explode: true in: query - name: urlId + name: externalId required: false schema: type: string style: form - explode: true in: query - name: fromCommentId + name: eventType required: false schema: type: string style: form - explode: true in: query - name: viewed + name: type required: false schema: - type: boolean + type: string style: form - explode: true in: query - name: type + name: domain required: false schema: type: string style: form + - explode: true + in: query + name: attemptCountGT + required: false + schema: + format: double + type: number + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetNotificationCountResponse" + $ref: "#/components/schemas/GetPendingWebhookEventCountResponse" description: Ok default: content: @@ -8265,9 +8916,9 @@ paths: - api_key: [] x-accepts: - application/json - /api/v1/notifications/{id}: - patch: - operationId: UpdateNotification + /api/v1/pending-webhook-events/{id}: + delete: + operationId: DeletePendingWebhookEvent parameters: - explode: true in: query @@ -8283,19 +8934,6 @@ paths: schema: type: string style: simple - - explode: true - in: query - name: userId - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateNotificationBody" - required: true responses: "200": content: @@ -8311,12 +8949,11 @@ paths: description: Error security: - api_key: [] - x-content-type: application/json x-accepts: - application/json - /api/v1/notification-count/{id}: - delete: - operationId: DeleteNotificationCount + /api/v1/notifications: + get: + operationId: GetNotifications parameters: - explode: true in: query @@ -8325,13 +8962,196 @@ paths: schema: type: string style: form - - explode: false - in: path - name: id - required: true + - explode: true + in: query + name: userId + required: false schema: type: string - style: simple + style: form + - explode: true + in: query + name: urlId + required: false + schema: + type: string + style: form + - explode: true + in: query + name: fromCommentId + required: false + schema: + type: string + style: form + - explode: true + in: query + name: viewed + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: type + required: false + schema: + type: string + style: form + - explode: true + in: query + name: skip + required: false + schema: + format: double + type: number + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetNotificationsResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + /api/v1/notifications/count: + get: + operationId: GetNotificationCount + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + - explode: true + in: query + name: userId + required: false + schema: + type: string + style: form + - explode: true + in: query + name: urlId + required: false + schema: + type: string + style: form + - explode: true + in: query + name: fromCommentId + required: false + schema: + type: string + style: form + - explode: true + in: query + name: viewed + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: type + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetNotificationCountResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + /api/v1/notifications/{id}: + patch: + operationId: UpdateNotification + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: userId + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateNotificationBody" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/APIEmptyResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-content-type: application/json + x-accepts: + - application/json + /api/v1/notification-count/{id}: + delete: + operationId: DeleteNotificationCount + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple responses: "200": content: @@ -8612,6 +9432,37 @@ paths: - api_key: [] x-accepts: - application/json + /api/v1/me: + get: + description: |- + Identifies the credential in use: the tenant it belongs to and, for OAuth tokens, the user who authorized it. + Integrations use this to test a connection and label it. + operationId: GetMe + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetMeResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json /api/v1/hash-tags: get: operationId: GetHashTags @@ -10100,9 +10951,11 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/v1/audit-logs: + /api/v1/batch-jobs: get: - operationId: GetAuditLogs + description: "The tenant's batch jobs (imports, exports, page migrations...),\ + \ newest first." + operationId: GetBatchJobs parameters: - explode: true in: query @@ -10111,63 +10964,201 @@ paths: schema: type: string style: form - - explode: true - in: query - name: limit - required: false - schema: - format: double - type: number - style: form - - explode: true - in: query - name: skip - required: false - schema: - format: double - type: number - style: form - - explode: true + - description: "Only jobs of this type, for example migrate-pages." + explode: true in: query - name: order + name: type required: false schema: - $ref: "#/components/schemas/SORT_DIR" + type: string style: form - - explode: true + - description: "Only jobs in this status: requested, running, success or failed." + explode: true in: query - name: after + name: status required: false schema: - format: double - type: number + type: string style: form - - explode: true + - description: "How many jobs to skip, for paging." + explode: true in: query - name: before + name: skip required: false schema: - format: double - type: number + format: int32 + type: integer style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GetAuditLogsResponse" + $ref: "#/components/schemas/GetBatchJobsAPIResponse" description: Ok - default: - content: - application/json: - schema: - $ref: "#/components/schemas/APIError" - description: Error security: - api_key: [] x-accepts: - application/json - /api/v1/aggregate: + /api/v1/batch-jobs/{id}: + get: + description: "Status, progress and, once done, the result of one batch job." + operationId: GetBatchJob + parameters: + - explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetBatchJobAPIResponse" + description: Ok + security: + - api_key: [] + x-accepts: + - application/json + /api/v1/audit-logs: + get: + operationId: GetAuditLogs + parameters: + - description: The tenant to read audit logs for. + explode: true + in: query + name: tenantId + required: true + schema: + type: string + style: form + - description: "How many logs to return. Max 10000, defaults to 1000." + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: "How many logs to skip, for paging." + explode: true + in: query + name: skip + required: false + schema: + format: int32 + type: integer + style: form + - description: Sort direction on the event time. Defaults to DESC (newest first). + explode: true + in: query + name: order + required: false + schema: + $ref: "#/components/schemas/SORT_DIR" + style: form + - explode: true + in: query + name: after + required: false + schema: + format: int64 + type: integer + style: form + - explode: true + in: query + name: before + required: false + schema: + format: int64 + type: integer + style: form + - description: Only return events performed by this username. + explode: true + in: query + name: username + required: false + schema: + type: string + style: form + - description: Only return events from this IP address. + explode: true + in: query + name: ip + required: false + schema: + type: string + style: form + - description: "Only return events of this type: c, r, u, d, or login." + explode: true + in: query + name: crudType + required: false + schema: + type: string + style: form + - description: "Only return events for this resource, e.g. User or Moderator." + explode: true + in: query + name: resourceName + required: false + schema: + type: string + style: form + - description: Only return events whose affected object has this id. + explode: true + in: query + name: targetId + required: false + schema: + type: string + style: form + - description: "Case-insensitive substring match on the affected object's label,\ + \ e.g. a username or email." + explode: true + in: query + name: target + required: false + schema: + type: string + style: form + - description: Also return events from tenants this tenant manages. + explode: true + in: query + name: includeManagedTenants + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetAuditLogsResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: + - api_key: [] + x-accepts: + - application/json + /api/v1/aggregate: post: description: |- Aggregates documents by grouping them (if groupBy is provided) and applying multiple operations. @@ -10213,6 +11204,40 @@ paths: x-content-type: application/json x-accepts: - application/json + /api/v1/agent-tenants: + post: + description: |- + Creates a new trial account for an AI agent without a human signup. No API key is needed to call this. + + The response contains the tenant id, an API key that works immediately against the REST API and the + MCP server, and a claim URL. Give the claim URL to the human you are working for: opening it while + logged in to FastComments attaches the account to them. Unclaimed accounts, and their keys, are + deleted 72 hours after creation. Until claimed, the account has the standard trial limits. + operationId: CreateAgentTenant + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateAgentTenantBody" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CreateAgentTenantResponse" + description: Ok + default: + content: + application/json: + schema: + $ref: "#/components/schemas/APIError" + description: Error + security: [] + x-content-type: application/json + x-accepts: + - application/json components: examples: {} headers: {} @@ -10352,6 +11377,17 @@ components: - 2 - 3 type: integer + PollCreationMode: + enum: + - 0 + - 1 + - 2 + type: integer + PollVotingMode: + enum: + - 0 + - 1 + type: integer CommenterNameFormats: enum: - 0 @@ -10478,6 +11514,12 @@ components: format: date-time type: string type: object + CommentTranslationMode: + enum: + - "off" + - auto + - manual + type: string CustomConfigParameters: additionalProperties: false example: @@ -10526,6 +11568,7 @@ components: disableBlocking: true disableEmailInputs: true widgetQuestionWhenToSave: 7 + pollCreation: "" allowAnonFlag: true ticketKBSearchEndpoint: ticketKBSearchEndpoint widgetSubQuestionVisibility: 1 @@ -10538,16 +11581,19 @@ components: inputAfterComments: true allowAnonVotes: true commentThreadDeleteMode: "" + autoGenerateUsername: true commentCountFormat: commentCountFormat disableNotificationBell: true enableFChat: true voteStyle: 3 + pollVoting: "" disableAutoAdminMigration: true disableProfileComments: true absoluteAndRelativeDates: true commenterNameFormat: "" enableThirdPartyCookieBypass: true ticketMaxFileSize: 6 + commentTranslation: "" locale: locale showCommentSaveSuccess: true disableCommenterCommentEdit: true @@ -10567,6 +11613,7 @@ components: enabled: true widgetQuestionShowBreakdown: true mentionAutoCompleteMode: "" + commentsRequireApproval: true customCSS: customCSS enableViewCounts: true headerHTML: headerHTML @@ -10605,6 +11652,10 @@ components: type: string nullable: true type: array + autoGenerateUsername: + description: Serve each new visitor a unique generated username as the prefilled + defaultUsername. + type: boolean collapseReplies: type: boolean commentCountFormat: @@ -10612,10 +11663,22 @@ components: type: string commentHTMLRenderingMode: $ref: "#/components/schemas/CommentHTMLRenderingMode" + commentsRequireApproval: + description: "Hold every new or edited comment on this page or domain for\ + \ moderation, like the tenant-wide setting but scoped." + type: boolean commentThreadDeleteMode: allOf: - $ref: "#/components/schemas/CommentThreadDeletionMode" nullable: true + pollCreation: + allOf: + - $ref: "#/components/schemas/PollCreationMode" + nullable: true + pollVoting: + allOf: + - $ref: "#/components/schemas/PollVotingMode" + nullable: true commenterNameFormat: allOf: - $ref: "#/components/schemas/CommenterNameFormats" @@ -10804,6 +11867,10 @@ components: type: array tos: $ref: "#/components/schemas/TOSConfig" + commentTranslation: + allOf: + - $ref: "#/components/schemas/CommentTranslationMode" + nullable: true type: object APIError: additionalProperties: false @@ -10857,6 +11924,7 @@ components: disableBlocking: true disableEmailInputs: true widgetQuestionWhenToSave: 7 + pollCreation: "" allowAnonFlag: true ticketKBSearchEndpoint: ticketKBSearchEndpoint widgetSubQuestionVisibility: 1 @@ -10869,16 +11937,19 @@ components: inputAfterComments: true allowAnonVotes: true commentThreadDeleteMode: "" + autoGenerateUsername: true commentCountFormat: commentCountFormat disableNotificationBell: true enableFChat: true voteStyle: 3 + pollVoting: "" disableAutoAdminMigration: true disableProfileComments: true absoluteAndRelativeDates: true commenterNameFormat: "" enableThirdPartyCookieBypass: true ticketMaxFileSize: 6 + commentTranslation: "" locale: locale showCommentSaveSuccess: true disableCommenterCommentEdit: true @@ -10898,6 +11969,7 @@ components: enabled: true widgetQuestionShowBreakdown: true mentionAutoCompleteMode: "" + commentsRequireApproval: true customCSS: customCSS enableViewCounts: true headerHTML: headerHTML @@ -10993,6 +12065,8 @@ components: - 82 - 9 - 10 + - 11 + - 12 type: integer RenderableUserNotification: example: @@ -11387,8 +12461,13 @@ components: example: translations: key: translations + locale: locale status: success properties: + locale: + description: The locale the translations were resolved for. Clients use + it to set text direction. + type: string translations: additionalProperties: type: string @@ -11399,6 +12478,7 @@ components: status: $ref: "#/components/schemas/APIStatus" required: + - locale - status - translations type: object @@ -11583,14 +12663,48 @@ components: - status - users type: object + PageReactUser: + example: + displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username + properties: + avatarSrc: + type: string + displayName: + type: string + username: + type: string + userId: + type: string + required: + - userId + - username + type: object GetV1PageLikes: example: urlIdWS: urlIdWS didLike: true likeCount: 6 + users: + - displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username + - displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username commentCount: 0 status: success properties: + users: + description: Most recent first. Present when includeUserInfo is passed. + Capped at 100 reacts. + items: + $ref: "#/components/schemas/PageReactUser" + type: array urlIdWS: type: string didLike: @@ -11610,6 +12724,13 @@ components: - status - urlIdWS type: object + PageReactIncludeUserInfo: + description: public omits users with private profile activity; include-private + requires an API key. + enum: + - public + - include-private + type: string GetV2PageReactUsersResponse: example: userNames: @@ -11634,6 +12755,29 @@ components: description: Construct a type with a set of properties K of type T properties: {} type: object + PageCustomReactUser: + example: + displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username + reactId: reactId + properties: + avatarSrc: + type: string + displayName: + type: string + username: + type: string + userId: + type: string + reactId: + type: string + required: + - reactId + - userId + - username + type: object GetV2PageReacts: example: reactedIds: @@ -11641,8 +12785,25 @@ components: - reactedIds counts: key: 0.8008281904610115 + users: + - displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username + reactId: reactId + - displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username + reactId: reactId status: success properties: + users: + description: "One entry per react, most recent first. Present when includeUserInfo\ + \ is passed. Capped at 100 reacts." + items: + $ref: "#/components/schemas/PageCustomReactUser" + type: array reactedIds: items: type: string @@ -14534,6 +15695,7 @@ components: createdAt: 2000-01-23T04:56:07.000+00:00 data: data broadcastId: broadcastId + domain: domain tenantId: tenantId _id: _id urlId: urlId @@ -14551,8 +15713,11 @@ components: type: string data: type: string - required: - - _id + domain: + nullable: true + type: string + required: + - _id - broadcastId - createdAt - data @@ -14565,12 +15730,14 @@ components: - createdAt: 2000-01-23T04:56:07.000+00:00 data: data broadcastId: broadcastId + domain: domain tenantId: tenantId _id: _id urlId: urlId - createdAt: 2000-01-23T04:56:07.000+00:00 data: data broadcastId: broadcastId + domain: domain tenantId: tenantId _id: _id urlId: urlId @@ -14611,6 +15778,7 @@ components: - deleted-ticket - page-react - question-result + - poll-update type: string TenantId: type: string @@ -14761,6 +15929,78 @@ components: - urlIdRaw - verificationId type: object + CommentPollOption: + additionalProperties: false + example: + votes: 0 + id: id + label: label + properties: + id: + type: string + label: + type: string + votes: + format: int32 + type: integer + required: + - id + - label + - votes + type: object + PollPrivacy: + description: |- + Who may see which voter picked which option. Chosen by the poll's author when they build the poll, so it + lives on the poll itself rather than in the widget config. Anonymous is the default and is never stored on + the poll or sent to the client, so an unset value means Anonymous. + enum: + - 0 + - 1 + - 2 + type: integer + CommentPoll: + additionalProperties: false + description: A poll attached to a comment. Vote counts are denormalized here; + individual votes live in PollVote. + example: + question: question + totalVotes: 6 + options: + - votes: 0 + id: id + label: label + - votes: 0 + id: id + label: label + privacy: "" + closesAt: 2000-01-23T04:56:07.000+00:00 + requireVoteToSeeResults: true + properties: + question: + type: string + options: + items: + $ref: "#/components/schemas/CommentPollOption" + type: array + totalVotes: + format: int32 + type: integer + closesAt: + format: date-time + nullable: true + type: string + privacy: + allOf: + - $ref: "#/components/schemas/PollPrivacy" + nullable: true + requireVoteToSeeResults: + nullable: true + type: boolean + required: + - options + - question + - totalVotes + type: object FDomain: type: string PubSubCommentBase: @@ -14848,6 +16088,10 @@ components: items: type: string type: array + poll: + allOf: + - $ref: "#/components/schemas/CommentPoll" + nullable: true flagCount: format: int32 nullable: true @@ -14906,6 +16150,25 @@ components: required: - date type: object + Pick_CommentPoll.options-or-totalVotes-or-closesAt_: + description: "From T, pick a set of properties whose keys are in the union K" + properties: + options: + items: + $ref: "#/components/schemas/CommentPollOption" + type: array + totalVotes: + format: int32 + type: integer + closesAt: + format: date-time + type: string + required: + - options + - totalVotes + type: object + CommentPollUpdate: + $ref: "#/components/schemas/Pick_CommentPoll.options-or-totalVotes-or-closesAt_" Record_string._before-string-or-null--after-string-or-null__: additionalProperties: $ref: "#/components/schemas/Record_string__before_string_or_null__after_string_or_null___value" @@ -14941,6 +16204,10 @@ components: $ref: "#/components/schemas/PubSubComment" feedPost: $ref: "#/components/schemas/FeedPost" + commentId: + type: string + poll: + $ref: "#/components/schemas/Pick_CommentPoll.options-or-totalVotes-or-closesAt_" extraInfo: $ref: "#/components/schemas/LiveEvent_extraInfo" config: @@ -15125,6 +16392,12 @@ components: - properties: isUnread: type: boolean + myPollVotes: + description: Ids of the options the current viewer voted for on this comment's + poll. Only set when polls are enabled and they have voted. + items: + type: string + type: array myVoteId: type: string isVotedDown: @@ -15160,6 +16433,9 @@ components: date: 2000-01-23T04:56:07.000+00:00 editKey: editKey votesDown: 2 + myPollVotes: + - myPollVotes + - myPollVotes hasChildren: true commenterName: commenterName isBlocked: true @@ -15451,6 +16727,7 @@ components: disableBlocking: true disableEmailInputs: true widgetQuestionWhenToSave: 7 + pollCreation: "" allowAnonFlag: true ticketKBSearchEndpoint: ticketKBSearchEndpoint widgetSubQuestionVisibility: 1 @@ -15463,16 +16740,19 @@ components: inputAfterComments: true allowAnonVotes: true commentThreadDeleteMode: "" + autoGenerateUsername: true commentCountFormat: commentCountFormat disableNotificationBell: true enableFChat: true voteStyle: 3 + pollVoting: "" disableAutoAdminMigration: true disableProfileComments: true absoluteAndRelativeDates: true commenterNameFormat: "" enableThirdPartyCookieBypass: true ticketMaxFileSize: 6 + commentTranslation: "" locale: locale showCommentSaveSuccess: true disableCommenterCommentEdit: true @@ -15492,6 +16772,7 @@ components: enabled: true widgetQuestionShowBreakdown: true mentionAutoCompleteMode: "" + commentsRequireApproval: true customCSS: customCSS enableViewCounts: true headerHTML: headerHTML @@ -15521,6 +16802,9 @@ components: - date: 2000-01-23T04:56:07.000+00:00 editKey: editKey votesDown: 2 + myPollVotes: + - myPollVotes + - myPollVotes hasChildren: true commenterName: commenterName isBlocked: true @@ -15582,6 +16866,9 @@ components: - date: 2000-01-23T04:56:07.000+00:00 editKey: editKey votesDown: 2 + myPollVotes: + - myPollVotes + - myPollVotes hasChildren: true commenterName: commenterName isBlocked: true @@ -15688,6 +16975,9 @@ components: date: 2000-01-23T04:56:07.000+00:00 editKey: editKey votesDown: 2 + myPollVotes: + - myPollVotes + - myPollVotes hasChildren: true commenterName: commenterName isBlocked: true @@ -15751,12 +17041,43 @@ components: key: "" user: "" status: success - Record_string.string-or-number_: + Record_string.string-or-number-or-number-Array_: additionalProperties: - $ref: "#/components/schemas/GifSearchResponse_images_inner_inner" + $ref: "#/components/schemas/Record_string_string_or_number_or_number_Array__value" description: Construct a type with a set of properties K of type T properties: {} type: object + CommentPollInput: + additionalProperties: false + example: + question: question + options: + - options + - options + privacy: 2 + closesAt: closesAt + requireVoteToSeeResults: true + properties: + question: + type: string + options: + items: + type: string + type: array + closesAt: + nullable: true + type: string + privacy: + format: int32 + nullable: true + type: integer + requireVoteToSeeResults: + nullable: true + type: boolean + required: + - options + - question + type: object CommentData: additionalProperties: false example: @@ -15765,6 +17086,14 @@ components: commenterName: commenterName rating: 5.962133916683182 commenterLink: commenterLink + poll: + question: question + options: + - options + - options + privacy: 2 + closesAt: closesAt + requireVoteToSeeResults: true urlId: urlId hashTags: - retain: true @@ -15781,7 +17110,7 @@ components: botId: botId productId: 1 questionValues: - key: GifSearchResponse_images_inner_inner + key: Record_string_string_or_number_or_number_Array__value feedbackIds: - feedbackIds - feedbackIds @@ -15877,10 +17206,12 @@ components: type: array questionValues: additionalProperties: - $ref: "#/components/schemas/GifSearchResponse_images_inner_inner" + $ref: "#/components/schemas/Record_string_string_or_number_or_number_Array__value" description: Construct a type with a set of properties K of type T properties: {} type: object + poll: + $ref: "#/components/schemas/CommentPollInput" tos: type: boolean botId: @@ -16000,6 +17331,73 @@ components: - status - voteUserNames type: object + CommentTranslationPublic: + additionalProperties: false + properties: + commentHTML: + type: string + sourceLanguage: + type: string + required: + - commentHTML + - sourceLanguage + type: object + Record_string.CommentTranslationPublic-or-null_: + additionalProperties: + allOf: + - $ref: "#/components/schemas/CommentTranslationPublic" + nullable: true + description: Construct a type with a set of properties K of type T + properties: {} + type: object + CommentTranslationsResponse: + additionalProperties: false + example: + translations: + key: "" + failed: + - failed + - failed + locale: locale + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + locale: + type: string + translations: + additionalProperties: + allOf: + - $ref: "#/components/schemas/CommentTranslationPublic" + nullable: true + description: Construct a type with a set of properties K of type T + properties: {} + type: object + failed: + description: Comment ids that failed transiently and may be retried. + items: + type: string + type: array + required: + - failed + - locale + - status + - translations + type: object + CommentTranslationsRequest: + additionalProperties: false + example: + commentIds: + - commentIds + - commentIds + properties: + commentIds: + items: + type: string + type: array + required: + - commentIds + type: object ChangeCommentPinStatusResponse: example: commentPositions: @@ -16809,6 +18207,81 @@ components: required: - status type: object + GetPageLikesAPIResponse: + example: + reason: reason + code: code + likeCount: 0 + users: + - displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username + - displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username + status: status + properties: + reason: + type: string + code: + type: string + users: + description: Most recent first. Present when includeUserInfo is passed. + Capped at 100 reacts. + items: + $ref: "#/components/schemas/PageReactUser" + type: array + likeCount: + format: int32 + type: integer + status: + type: string + required: + - status + type: object + GetPageReactsAPIResponse: + example: + reason: reason + code: code + counts: + key: 0.8008281904610115 + users: + - displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username + reactId: reactId + - displayName: displayName + avatarSrc: avatarSrc + userId: userId + username: username + reactId: reactId + status: status + properties: + reason: + type: string + code: + type: string + users: + description: "One entry per react, most recent first. Present when includeUserInfo\ + \ is passed. Capped at 100 reacts." + items: + $ref: "#/components/schemas/PageCustomReactUser" + type: array + counts: + additionalProperties: + format: double + type: number + description: Construct a type with a set of properties K of type T + properties: {} + type: object + status: + type: string + required: + - status + type: object AddPageAPIResponse: example: reason: reason @@ -16870,6 +18343,70 @@ components: - url - urlId type: object + QueuePageMigrationJobAPIResponse: + example: + reason: reason + code: code + batchJobId: batchJobId + status: status + properties: + reason: + type: string + code: + type: string + batchJobId: + description: "Poll GET /api/v1/batch-jobs/{batchJobId} for progress and\ + \ the result." + type: string + status: + type: string + required: + - status + type: object + PageMigrationType: + description: '"urlId" renames exact urlId matches only. "domain" find/replaces + the value inside every urlId and url.' + enum: + - urlId + - domain + type: string + PageMigration: + additionalProperties: false + example: + from: from + to: to + type: urlId + properties: + from: + type: string + to: + type: string + type: + $ref: "#/components/schemas/PageMigrationType" + required: + - from + - to + - type + type: object + MigrateAPIPagesData: + example: + migrations: + - from: from + to: to + type: urlId + - from: from + to: to + type: urlId + properties: + migrations: + description: "Run in the order given, so a -> b then b -> c works. At most\ + \ 100." + items: + $ref: "#/components/schemas/PageMigration" + type: array + required: + - migrations + type: object PatchPageAPIResponse: example: reason: reason @@ -16928,18 +18465,442 @@ components: type: object DeletePageAPIResponse: example: - reason: reason - code: code - status: status + reason: reason + code: code + status: status + properties: + reason: + type: string + code: + type: string + status: + type: string + required: + - status + type: object + WebhookEventName: + enum: + - comment-created + - comment-updated + - comment-deleted + type: string + WebhookHTTPMethod: + enum: + - PUT + - DELETE + - POST + type: string + WebhookSource: + enum: + - dashboard + - api + type: string + PublicWebhook: + additionalProperties: false + example: + disabledReason: auto + method: PUT + lastFailureAt: 2000-01-23T04:56:07.000+00:00 + failingSince: 2000-01-23T04:56:07.000+00:00 + source: dashboard + url: url + enabled: true + disabledAt: 2000-01-23T04:56:07.000+00:00 + createdAt: 2000-01-23T04:56:07.000+00:00 + lastSuccessAt: 2000-01-23T04:56:07.000+00:00 + domain: domain + id: id + event: comment-created + properties: + id: + type: string + url: + type: string + event: + $ref: "#/components/schemas/WebhookEventName" + domain: + type: string + method: + $ref: "#/components/schemas/WebhookHTTPMethod" + source: + $ref: "#/components/schemas/WebhookSource" + enabled: + type: boolean + createdAt: + format: date-time + type: string + lastSuccessAt: + format: date-time + type: string + lastFailureAt: + format: date-time + type: string + failingSince: + format: date-time + type: string + disabledAt: + format: date-time + type: string + disabledReason: + enum: + - auto + - manual + type: string + required: + - createdAt + - domain + - enabled + - event + - id + - method + - source + - url + type: object + GetWebhooksResponse: + additionalProperties: false + example: + webhooks: + - disabledReason: auto + method: PUT + lastFailureAt: 2000-01-23T04:56:07.000+00:00 + failingSince: 2000-01-23T04:56:07.000+00:00 + source: dashboard + url: url + enabled: true + disabledAt: 2000-01-23T04:56:07.000+00:00 + createdAt: 2000-01-23T04:56:07.000+00:00 + lastSuccessAt: 2000-01-23T04:56:07.000+00:00 + domain: domain + id: id + event: comment-created + - disabledReason: auto + method: PUT + lastFailureAt: 2000-01-23T04:56:07.000+00:00 + failingSince: 2000-01-23T04:56:07.000+00:00 + source: dashboard + url: url + enabled: true + disabledAt: 2000-01-23T04:56:07.000+00:00 + createdAt: 2000-01-23T04:56:07.000+00:00 + lastSuccessAt: 2000-01-23T04:56:07.000+00:00 + domain: domain + id: id + event: comment-created + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + webhooks: + items: + $ref: "#/components/schemas/PublicWebhook" + type: array + required: + - status + - webhooks + type: object + WebhookComment: + additionalProperties: false + example: + date: date + pageNumber: 5.962133916683182 + votesDown: 1.4658129805029452 + commenterName: commenterName + urlId: urlId + locale: locale + commentHTML: commentHTML + approved: true + verifiedDate: verifiedDate + aiDeterminedSpam: true + reviewed: true + pageNumberOF: 5.637376656633329 + id: id + votesUp: 6.027456183070403 + pageNumberNF: 2.3021358869347655 + verified: true + externalId: externalId + userId: userId + url: url + parentId: parentId + commenterEmail: commenterEmail + moderationGroupIds: + - moderationGroupIds + - moderationGroupIds + mentions: + - rawTag: rawTag + id: id + tag: tag + type: user + sent: true + - rawTag: rawTag + id: id + tag: tag + type: user + sent: true + domain: domain + avatarSrc: avatarSrc + hasImages: true + comment: comment + votes: 0.8008281904610115 + isSpam: true + properties: + id: + type: string + urlId: + type: string + url: + nullable: true + type: string + userId: + nullable: true + type: string + commenterEmail: + nullable: true + type: string + commenterName: + type: string + comment: + type: string + commentHTML: + type: string + externalId: + nullable: true + type: string + parentId: + nullable: true + type: string + date: + type: string + votes: + format: double + type: number + votesUp: + format: double + type: number + votesDown: + format: double + type: number + verified: + type: boolean + verifiedDate: + nullable: true + type: string + reviewed: + type: boolean + avatarSrc: + nullable: true + type: string + isSpam: + type: boolean + aiDeterminedSpam: + type: boolean + hasImages: + type: boolean + pageNumber: + format: double + nullable: true + type: number + pageNumberOF: + format: double + nullable: true + type: number + pageNumberNF: + format: double + nullable: true + type: number + approved: + type: boolean + locale: + nullable: true + type: string + mentions: + items: + $ref: "#/components/schemas/CommentUserMentionInfo" + type: array + domain: + nullable: true + type: string + moderationGroupIds: + items: + type: string + type: array + required: + - aiDeterminedSpam + - approved + - avatarSrc + - comment + - commentHTML + - commenterEmail + - commenterName + - date + - domain + - externalId + - hasImages + - id + - isSpam + - locale + - mentions + - moderationGroupIds + - pageNumber + - pageNumberNF + - pageNumberOF + - parentId + - reviewed + - url + - urlId + - userId + - verified + - verifiedDate + - votes + - votesDown + - votesUp + type: object + GetWebhookSamplePayloadsResponse: + additionalProperties: false + example: + payloads: + - date: date + pageNumber: 5.962133916683182 + votesDown: 1.4658129805029452 + commenterName: commenterName + urlId: urlId + locale: locale + commentHTML: commentHTML + approved: true + verifiedDate: verifiedDate + aiDeterminedSpam: true + reviewed: true + pageNumberOF: 5.637376656633329 + id: id + votesUp: 6.027456183070403 + pageNumberNF: 2.3021358869347655 + verified: true + externalId: externalId + userId: userId + url: url + parentId: parentId + commenterEmail: commenterEmail + moderationGroupIds: + - moderationGroupIds + - moderationGroupIds + mentions: + - rawTag: rawTag + id: id + tag: tag + type: user + sent: true + - rawTag: rawTag + id: id + tag: tag + type: user + sent: true + domain: domain + avatarSrc: avatarSrc + hasImages: true + comment: comment + votes: 0.8008281904610115 + isSpam: true + - date: date + pageNumber: 5.962133916683182 + votesDown: 1.4658129805029452 + commenterName: commenterName + urlId: urlId + locale: locale + commentHTML: commentHTML + approved: true + verifiedDate: verifiedDate + aiDeterminedSpam: true + reviewed: true + pageNumberOF: 5.637376656633329 + id: id + votesUp: 6.027456183070403 + pageNumberNF: 2.3021358869347655 + verified: true + externalId: externalId + userId: userId + url: url + parentId: parentId + commenterEmail: commenterEmail + moderationGroupIds: + - moderationGroupIds + - moderationGroupIds + mentions: + - rawTag: rawTag + id: id + tag: tag + type: user + sent: true + - rawTag: rawTag + id: id + tag: tag + type: user + sent: true + domain: domain + avatarSrc: avatarSrc + hasImages: true + comment: comment + votes: 0.8008281904610115 + isSpam: true + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + payloads: + items: + $ref: "#/components/schemas/WebhookComment" + type: array + required: + - payloads + - status + type: object + CreateWebhookResponse: + additionalProperties: false + example: + webhook: + disabledReason: auto + method: PUT + lastFailureAt: 2000-01-23T04:56:07.000+00:00 + failingSince: 2000-01-23T04:56:07.000+00:00 + source: dashboard + url: url + enabled: true + disabledAt: 2000-01-23T04:56:07.000+00:00 + createdAt: 2000-01-23T04:56:07.000+00:00 + lastSuccessAt: 2000-01-23T04:56:07.000+00:00 + domain: domain + id: id + event: comment-created + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + webhook: + $ref: "#/components/schemas/PublicWebhook" + required: + - status + - webhook + type: object + CreateWebhookParams: + additionalProperties: false + example: + method: PUT + domain: domain + event: comment-created + url: url properties: - reason: - type: string - code: + url: + description: Where events are delivered. Must be http(s). type: string - status: + event: + $ref: "#/components/schemas/WebhookEventName" + domain: + description: "A domain from your account configuration, or '*' (the default)\ + \ for every domain." type: string + method: + $ref: "#/components/schemas/WebhookHTTPMethod" required: - - status + - event + - url type: object PublicVote: additionalProperties: false @@ -18037,6 +19998,7 @@ components: enum: - 0 - 1 + - 2 type: integer SiteType: $ref: "#/components/schemas/ImportedSiteType" @@ -18116,6 +20078,7 @@ components: address: address city: city name: name + vatId: vatId currency: currency state: state email: email @@ -18139,6 +20102,11 @@ components: email: description: Email for invoices. type: string + vatId: + description: VAT / Tax ID for invoices. Only persisted once Stripe has accepted + it. + nullable: true + type: string required: - address - city @@ -18209,9 +20177,11 @@ components: address: address city: city name: name + vatId: vatId currency: currency state: state email: email + hasDebranding: true createdBy: createdBy meta: key: meta @@ -18277,6 +20247,8 @@ components: type: boolean hasAuditing: type: boolean + hasDebranding: + type: boolean flexLastBilledAmount: format: double type: number @@ -18366,9 +20338,11 @@ components: address: address city: city name: name + vatId: vatId currency: currency state: state email: email + hasDebranding: true createdBy: createdBy meta: key: meta @@ -18449,9 +20423,11 @@ components: address: address city: city name: name + vatId: vatId currency: currency state: state email: email + hasDebranding: true createdBy: createdBy meta: key: meta @@ -18518,9 +20494,11 @@ components: address: address city: city name: name + vatId: vatId currency: currency state: state email: email + hasDebranding: true createdBy: createdBy meta: key: meta @@ -18603,9 +20581,11 @@ components: address: address city: city name: name + vatId: vatId currency: currency state: state email: email + hasDebranding: true createdBy: createdBy meta: key: meta @@ -18640,12 +20620,12 @@ components: address: address city: city name: name + vatId: vatId currency: currency state: state email: email stripeSubscriptionId: stripeSubscriptionId deAnonIpAddr: 5.962133916683182 - createdBy: createdBy removeUnverifiedComments: true meta: key: meta @@ -18711,8 +20691,6 @@ components: type: boolean billingHandledExternally: type: boolean - createdBy: - type: string isSetup: type: boolean billingInfo: @@ -18769,12 +20747,12 @@ components: address: address city: city name: name + vatId: vatId currency: currency state: state email: email stripeSubscriptionId: stripeSubscriptionId deAnonIpAddr: 5.962133916683182 - createdBy: createdBy removeUnverifiedComments: true meta: key: meta @@ -18837,8 +20815,6 @@ components: type: boolean billingHandledExternally: type: boolean - createdBy: - type: string isSetup: type: boolean domainConfiguration: @@ -19466,7 +21442,7 @@ components: flexManagedTenantCostCents: 3.0937452626664474 flexSmallWidgetsCreditUnit: 8.762042012749001 yearlyStripePlanId: yearlyStripePlanId - aiAgentDailyBudgetCents: 4.652396432933246 + aiAgentDailyBudgetCents: 8.969578798196912 maxSSOUsers: 3.616076749251911 hasFlexPricing: true flexSSOModeratorCostCents: 7.058770351582356 @@ -19482,16 +21458,17 @@ components: flexLLMCostCents: 5.944895607614016 name: name _id: _id - aiAgentMonthlyBudgetCents: 8.969578798196912 + aiAgentMonthlyBudgetCents: 7.740351818741173 flexModeratorUnit: 6.438423552598547 flexChatGPTCostCents: 6.778324963048013 flexSSOAdminCostCents: 7.143538047012306 flexSSOUserCostCents: 4.965218492984954 flexLLMUnit: 6.704019297950036 + flexFreeModerators: 0.10263654006109402 flexSSOModeratorUnit: 6.519180951018382 maxDomains: 4.145608029883936 maxMonthlyEventLogRequests: 1.2315135367772556 - maxAIAgents: 0.10263654006109402 + maxAIAgents: 4.652396432933246 flexDomainUnit: 2.8841621266687802 hasWhiteLabeling: true flexChatGPTUnit: 6.878052220127876 @@ -19679,6 +21656,9 @@ components: flexSSOModeratorUnit: format: double type: number + flexFreeModerators: + format: double + type: number isSSOBillingMonthlyActiveUsers: type: boolean hasAIAgents: @@ -19735,7 +21715,7 @@ components: flexManagedTenantCostCents: 3.0937452626664474 flexSmallWidgetsCreditUnit: 8.762042012749001 yearlyStripePlanId: yearlyStripePlanId - aiAgentDailyBudgetCents: 4.652396432933246 + aiAgentDailyBudgetCents: 8.969578798196912 maxSSOUsers: 3.616076749251911 hasFlexPricing: true flexSSOModeratorCostCents: 7.058770351582356 @@ -19751,16 +21731,17 @@ components: flexLLMCostCents: 5.944895607614016 name: name _id: _id - aiAgentMonthlyBudgetCents: 8.969578798196912 + aiAgentMonthlyBudgetCents: 7.740351818741173 flexModeratorUnit: 6.438423552598547 flexChatGPTCostCents: 6.778324963048013 flexSSOAdminCostCents: 7.143538047012306 flexSSOUserCostCents: 4.965218492984954 flexLLMUnit: 6.704019297950036 + flexFreeModerators: 0.10263654006109402 flexSSOModeratorUnit: 6.519180951018382 maxDomains: 4.145608029883936 maxMonthlyEventLogRequests: 1.2315135367772556 - maxAIAgents: 0.10263654006109402 + maxAIAgents: 4.652396432933246 flexDomainUnit: 2.8841621266687802 hasWhiteLabeling: true flexChatGPTUnit: 6.878052220127876 @@ -19812,7 +21793,7 @@ components: flexManagedTenantCostCents: 3.0937452626664474 flexSmallWidgetsCreditUnit: 8.762042012749001 yearlyStripePlanId: yearlyStripePlanId - aiAgentDailyBudgetCents: 4.652396432933246 + aiAgentDailyBudgetCents: 8.969578798196912 maxSSOUsers: 3.616076749251911 hasFlexPricing: true flexSSOModeratorCostCents: 7.058770351582356 @@ -19828,16 +21809,17 @@ components: flexLLMCostCents: 5.944895607614016 name: name _id: _id - aiAgentMonthlyBudgetCents: 8.969578798196912 + aiAgentMonthlyBudgetCents: 7.740351818741173 flexModeratorUnit: 6.438423552598547 flexChatGPTCostCents: 6.778324963048013 flexSSOAdminCostCents: 7.143538047012306 flexSSOUserCostCents: 4.965218492984954 flexLLMUnit: 6.704019297950036 + flexFreeModerators: 0.10263654006109402 flexSSOModeratorUnit: 6.519180951018382 maxDomains: 4.145608029883936 maxMonthlyEventLogRequests: 1.2315135367772556 - maxAIAgents: 0.10263654006109402 + maxAIAgents: 4.652396432933246 flexDomainUnit: 2.8841621266687802 hasWhiteLabeling: true flexChatGPTUnit: 6.878052220127876 @@ -19875,7 +21857,7 @@ components: flexManagedTenantCostCents: 3.0937452626664474 flexSmallWidgetsCreditUnit: 8.762042012749001 yearlyStripePlanId: yearlyStripePlanId - aiAgentDailyBudgetCents: 4.652396432933246 + aiAgentDailyBudgetCents: 8.969578798196912 maxSSOUsers: 3.616076749251911 hasFlexPricing: true flexSSOModeratorCostCents: 7.058770351582356 @@ -19891,16 +21873,17 @@ components: flexLLMCostCents: 5.944895607614016 name: name _id: _id - aiAgentMonthlyBudgetCents: 8.969578798196912 + aiAgentMonthlyBudgetCents: 7.740351818741173 flexModeratorUnit: 6.438423552598547 flexChatGPTCostCents: 6.778324963048013 flexSSOAdminCostCents: 7.143538047012306 flexSSOUserCostCents: 4.965218492984954 flexLLMUnit: 6.704019297950036 + flexFreeModerators: 0.10263654006109402 flexSSOModeratorUnit: 6.519180951018382 maxDomains: 4.145608029883936 maxMonthlyEventLogRequests: 1.2315135367772556 - maxAIAgents: 0.10263654006109402 + maxAIAgents: 4.652396432933246 flexDomainUnit: 2.8841621266687802 hasWhiteLabeling: true flexChatGPTUnit: 6.878052220127876 @@ -19954,7 +21937,7 @@ components: flexManagedTenantCostCents: 3.0937452626664474 flexSmallWidgetsCreditUnit: 8.762042012749001 yearlyStripePlanId: yearlyStripePlanId - aiAgentDailyBudgetCents: 4.652396432933246 + aiAgentDailyBudgetCents: 8.969578798196912 maxSSOUsers: 3.616076749251911 hasFlexPricing: true flexSSOModeratorCostCents: 7.058770351582356 @@ -19970,16 +21953,17 @@ components: flexLLMCostCents: 5.944895607614016 name: name _id: _id - aiAgentMonthlyBudgetCents: 8.969578798196912 + aiAgentMonthlyBudgetCents: 7.740351818741173 flexModeratorUnit: 6.438423552598547 flexChatGPTCostCents: 6.778324963048013 flexSSOAdminCostCents: 7.143538047012306 flexSSOUserCostCents: 4.965218492984954 flexLLMUnit: 6.704019297950036 + flexFreeModerators: 0.10263654006109402 flexSSOModeratorUnit: 6.519180951018382 maxDomains: 4.145608029883936 maxMonthlyEventLogRequests: 1.2315135367772556 - maxAIAgents: 0.10263654006109402 + maxAIAgents: 4.652396432933246 flexDomainUnit: 2.8841621266687802 hasWhiteLabeling: true flexChatGPTUnit: 6.878052220127876 @@ -20687,6 +22671,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -20710,8 +22697,16 @@ components: format: date-time type: string value: + description: The answer. For multi-choice questions this is the number of + selected options and the options are in values. format: int32 type: integer + values: + description: "Selected option indexes, multi-choice questions only." + items: + format: double + type: number + type: array commentId: nullable: true type: string @@ -20750,6 +22745,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -20783,6 +22781,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -20802,6 +22803,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -20837,6 +22841,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -20868,6 +22875,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 anonUserId: anonUserId commentId: commentId urlId: urlId @@ -20877,8 +22887,16 @@ components: urlId: type: string value: + description: Required unless values is given. For multi-choice questions + this is derived from values. format: double type: number + values: + description: Selected option indexes for multi-choice questions. + items: + format: double + type: number + type: array questionId: type: string anonUserId: @@ -20895,7 +22913,6 @@ components: required: - questionId - urlId - - value type: object UpdateQuestionResultBody: additionalProperties: {} @@ -20910,6 +22927,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 anonUserId: anonUserId commentId: commentId urlId: urlId @@ -20925,6 +22945,12 @@ components: value: format: double type: number + values: + description: Selected option indexes for multi-choice questions. + items: + format: double + type: number + type: array commentId: type: string questionId: @@ -21152,6 +23178,33 @@ components: required: - aggregations type: object + CommentTranslation: + additionalProperties: false + properties: + comment: + type: string + commentHTML: + type: string + sourceLanguage: + type: string + model: + type: string + createdAt: + format: date-time + type: string + required: + - comment + - commentHTML + - createdAt + - model + - sourceLanguage + type: object + Record_string.CommentTranslation_: + additionalProperties: + $ref: "#/components/schemas/CommentTranslation" + description: Construct a type with a set of properties K of type T + properties: {} + type: object CommentLogType: enum: - 0 @@ -21210,6 +23263,16 @@ components: - 53 - 54 - 55 + - 56 + - 57 + - 58 + - 59 + - 60 + - 61 + - 62 + - 63 + - 64 + - 65 type: integer RepeatCommentHandlingAction: enum: @@ -21227,59 +23290,82 @@ components: - 5 - 6 type: integer + NotificationSkipReason: + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + - 12 + - 13 + - 14 + - 15 + type: integer CommentLogData: additionalProperties: false example: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId properties: clearContent: @@ -21354,6 +23440,8 @@ components: $ref: "#/components/schemas/RepeatCommentHandlingAction" reason: $ref: "#/components/schemas/RepeatCommentCheckIgnoredReason" + skipReason: + type: string otherData: {} spamBefore: type: boolean @@ -21402,6 +23490,12 @@ components: type: string detectedLanguage: type: string + recipientUserId: + type: string + notifySkipReason: + $ref: "#/components/schemas/NotificationSkipReason" + emailQueued: + type: boolean type: object CommentLogEntry: additionalProperties: false @@ -21412,53 +23506,57 @@ components: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId properties: d: @@ -21479,7 +23577,9 @@ components: editKey: editKey pageNumber: 5 pageTitle: pageTitle + detectedLanguage: detectedLanguage rating: 3.616076749251911 + poll: "" approved: true hashTags: - retain: true @@ -21493,6 +23593,7 @@ components: localDateString: localDateString notificationSentForParentTenant: true verifiedDate: 2000-01-23T04:56:07.000+00:00 + translations: "" isLocked: true groupIds: - groupIds @@ -21506,53 +23607,57 @@ components: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId - d: 2000-01-23T04:56:07.000+00:00 t: 7 @@ -21560,53 +23665,57 @@ components: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId fromProductId: 2 flagCount: 9 @@ -21657,7 +23766,7 @@ components: permNotSpam: true pageNumberOF: 2 localDateHours: 0 - viewCount: 6 + viewCount: 1 botId: botId votesUp: 1 displayLabel: displayLabel @@ -21818,6 +23927,13 @@ components: locale: nullable: true type: string + detectedLanguage: + nullable: true + type: string + translations: + allOf: + - $ref: "#/components/schemas/Record_string.CommentTranslation_" + nullable: true isDeleted: type: boolean isDeletedUser: @@ -21889,6 +24005,10 @@ components: items: type: string type: array + poll: + allOf: + - $ref: "#/components/schemas/CommentPoll" + nullable: true logs: items: $ref: "#/components/schemas/CommentLogEntry" @@ -21940,6 +24060,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -21977,6 +24100,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -21998,6 +24124,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -22037,6 +24166,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -22058,6 +24190,9 @@ components: - values - values name: name + values: + - 6.027456183070403 + - 6.027456183070403 tenantId: tenantId anonUserId: anonUserId commentId: commentId @@ -22069,17 +24204,68 @@ components: comment: "" status: success properties: - status: - $ref: "#/components/schemas/APIStatus" - data: - $ref: "#/components/schemas/FindCommentsByRangeResponse" + status: + $ref: "#/components/schemas/APIStatus" + data: + $ref: "#/components/schemas/FindCommentsByRangeResponse" + required: + - data + - status + type: object + QuestionConditionOperator: + enum: + - lt + - lte + - gt + - gte + - eq + - neq + - includes + - excludes + type: string + SubQuestionCondition: + additionalProperties: false + example: + subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt + properties: + operator: + $ref: "#/components/schemas/QuestionConditionOperator" + value: + format: double + type: number + subQuestionId: + type: string + required: + - operator + - subQuestionId + - value + type: object + QuestionCondition: + additionalProperties: false + description: |- + A rule evaluated against a question's answer. value is the score for nps/slider/star/emoji/scale, 1 or 0 for + thumbs, and the option index for choice/multi. + example: + value: 7.061401241503109 + operator: null + properties: + operator: + $ref: "#/components/schemas/QuestionConditionOperator" + value: + format: double + type: number required: - - data - - status + - operator + - value type: object QuestionConfig: additionalProperties: false example: + commentBoxCondition: + value: 7.061401241503109 + operator: null helpText: helpText question: question summaryLabel: summaryLabel @@ -22091,12 +24277,20 @@ components: imageSrc: imageSrc - name: name imageSrc: imageSrc - reportingOrder: 2.3021358869347655 + commentBoxPrompt: commentBoxPrompt + reportingOrder: 9.301444243932576 alwaysShowSubQuestions: true type: type lastUsed: 2000-01-23T04:56:07.000+00:00 createdAt: 2000-01-23T04:56:07.000+00:00 min: 1.4658129805029452 + subQuestionConditions: + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt createdBy: createdBy labelNegative: labelNegative tenantId: tenantId @@ -22132,6 +24326,9 @@ components: format: date-time type: string type: + description: |- + One of nps, slider, star, thumbs, choice, multi, emoji, scale. Answers: nps 0-10, slider min-max, star 1-numStars, + thumbs 1 (up) or 0 (down), choice = option index, multi = option indexes (values), emoji/scale = option index + 1. type: string numStars: format: double @@ -22150,6 +24347,7 @@ components: labelPositive: type: string customOptions: + description: "Option labels for choice, multi, emoji and scale questions." items: $ref: "#/components/schemas/QuestionConfig_customOptions_inner" type: array @@ -22159,6 +24357,18 @@ components: type: array alwaysShowSubQuestions: type: boolean + subQuestionConditions: + description: Sub-questions listed here only show when this question's answer + matches. Others always show. + items: + $ref: "#/components/schemas/SubQuestionCondition" + type: array + commentBoxCondition: + $ref: "#/components/schemas/QuestionCondition" + commentBoxPrompt: + description: Placeholder for the comment box when commentBoxCondition reveals + it. + type: string reportingOrder: format: double type: number @@ -22189,6 +24399,9 @@ components: example: status: success questionConfig: + commentBoxCondition: + value: 7.061401241503109 + operator: null helpText: helpText question: question summaryLabel: summaryLabel @@ -22200,12 +24413,20 @@ components: imageSrc: imageSrc - name: name imageSrc: imageSrc - reportingOrder: 2.3021358869347655 + commentBoxPrompt: commentBoxPrompt + reportingOrder: 9.301444243932576 alwaysShowSubQuestions: true type: type lastUsed: 2000-01-23T04:56:07.000+00:00 createdAt: 2000-01-23T04:56:07.000+00:00 min: 1.4658129805029452 + subQuestionConditions: + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt createdBy: createdBy labelNegative: labelNegative tenantId: tenantId @@ -22229,7 +24450,10 @@ components: additionalProperties: false example: questionConfigs: - - helpText: helpText + - commentBoxCondition: + value: 7.061401241503109 + operator: null + helpText: helpText question: question summaryLabel: summaryLabel max: 5.962133916683182 @@ -22240,12 +24464,20 @@ components: imageSrc: imageSrc - name: name imageSrc: imageSrc - reportingOrder: 2.3021358869347655 + commentBoxPrompt: commentBoxPrompt + reportingOrder: 9.301444243932576 alwaysShowSubQuestions: true type: type lastUsed: 2000-01-23T04:56:07.000+00:00 createdAt: 2000-01-23T04:56:07.000+00:00 min: 1.4658129805029452 + subQuestionConditions: + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt createdBy: createdBy labelNegative: labelNegative tenantId: tenantId @@ -22256,7 +24488,10 @@ components: - subQuestionIds _id: _id usedCount: 0.8008281904610115 - - helpText: helpText + - commentBoxCondition: + value: 7.061401241503109 + operator: null + helpText: helpText question: question summaryLabel: summaryLabel max: 5.962133916683182 @@ -22267,12 +24502,20 @@ components: imageSrc: imageSrc - name: name imageSrc: imageSrc - reportingOrder: 2.3021358869347655 + commentBoxPrompt: commentBoxPrompt + reportingOrder: 9.301444243932576 alwaysShowSubQuestions: true type: type lastUsed: 2000-01-23T04:56:07.000+00:00 createdAt: 2000-01-23T04:56:07.000+00:00 min: 1.4658129805029452 + subQuestionConditions: + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt createdBy: createdBy labelNegative: labelNegative tenantId: tenantId @@ -22300,6 +24543,9 @@ components: example: status: success questionConfig: + commentBoxCondition: + value: 7.061401241503109 + operator: null helpText: helpText question: question summaryLabel: summaryLabel @@ -22311,12 +24557,20 @@ components: imageSrc: imageSrc - name: name imageSrc: imageSrc - reportingOrder: 2.3021358869347655 + commentBoxPrompt: commentBoxPrompt + reportingOrder: 9.301444243932576 alwaysShowSubQuestions: true type: type lastUsed: 2000-01-23T04:56:07.000+00:00 createdAt: 2000-01-23T04:56:07.000+00:00 min: 1.4658129805029452 + subQuestionConditions: + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt createdBy: createdBy labelNegative: labelNegative tenantId: tenantId @@ -22339,6 +24593,101 @@ components: CreateQuestionConfigBody: additionalProperties: {} example: + commentBoxCondition: + value: 7.061401241503109 + operator: null + helpText: helpText + question: question + max: 1.4658129805029452 + labelPositive: labelPositive + defaultValue: 5.962133916683182 + customOptions: + - name: name + imageSrc: imageSrc + - name: name + imageSrc: imageSrc + commentBoxPrompt: commentBoxPrompt + reportingOrder: 5.637376656633329 + alwaysShowSubQuestions: true + type: type + min: 6.027456183070403 + subQuestionConditions: + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt + labelNegative: labelNegative + name: name + numStars: 0.8008281904610115 + subQuestionIds: + - subQuestionIds + - subQuestionIds + properties: + name: + type: string + question: + type: string + helpText: + type: string + type: + description: |- + One of nps, slider, star, thumbs, choice, multi, emoji, scale. choice, multi, emoji and scale take their labels + from customOptions (choice/multi 2-20 options, emoji/scale 3-7). + type: string + numStars: + format: double + type: number + min: + format: double + type: number + max: + format: double + type: number + defaultValue: + format: double + type: number + labelNegative: + type: string + labelPositive: + type: string + customOptions: + items: + $ref: "#/components/schemas/QuestionConfig_customOptions_inner" + type: array + subQuestionIds: + items: + type: string + type: array + alwaysShowSubQuestions: + type: boolean + subQuestionConditions: + description: Show a sub-question only when this question's answer matches + its rule. + items: + $ref: "#/components/schemas/SubQuestionCondition" + type: array + commentBoxCondition: + $ref: "#/components/schemas/QuestionCondition" + commentBoxPrompt: + description: Comment box placeholder when commentBoxCondition reveals it. + type: string + reportingOrder: + format: double + type: number + required: + - name + - question + - reportingOrder + - type + type: object + UpdateQuestionConfigBody: + additionalProperties: {} + example: + commentBoxCondition: + value: 7.061401241503109 + operator: null helpText: helpText question: question max: 1.4658129805029452 @@ -22349,10 +24698,18 @@ components: imageSrc: imageSrc - name: name imageSrc: imageSrc + commentBoxPrompt: commentBoxPrompt reportingOrder: 5.637376656633329 alwaysShowSubQuestions: true type: type min: 6.027456183070403 + subQuestionConditions: + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt + - subQuestionId: subQuestionId + value: 2.3021358869347655 + operator: lt labelNegative: labelNegative name: name numStars: 0.8008281904610115 @@ -22367,6 +24724,7 @@ components: helpText: type: string type: + description: "One of nps, slider, star, thumbs, choice, multi, emoji, scale." type: string numStars: format: double @@ -22394,76 +24752,329 @@ components: type: array alwaysShowSubQuestions: type: boolean + subQuestionConditions: + items: + $ref: "#/components/schemas/SubQuestionCondition" + type: array + commentBoxCondition: + $ref: "#/components/schemas/QuestionCondition" + commentBoxPrompt: + type: string reportingOrder: format: double type: number + type: object + GetPollResponse: + additionalProperties: false + example: + poll: + question: question + totalVotes: 6 + options: + - votes: 0 + id: id + label: label + - votes: 0 + id: id + label: label + privacy: "" + closesAt: 2000-01-23T04:56:07.000+00:00 + requireVoteToSeeResults: true + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + poll: + $ref: "#/components/schemas/CommentPoll" + required: + - poll + - status + type: object + SavePollResponse: + additionalProperties: false + example: + poll: + question: question + totalVotes: 6 + options: + - votes: 0 + id: id + label: label + - votes: 0 + id: id + label: label + privacy: "" + closesAt: 2000-01-23T04:56:07.000+00:00 + requireVoteToSeeResults: true + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + poll: + $ref: "#/components/schemas/CommentPoll" + required: + - poll + - status + type: object + CommentPollOptionInput: + additionalProperties: false + example: + id: id + label: label + properties: + id: + nullable: true + type: string + label: + type: string + required: + - label + type: object + CommentPollPutInput: + additionalProperties: false + example: + question: question + options: + - id: id + label: label + - id: id + label: label + privacy: 0 + closesAt: closesAt + requireVoteToSeeResults: true + properties: + question: + type: string + options: + items: + $ref: "#/components/schemas/CommentPollOptionInput" + type: array + closesAt: + nullable: true + type: string + privacy: + format: int32 + nullable: true + type: integer + requireVoteToSeeResults: + nullable: true + type: boolean + required: + - options + - question + type: object + CommentPollPatch: + additionalProperties: false + example: + question: question + options: + - label: label + id: id + - label: label + id: id + privacy: 0 + closesAt: closesAt + requireVoteToSeeResults: true + properties: + question: + nullable: true + type: string + options: + items: + $ref: "#/components/schemas/CommentPollPatch_options_inner" + nullable: true + type: array + closesAt: + nullable: true + type: string + privacy: + format: int32 + nullable: true + type: integer + requireVoteToSeeResults: + nullable: true + type: boolean + type: object + PublicPollVote: + additionalProperties: false + description: A single vote cast on a comment's poll. + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + tenantId: tenantId + voterId: voterId + commentId: commentId + optionId: optionId + id: id + urlId: urlId + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + type: string + tenantId: + type: string + commentId: + type: string + urlId: + type: string + voterId: + type: string + optionId: + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + required: + - commentId + - createdAt + - id + - optionId + - tenantId + - urlId + - voterId + type: object + GetPollVotesResponse: + additionalProperties: false + example: + pollVotes: + - createdAt: 2000-01-23T04:56:07.000+00:00 + tenantId: tenantId + voterId: voterId + commentId: commentId + optionId: optionId + id: id + urlId: urlId + updatedAt: 2000-01-23T04:56:07.000+00:00 + - createdAt: 2000-01-23T04:56:07.000+00:00 + tenantId: tenantId + voterId: voterId + commentId: commentId + optionId: optionId + id: id + urlId: urlId + updatedAt: 2000-01-23T04:56:07.000+00:00 + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + pollVotes: + items: + $ref: "#/components/schemas/PublicPollVote" + type: array + required: + - pollVotes + - status + type: object + GetPollVoteResponse: + additionalProperties: false + example: + pollVote: + createdAt: 2000-01-23T04:56:07.000+00:00 + tenantId: tenantId + voterId: voterId + commentId: commentId + optionId: optionId + id: id + urlId: urlId + updatedAt: 2000-01-23T04:56:07.000+00:00 + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + pollVote: + $ref: "#/components/schemas/PublicPollVote" + required: + - pollVote + - status + type: object + CreatePollVoteResponse: + additionalProperties: false + example: + pollVote: + createdAt: 2000-01-23T04:56:07.000+00:00 + tenantId: tenantId + voterId: voterId + commentId: commentId + optionId: optionId + id: id + urlId: urlId + updatedAt: 2000-01-23T04:56:07.000+00:00 + poll: + question: question + totalVotes: 6 + options: + - votes: 0 + id: id + label: label + - votes: 0 + id: id + label: label + privacy: "" + closesAt: 2000-01-23T04:56:07.000+00:00 + requireVoteToSeeResults: true + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + pollVote: + $ref: "#/components/schemas/PublicPollVote" + poll: + $ref: "#/components/schemas/CommentPoll" required: - - name - - question - - reportingOrder - - type + - poll + - pollVote + - status type: object - UpdateQuestionConfigBody: - additionalProperties: {} + CreatePollVoteBody: + additionalProperties: false example: - helpText: helpText - question: question - max: 1.4658129805029452 - labelPositive: labelPositive - defaultValue: 5.962133916683182 - customOptions: - - name: name - imageSrc: imageSrc - - name: name - imageSrc: imageSrc - reportingOrder: 5.637376656633329 - alwaysShowSubQuestions: true - type: type - min: 6.027456183070403 - labelNegative: labelNegative - name: name - numStars: 0.8008281904610115 - subQuestionIds: - - subQuestionIds - - subQuestionIds + ip: ip + commentId: commentId + anonUserId: anonUserId + optionId: optionId + userId: userId properties: - name: - type: string - question: + commentId: type: string - helpText: + optionId: type: string - type: + userId: type: string - numStars: - format: double - type: number - min: - format: double - type: number - max: - format: double - type: number - defaultValue: - format: double - type: number - labelNegative: + anonUserId: type: string - labelPositive: + ip: type: string - customOptions: - items: - $ref: "#/components/schemas/QuestionConfig_customOptions_inner" - type: array - subQuestionIds: - items: - type: string - type: array - alwaysShowSubQuestions: - type: boolean - reportingOrder: - format: double - type: number + required: + - commentId + - optionId + type: object + DeletePollVoteResponse: + additionalProperties: false + example: + poll: + question: question + totalVotes: 6 + options: + - votes: 0 + id: id + label: label + - votes: 0 + id: id + label: label + privacy: "" + closesAt: 2000-01-23T04:56:07.000+00:00 + requireVoteToSeeResults: true + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + poll: + $ref: "#/components/schemas/CommentPoll" + required: + - poll + - status type: object PendingCommentToSyncOutbound: additionalProperties: false @@ -22471,10 +25082,10 @@ components: lastError: "{}" webhookId: webhookId externalId: externalId - attemptCount: 1.284659006116532 + attemptCount: 2.8841621266687802 nextAttemptAt: 2000-01-23T04:56:07.000+00:00 - eventType: 2.8841621266687802 - type: 6.778324963048013 + eventType: 6.778324963048013 + type: 6.878052220127876 createdAt: 2000-01-23T04:56:07.000+00:00 domain: domain tenantId: tenantId @@ -22484,7 +25095,9 @@ components: editKey: editKey pageNumber: 5 pageTitle: pageTitle + detectedLanguage: detectedLanguage rating: 3.616076749251911 + poll: "" approved: true hashTags: - retain: true @@ -22498,6 +25111,7 @@ components: localDateString: localDateString notificationSentForParentTenant: true verifiedDate: 2000-01-23T04:56:07.000+00:00 + translations: "" isLocked: true groupIds: - groupIds @@ -22511,53 +25125,57 @@ components: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId - d: 2000-01-23T04:56:07.000+00:00 t: 7 @@ -22565,53 +25183,57 @@ components: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId fromProductId: 2 flagCount: 9 @@ -22662,7 +25284,7 @@ components: permNotSpam: true pageNumberOF: 2 localDateHours: 0 - viewCount: 6 + viewCount: 1 botId: botId votesUp: 1 displayLabel: displayLabel @@ -22761,10 +25383,10 @@ components: - lastError: "{}" webhookId: webhookId externalId: externalId - attemptCount: 1.284659006116532 + attemptCount: 2.8841621266687802 nextAttemptAt: 2000-01-23T04:56:07.000+00:00 - eventType: 2.8841621266687802 - type: 6.778324963048013 + eventType: 6.778324963048013 + type: 6.878052220127876 createdAt: 2000-01-23T04:56:07.000+00:00 domain: domain tenantId: tenantId @@ -22774,7 +25396,9 @@ components: editKey: editKey pageNumber: 5 pageTitle: pageTitle + detectedLanguage: detectedLanguage rating: 3.616076749251911 + poll: "" approved: true hashTags: - retain: true @@ -22788,6 +25412,7 @@ components: localDateString: localDateString notificationSentForParentTenant: true verifiedDate: 2000-01-23T04:56:07.000+00:00 + translations: "" isLocked: true groupIds: - groupIds @@ -22801,53 +25426,57 @@ components: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId - d: 2000-01-23T04:56:07.000+00:00 t: 7 @@ -22855,53 +25484,57 @@ components: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId fromProductId: 2 flagCount: 9 @@ -22952,7 +25585,7 @@ components: permNotSpam: true pageNumberOF: 2 localDateHours: 0 - viewCount: 6 + viewCount: 1 botId: botId votesUp: 1 displayLabel: displayLabel @@ -23000,10 +25633,10 @@ components: - lastError: "{}" webhookId: webhookId externalId: externalId - attemptCount: 1.284659006116532 + attemptCount: 2.8841621266687802 nextAttemptAt: 2000-01-23T04:56:07.000+00:00 - eventType: 2.8841621266687802 - type: 6.778324963048013 + eventType: 6.778324963048013 + type: 6.878052220127876 createdAt: 2000-01-23T04:56:07.000+00:00 domain: domain tenantId: tenantId @@ -23013,7 +25646,9 @@ components: editKey: editKey pageNumber: 5 pageTitle: pageTitle + detectedLanguage: detectedLanguage rating: 3.616076749251911 + poll: "" approved: true hashTags: - retain: true @@ -23027,6 +25662,7 @@ components: localDateString: localDateString notificationSentForParentTenant: true verifiedDate: 2000-01-23T04:56:07.000+00:00 + translations: "" isLocked: true groupIds: - groupIds @@ -23040,53 +25676,57 @@ components: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId - d: 2000-01-23T04:56:07.000+00:00 t: 7 @@ -23094,53 +25734,57 @@ components: votesDownAfter: 9.369310271410669 repeatAction: 6 reason: 8 - votesUpBefore: 1.1730742509559433 tenantBadgeId: tenantBadgeId + detectedLanguage: detectedLanguage + expireBefore: 2000-01-23T04:56:07.000+00:00 + textBefore: textBefore + source: source + spamBefore: true + foundUser: true + engineResponse: engineResponse + notificationCount: 6.84685269835264 + subscribers: 1.4894159098541704 + otherData: "" + clearContent: true + approvedAfter: true + recipientUserId: recipientUserId + phrase: phrase + isDeletedUser: true + votesUpAfter: 9.965781217890562 + word: word + votesUpBefore: 1.1730742509559433 badgeId: badgeId invalidLocale: invalidLocale reviewedBefore: true reviewedAfter: true trustFactorBefore: 6.438423552598547 trustFactor: 1.0246457001441578 - detectedLanguage: detectedLanguage engineTokens: 1.2315135367772556 rule: commentContains: commentContains actions: - spam - spam - expireBefore: 2000-01-23T04:56:07.000+00:00 - textBefore: textBefore - source: source detectedLocale: detectedLocale locale: locale - spamBefore: true votesBefore: 7.457744773683766 votesDownBefore: 4.965218492984954 spamAfter: true - foundUser: true textAfter: textAfter engine: engine - engineResponse: engineResponse trustFactorAfter: 3.5571952270680973 + notifySkipReason: 6 approvedBefore: true - notificationCount: 6.84685269835264 - subscribers: 1.4894159098541704 - otherData: "" - clearContent: true verified: true expireAfter: 2000-01-23T04:56:07.000+00:00 flagCountBefore: 9.018348186070783 + emailQueued: true userId: userId - approvedAfter: true - phrase: phrase - isDeletedUser: true votesAfter: 5.025004791520295 - votesUpAfter: 9.965781217890562 permanentFlag: permanent wasLoggedIn: true + skipReason: skipReason badWord: badWord - word: word referencedCommentId: referencedCommentId fromProductId: 2 flagCount: 9 @@ -23191,7 +25835,7 @@ components: permNotSpam: true pageNumberOF: 2 localDateHours: 0 - viewCount: 6 + viewCount: 1 botId: botId votesUp: 1 displayLabel: displayLabel @@ -23681,6 +26325,57 @@ components: type: string type: array type: object + MeAuthType: + enum: + - api-key + - oauth + type: string + OAuthScope: + enum: + - read + - write + type: string + GetMeResponse: + additionalProperties: false + example: + tenantName: tenantName + tenantId: tenantId + scopes: + - read + - read + authType: api-key + userId: userId + email: email + status: success + username: username + properties: + status: + $ref: "#/components/schemas/APIStatus" + tenantId: + type: string + tenantName: + type: string + authType: + $ref: "#/components/schemas/MeAuthType" + scopes: + items: + $ref: "#/components/schemas/OAuthScope" + type: array + userId: + description: "Only present for OAuth tokens: the user who authorized the\ + \ application." + type: string + username: + type: string + email: + type: string + required: + - authType + - scopes + - status + - tenantId + - tenantName + type: object TenantHashTag: additionalProperties: false example: @@ -25396,6 +28091,14 @@ components: commenterName: commenterName rating: 5.962133916683182 commenterLink: commenterLink + poll: + question: question + options: + - options + - options + privacy: 2 + closesAt: closesAt + requireVoteToSeeResults: true urlId: urlId locale: locale hashTags: @@ -25416,7 +28119,7 @@ components: votesUp: 9 productId: 1 questionValues: - key: GifSearchResponse_images_inner_inner + key: Record_string_string_or_number_or_number_Array__value isPinned: true ip: ip feedbackIds: @@ -25517,10 +28220,12 @@ components: type: array questionValues: additionalProperties: - $ref: "#/components/schemas/GifSearchResponse_images_inner_inner" + $ref: "#/components/schemas/Record_string_string_or_number_or_number_Array__value" description: Construct a type with a set of properties K of type T properties: {} type: object + poll: + $ref: "#/components/schemas/CommentPollInput" tos: type: boolean botId: @@ -25603,20 +28308,278 @@ components: type: string type: array type: object + PageMigrationSuccess: + additionalProperties: false + example: + commentsMigrated: 5 + from: from + to: to + type: urlId + status: success + properties: + from: + type: string + to: + type: string + type: + $ref: "#/components/schemas/PageMigrationType" + status: + $ref: "#/components/schemas/APIStatus" + commentsMigrated: + format: int32 + type: integer + required: + - commentsMigrated + - from + - status + - to + - type + type: object + PageMigrationFailure: + additionalProperties: false + properties: + from: + type: string + to: + type: string + type: + $ref: "#/components/schemas/PageMigrationType" + status: + $ref: "#/components/schemas/APIStatus" + code: + type: string + reason: + type: string + required: + - code + - from + - reason + - status + - to + - type + type: object + PageMigrationUndoCounts: + additionalProperties: false + example: + notRestorable: 1 + restored: 0 + skipped: 6 + properties: + restored: + description: Records put back to their pre-migration values. + format: int32 + type: integer + skipped: + description: "Records left alone because they changed after the migration,\ + \ or no longer exist." + format: int32 + type: integer + notRestorable: + description: Records a page merge or duplicate cleanup deleted during the + migration. These cannot be brought back. + format: int32 + type: integer + required: + - notRestorable + - restored + - skipped + type: object + APIBatchJob: + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + completedAt: 2000-01-23T04:56:07.000+00:00 + processedCount: 2 + pageMigrationUndoResult: + notRestorable: 1 + restored: 0 + skipped: 6 + undoId: undoId + id: id + totalCount: 5 + type: type + pageMigrationResults: + - commentsMigrated: 5 + from: from + to: to + type: urlId + status: success + - commentsMigrated: 5 + from: from + to: to + type: urlId + status: success + status: status + properties: + pageMigrationUndoResult: + $ref: "#/components/schemas/PageMigrationUndoCounts" + undoId: + description: |- + migrate-pages: set once the job has finished. Pass to POST /api/v1/pages/migrations/{undoId}/undo within 90 days. + undo-page-migration: the migration being undone. + type: string + pageMigrationResults: + description: "migrate-pages: one entry per finished migration, in request\ + \ order." + items: + $ref: "#/components/schemas/APIBatchJob_pageMigrationResults_inner" + type: array + totalCount: + description: "Total work, when known up front." + format: int32 + type: integer + processedCount: + description: |- + Work done so far. The unit depends on the type: migrations finished for migrate-pages, records restored for + undo-page-migration, rows for imports and exports. + format: int32 + type: integer + completedAt: + format: date-time + type: string + createdAt: + format: date-time + type: string + status: + description: "requested, running, success or failed." + type: string + type: + description: "For example migrate-pages, undo-page-migration, export, import." + type: string + id: + type: string + required: + - createdAt + - id + - processedCount + - status + - type + type: object + GetBatchJobsAPIResponse: + example: + reason: reason + code: code + batchJobs: + - createdAt: 2000-01-23T04:56:07.000+00:00 + completedAt: 2000-01-23T04:56:07.000+00:00 + processedCount: 2 + pageMigrationUndoResult: + notRestorable: 1 + restored: 0 + skipped: 6 + undoId: undoId + id: id + totalCount: 5 + type: type + pageMigrationResults: + - commentsMigrated: 5 + from: from + to: to + type: urlId + status: success + - commentsMigrated: 5 + from: from + to: to + type: urlId + status: success + status: status + - createdAt: 2000-01-23T04:56:07.000+00:00 + completedAt: 2000-01-23T04:56:07.000+00:00 + processedCount: 2 + pageMigrationUndoResult: + notRestorable: 1 + restored: 0 + skipped: 6 + undoId: undoId + id: id + totalCount: 5 + type: type + pageMigrationResults: + - commentsMigrated: 5 + from: from + to: to + type: urlId + status: success + - commentsMigrated: 5 + from: from + to: to + type: urlId + status: success + status: status + status: status + properties: + reason: + type: string + code: + type: string + batchJobs: + description: "Newest first, 100 per page." + items: + $ref: "#/components/schemas/APIBatchJob" + type: array + status: + type: string + required: + - status + type: object + GetBatchJobAPIResponse: + example: + reason: reason + code: code + batchJob: + createdAt: 2000-01-23T04:56:07.000+00:00 + completedAt: 2000-01-23T04:56:07.000+00:00 + processedCount: 2 + pageMigrationUndoResult: + notRestorable: 1 + restored: 0 + skipped: 6 + undoId: undoId + id: id + totalCount: 5 + type: type + pageMigrationResults: + - commentsMigrated: 5 + from: from + to: to + type: urlId + status: success + - commentsMigrated: 5 + from: from + to: to + type: urlId + status: success + status: status + status: status + properties: + reason: + type: string + code: + type: string + batchJob: + $ref: "#/components/schemas/APIBatchJob" + status: + type: string + required: + - status + type: object APIAuditLog: additionalProperties: false example: - crudType: c - serverStartDate: 2000-01-23T04:56:07.000+00:00 + targetId: targetId ip: ip + targetLabel: targetLabel description: description resourceName: resourceName - from: ui - _id: _id + ua: ua userId: userId when: 2000-01-23T04:56:07.000+00:00 url: url objectDetails: "" + crudType: c + serverStartDate: 2000-01-23T04:56:07.000+00:00 + sIdHashed: sIdHashed + from: ui + _id: _id username: username properties: _id: @@ -25651,6 +28614,7 @@ components: format: date-time type: string description: + nullable: true type: string serverStartDate: format: date-time @@ -25659,6 +28623,14 @@ components: allOf: - $ref: "#/components/schemas/Record_string.any_" nullable: true + targetId: + type: string + targetLabel: + type: string + ua: + type: string + sIdHashed: + type: string required: - _id - crudType @@ -25668,29 +28640,37 @@ components: additionalProperties: false example: auditLogs: - - crudType: c - serverStartDate: 2000-01-23T04:56:07.000+00:00 + - targetId: targetId ip: ip + targetLabel: targetLabel description: description resourceName: resourceName - from: ui - _id: _id + ua: ua userId: userId when: 2000-01-23T04:56:07.000+00:00 url: url objectDetails: "" - username: username - - crudType: c + crudType: c serverStartDate: 2000-01-23T04:56:07.000+00:00 + sIdHashed: sIdHashed + from: ui + _id: _id + username: username + - targetId: targetId ip: ip + targetLabel: targetLabel description: description resourceName: resourceName - from: ui - _id: _id + ua: ua userId: userId when: 2000-01-23T04:56:07.000+00:00 url: url objectDetails: "" + crudType: c + serverStartDate: 2000-01-23T04:56:07.000+00:00 + sIdHashed: sIdHashed + from: ui + _id: _id username: username status: success properties: @@ -25904,6 +28884,70 @@ components: - operations - resourceName type: object + CreateAgentTenantResponse: + additionalProperties: false + example: + apiBaseUrl: apiBaseUrl + mcpUrl: mcpUrl + apiKey: apiKey + claimUrl: claimUrl + tenantId: tenantId + expiresAt: expiresAt + status: success + properties: + status: + $ref: "#/components/schemas/APIStatus" + tenantId: + description: Pass as tenantId on every API and MCP call. + type: string + apiKey: + description: Full-access key for this tenant. Works immediately. Keep it + secret. + type: string + claimUrl: + description: Give this to the human. Opening it while logged in attaches + the tenant to their account. + type: string + expiresAt: + description: ISO date. The tenant and its key are deleted at this time unless + claimed. + type: string + apiBaseUrl: + type: string + mcpUrl: + type: string + required: + - apiBaseUrl + - apiKey + - claimUrl + - expiresAt + - mcpUrl + - status + - tenantId + type: object + CreateAgentTenantBody: + additionalProperties: false + example: + agent: agent + name: name + domains: + - domains + - domains + properties: + name: + description: Display name for the account. Defaults to the first domain. + type: string + domains: + description: "Domains the comment widget will be embedded on, e.g. [\"example.com\"\ + ]. At most 5." + items: + type: string + type: array + agent: + description: "Free-form identifier of the agent making the request, e.g.\ + \ \"claude-code\"." + type: string + type: object UpdateUserNotificationStatusResponse: anyOf: - $ref: "#/components/schemas/UserNotificationWriteResponse" @@ -26201,6 +29245,15 @@ components: properties: {} type: object type: object + Record_string_string_or_number_or_number_Array__value: + anyOf: + - type: string + - format: double + type: number + - items: + format: double + type: number + type: array FComment_meta: additionalProperties: {} example: @@ -26229,6 +29282,19 @@ components: - imageSrc - name type: object + CommentPollPatch_options_inner: + example: + label: label + id: id + properties: + label: + type: string + id: + type: string + required: + - id + - label + type: object BulkCreateHashTagsResponse_results_inner: anyOf: - $ref: "#/components/schemas/CreateHashTagResponse" @@ -26257,6 +29323,10 @@ components: wpPostId: type: string type: object + APIBatchJob_pageMigrationResults_inner: + anyOf: + - $ref: "#/components/schemas/PageMigrationSuccess" + - $ref: "#/components/schemas/PageMigrationFailure" AggregationResponse_stats: example: scanned: 6 diff --git a/client/build.gradle b/client/build.gradle index e5cad297..c7efbfda 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'com.fastcomments' -version = '3.0.1' +version = '3.1.0' buildscript { repositories { diff --git a/client/build.sbt b/client/build.sbt index cb9a1ce4..ef4427fd 100644 --- a/client/build.sbt +++ b/client/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.fastcomments", name := "client", - version := "3.0.0", + version := "3.1.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/client/docs/APIAuditLog.md b/client/docs/APIAuditLog.md index bae20b4e..60f11ae5 100644 --- a/client/docs/APIAuditLog.md +++ b/client/docs/APIAuditLog.md @@ -19,6 +19,10 @@ |**description** | **String** | | [optional] | |**serverStartDate** | **OffsetDateTime** | | [optional] | |**objectDetails** | **Map<String, Object>** | Construct a type with a set of properties K of type T | [optional] | +|**targetId** | **String** | | [optional] | +|**targetLabel** | **String** | | [optional] | +|**ua** | **String** | | [optional] | +|**sIdHashed** | **String** | | [optional] | diff --git a/client/docs/APIBatchJob.md b/client/docs/APIBatchJob.md new file mode 100644 index 00000000..95ee400e --- /dev/null +++ b/client/docs/APIBatchJob.md @@ -0,0 +1,22 @@ + + +# APIBatchJob + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pageMigrationUndoResult** | [**PageMigrationUndoCounts**](PageMigrationUndoCounts.md) | | [optional] | +|**undoId** | **String** | migrate-pages: set once the job has finished. Pass to POST /api/v1/pages/migrations/{undoId}/undo within 90 days. undo-page-migration: the migration being undone. | [optional] | +|**pageMigrationResults** | [**List<APIBatchJobPageMigrationResultsInner>**](APIBatchJobPageMigrationResultsInner.md) | migrate-pages: one entry per finished migration, in request order. | [optional] | +|**totalCount** | **Integer** | Total work, when known up front. | [optional] | +|**processedCount** | **Integer** | Work done so far. The unit depends on the type: migrations finished for migrate-pages, records restored for undo-page-migration, rows for imports and exports. | | +|**completedAt** | **OffsetDateTime** | | [optional] | +|**createdAt** | **OffsetDateTime** | | | +|**status** | **String** | requested, running, success or failed. | | +|**type** | **String** | For example migrate-pages, undo-page-migration, export, import. | | +|**id** | **String** | | | + + + diff --git a/client/docs/APIBatchJobPageMigrationResultsInner.md b/client/docs/APIBatchJobPageMigrationResultsInner.md new file mode 100644 index 00000000..10c7aa18 --- /dev/null +++ b/client/docs/APIBatchJobPageMigrationResultsInner.md @@ -0,0 +1,19 @@ + + +# APIBatchJobPageMigrationResultsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | | | +|**to** | **String** | | | +|**type** | **PageMigrationType** | | | +|**status** | **APIStatus** | | | +|**commentsMigrated** | **Integer** | | [optional] | +|**code** | **String** | | [optional] | +|**reason** | **String** | | [optional] | + + + diff --git a/client/docs/APITenant.md b/client/docs/APITenant.md index 7e0c5a27..c2ec45a9 100644 --- a/client/docs/APITenant.md +++ b/client/docs/APITenant.md @@ -32,6 +32,7 @@ |**sendProfaneToSpam** | **Boolean** | | [optional] | |**hasFlexPricing** | **Boolean** | | [optional] | |**hasAuditing** | **Boolean** | | [optional] | +|**hasDebranding** | **Boolean** | | [optional] | |**flexLastBilledAmount** | **Double** | | [optional] | |**deAnonIpAddr** | **Double** | | [optional] | |**meta** | **Map<String, String>** | Construct a type with a set of properties K of type T | [optional] | diff --git a/client/docs/BillingInfo.md b/client/docs/BillingInfo.md index 3023e706..9cd7b2b1 100644 --- a/client/docs/BillingInfo.md +++ b/client/docs/BillingInfo.md @@ -15,6 +15,7 @@ |**country** | **String** | | | |**currency** | **String** | Currency for invoices. | [optional] | |**email** | **String** | Email for invoices. | [optional] | +|**vatId** | **String** | VAT / Tax ID for invoices. Only persisted once Stripe has accepted it. | [optional] | diff --git a/client/docs/CommentData.md b/client/docs/CommentData.md index 07a3f6b3..32c8c402 100644 --- a/client/docs/CommentData.md +++ b/client/docs/CommentData.md @@ -30,7 +30,8 @@ |**fromOfflineRestore** | **Boolean** | | [optional] | |**autoplayDelayMS** | **Long** | | [optional] | |**feedbackIds** | **List<String>** | | [optional] | -|**questionValues** | [**Map<String, GifSearchResponseImagesInnerInner>**](GifSearchResponseImagesInnerInner.md) | Construct a type with a set of properties K of type T | [optional] | +|**questionValues** | [**Map<String, RecordStringStringOrNumberOrNumberArrayValue>**](RecordStringStringOrNumberOrNumberArrayValue.md) | Construct a type with a set of properties K of type T | [optional] | +|**poll** | [**CommentPollInput**](CommentPollInput.md) | | [optional] | |**tos** | **Boolean** | | [optional] | |**botId** | **String** | | [optional] | diff --git a/client/docs/CommentLogData.md b/client/docs/CommentLogData.md index 6f6be769..3a5f38b2 100644 --- a/client/docs/CommentLogData.md +++ b/client/docs/CommentLogData.md @@ -35,6 +35,7 @@ |**votesDownAfter** | **Double** | | [optional] | |**repeatAction** | **RepeatCommentHandlingAction** | | [optional] | |**reason** | **RepeatCommentCheckIgnoredReason** | | [optional] | +|**skipReason** | **String** | | [optional] | |**otherData** | **Object** | | [optional] | |**spamBefore** | **Boolean** | | [optional] | |**spamAfter** | **Boolean** | | [optional] | @@ -54,6 +55,9 @@ |**invalidLocale** | **String** | | [optional] | |**detectedLocale** | **String** | | [optional] | |**detectedLanguage** | **String** | | [optional] | +|**recipientUserId** | **String** | | [optional] | +|**notifySkipReason** | **NotificationSkipReason** | | [optional] | +|**emailQueued** | **Boolean** | | [optional] | diff --git a/client/docs/CommentLogType.md b/client/docs/CommentLogType.md index 6bbc0b16..16df2f3a 100644 --- a/client/docs/CommentLogType.md +++ b/client/docs/CommentLogType.md @@ -117,5 +117,25 @@ * `NUMBER_55` (value: `55`) +* `NUMBER_56` (value: `56`) + +* `NUMBER_57` (value: `57`) + +* `NUMBER_58` (value: `58`) + +* `NUMBER_59` (value: `59`) + +* `NUMBER_60` (value: `60`) + +* `NUMBER_61` (value: `61`) + +* `NUMBER_62` (value: `62`) + +* `NUMBER_63` (value: `63`) + +* `NUMBER_64` (value: `64`) + +* `NUMBER_65` (value: `65`) + diff --git a/client/docs/CommentPoll.md b/client/docs/CommentPoll.md new file mode 100644 index 00000000..54f77104 --- /dev/null +++ b/client/docs/CommentPoll.md @@ -0,0 +1,19 @@ + + +# CommentPoll + +A poll attached to a comment. Vote counts are denormalized here; individual votes live in PollVote. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**question** | **String** | | | +|**options** | [**List<CommentPollOption>**](CommentPollOption.md) | | | +|**totalVotes** | **Integer** | | | +|**closesAt** | **OffsetDateTime** | | [optional] | +|**privacy** | **PollPrivacy** | | [optional] | +|**requireVoteToSeeResults** | **Boolean** | | [optional] | + + + diff --git a/client/docs/CommentPollInput.md b/client/docs/CommentPollInput.md new file mode 100644 index 00000000..71faaabc --- /dev/null +++ b/client/docs/CommentPollInput.md @@ -0,0 +1,17 @@ + + +# CommentPollInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**question** | **String** | | | +|**options** | **List<String>** | | | +|**closesAt** | **String** | | [optional] | +|**privacy** | **Integer** | | [optional] | +|**requireVoteToSeeResults** | **Boolean** | | [optional] | + + + diff --git a/client/docs/CommentPollOption.md b/client/docs/CommentPollOption.md new file mode 100644 index 00000000..35108fc4 --- /dev/null +++ b/client/docs/CommentPollOption.md @@ -0,0 +1,15 @@ + + +# CommentPollOption + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**label** | **String** | | | +|**votes** | **Integer** | | | + + + diff --git a/client/docs/CommentPollOptionInput.md b/client/docs/CommentPollOptionInput.md new file mode 100644 index 00000000..3ec7f08f --- /dev/null +++ b/client/docs/CommentPollOptionInput.md @@ -0,0 +1,14 @@ + + +# CommentPollOptionInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**label** | **String** | | | + + + diff --git a/client/docs/CommentPollPatch.md b/client/docs/CommentPollPatch.md new file mode 100644 index 00000000..e245115b --- /dev/null +++ b/client/docs/CommentPollPatch.md @@ -0,0 +1,17 @@ + + +# CommentPollPatch + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**question** | **String** | | [optional] | +|**options** | [**List<CommentPollPatchOptionsInner>**](CommentPollPatchOptionsInner.md) | | [optional] | +|**closesAt** | **String** | | [optional] | +|**privacy** | **Integer** | | [optional] | +|**requireVoteToSeeResults** | **Boolean** | | [optional] | + + + diff --git a/client/docs/CommentPollPatchOptionsInner.md b/client/docs/CommentPollPatchOptionsInner.md new file mode 100644 index 00000000..ae12e81b --- /dev/null +++ b/client/docs/CommentPollPatchOptionsInner.md @@ -0,0 +1,14 @@ + + +# CommentPollPatchOptionsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**label** | **String** | | | +|**id** | **String** | | | + + + diff --git a/client/docs/CommentPollPutInput.md b/client/docs/CommentPollPutInput.md new file mode 100644 index 00000000..762f569e --- /dev/null +++ b/client/docs/CommentPollPutInput.md @@ -0,0 +1,17 @@ + + +# CommentPollPutInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**question** | **String** | | | +|**options** | [**List<CommentPollOptionInput>**](CommentPollOptionInput.md) | | | +|**closesAt** | **String** | | [optional] | +|**privacy** | **Integer** | | [optional] | +|**requireVoteToSeeResults** | **Boolean** | | [optional] | + + + diff --git a/client/docs/CommentTranslation.md b/client/docs/CommentTranslation.md new file mode 100644 index 00000000..5ed5ae76 --- /dev/null +++ b/client/docs/CommentTranslation.md @@ -0,0 +1,17 @@ + + +# CommentTranslation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**comment** | **String** | | | +|**commentHTML** | **String** | | | +|**sourceLanguage** | **String** | | | +|**model** | **String** | | | +|**createdAt** | **OffsetDateTime** | | | + + + diff --git a/client/docs/CommentTranslationMode.md b/client/docs/CommentTranslationMode.md new file mode 100644 index 00000000..d3691757 --- /dev/null +++ b/client/docs/CommentTranslationMode.md @@ -0,0 +1,15 @@ + + +# CommentTranslationMode + +## Enum + + +* `OFF` (value: `"off"`) + +* `AUTO` (value: `"auto"`) + +* `MANUAL` (value: `"manual"`) + + + diff --git a/client/docs/CommentTranslationPublic.md b/client/docs/CommentTranslationPublic.md new file mode 100644 index 00000000..65c300fd --- /dev/null +++ b/client/docs/CommentTranslationPublic.md @@ -0,0 +1,14 @@ + + +# CommentTranslationPublic + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**commentHTML** | **String** | | | +|**sourceLanguage** | **String** | | | + + + diff --git a/client/docs/CommentTranslationsRequest.md b/client/docs/CommentTranslationsRequest.md new file mode 100644 index 00000000..221bf7dc --- /dev/null +++ b/client/docs/CommentTranslationsRequest.md @@ -0,0 +1,13 @@ + + +# CommentTranslationsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**commentIds** | **List<String>** | | | + + + diff --git a/client/docs/CommentTranslationsResponse.md b/client/docs/CommentTranslationsResponse.md new file mode 100644 index 00000000..5a058ffe --- /dev/null +++ b/client/docs/CommentTranslationsResponse.md @@ -0,0 +1,16 @@ + + +# CommentTranslationsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**locale** | **String** | | | +|**translations** | [**Map<String, CommentTranslationPublic>**](CommentTranslationPublic.md) | Construct a type with a set of properties K of type T | | +|**failed** | **List<String>** | Comment ids that failed transiently and may be retried. | | + + + diff --git a/client/docs/CreateAgentTenantBody.md b/client/docs/CreateAgentTenantBody.md new file mode 100644 index 00000000..e6cfb49e --- /dev/null +++ b/client/docs/CreateAgentTenantBody.md @@ -0,0 +1,15 @@ + + +# CreateAgentTenantBody + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Display name for the account. Defaults to the first domain. | [optional] | +|**domains** | **List<String>** | Domains the comment widget will be embedded on, e.g. [\"example.com\"]. At most 5. | [optional] | +|**agent** | **String** | Free-form identifier of the agent making the request, e.g. \"claude-code\". | [optional] | + + + diff --git a/client/docs/CreateAgentTenantResponse.md b/client/docs/CreateAgentTenantResponse.md new file mode 100644 index 00000000..45abfaf8 --- /dev/null +++ b/client/docs/CreateAgentTenantResponse.md @@ -0,0 +1,19 @@ + + +# CreateAgentTenantResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**tenantId** | **String** | Pass as tenantId on every API and MCP call. | | +|**apiKey** | **String** | Full-access key for this tenant. Works immediately. Keep it secret. | | +|**claimUrl** | **String** | Give this to the human. Opening it while logged in attaches the tenant to their account. | | +|**expiresAt** | **String** | ISO date. The tenant and its key are deleted at this time unless claimed. | | +|**apiBaseUrl** | **String** | | | +|**mcpUrl** | **String** | | | + + + diff --git a/client/docs/CreateCommentParams.md b/client/docs/CreateCommentParams.md index be3a8ebd..313cf722 100644 --- a/client/docs/CreateCommentParams.md +++ b/client/docs/CreateCommentParams.md @@ -30,7 +30,8 @@ |**fromOfflineRestore** | **Boolean** | | [optional] | |**autoplayDelayMS** | **Long** | | [optional] | |**feedbackIds** | **List<String>** | | [optional] | -|**questionValues** | [**Map<String, GifSearchResponseImagesInnerInner>**](GifSearchResponseImagesInnerInner.md) | Construct a type with a set of properties K of type T | [optional] | +|**questionValues** | [**Map<String, RecordStringStringOrNumberOrNumberArrayValue>**](RecordStringStringOrNumberOrNumberArrayValue.md) | Construct a type with a set of properties K of type T | [optional] | +|**poll** | [**CommentPollInput**](CommentPollInput.md) | | [optional] | |**tos** | **Boolean** | | [optional] | |**botId** | **String** | | [optional] | |**approved** | **Boolean** | | [optional] | diff --git a/client/docs/CreatePollVoteBody.md b/client/docs/CreatePollVoteBody.md new file mode 100644 index 00000000..cb08bdf6 --- /dev/null +++ b/client/docs/CreatePollVoteBody.md @@ -0,0 +1,17 @@ + + +# CreatePollVoteBody + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**commentId** | **String** | | | +|**optionId** | **String** | | | +|**userId** | **String** | | [optional] | +|**anonUserId** | **String** | | [optional] | +|**ip** | **String** | | [optional] | + + + diff --git a/client/docs/CreatePollVoteResponse.md b/client/docs/CreatePollVoteResponse.md new file mode 100644 index 00000000..a870ccf9 --- /dev/null +++ b/client/docs/CreatePollVoteResponse.md @@ -0,0 +1,15 @@ + + +# CreatePollVoteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**pollVote** | [**PublicPollVote**](PublicPollVote.md) | | | +|**poll** | [**CommentPoll**](CommentPoll.md) | | | + + + diff --git a/client/docs/CreateQuestionConfigBody.md b/client/docs/CreateQuestionConfigBody.md index 6de7b66a..2666c3c5 100644 --- a/client/docs/CreateQuestionConfigBody.md +++ b/client/docs/CreateQuestionConfigBody.md @@ -10,7 +10,7 @@ |**name** | **String** | | | |**question** | **String** | | | |**helpText** | **String** | | [optional] | -|**type** | **String** | | | +|**type** | **String** | One of nps, slider, star, thumbs, choice, multi, emoji, scale. choice, multi, emoji and scale take their labels from customOptions (choice/multi 2-20 options, emoji/scale 3-7). | | |**numStars** | **Double** | | [optional] | |**min** | **Double** | | [optional] | |**max** | **Double** | | [optional] | @@ -20,6 +20,9 @@ |**customOptions** | [**List<QuestionConfigCustomOptionsInner>**](QuestionConfigCustomOptionsInner.md) | | [optional] | |**subQuestionIds** | **List<String>** | | [optional] | |**alwaysShowSubQuestions** | **Boolean** | | [optional] | +|**subQuestionConditions** | [**List<SubQuestionCondition>**](SubQuestionCondition.md) | Show a sub-question only when this question's answer matches its rule. | [optional] | +|**commentBoxCondition** | [**QuestionCondition**](QuestionCondition.md) | | [optional] | +|**commentBoxPrompt** | **String** | Comment box placeholder when commentBoxCondition reveals it. | [optional] | |**reportingOrder** | **Double** | | | diff --git a/client/docs/CreateQuestionResultBody.md b/client/docs/CreateQuestionResultBody.md index 0f64682c..60734c27 100644 --- a/client/docs/CreateQuestionResultBody.md +++ b/client/docs/CreateQuestionResultBody.md @@ -8,7 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**urlId** | **String** | | | -|**value** | **Double** | | | +|**value** | **Double** | Required unless values is given. For multi-choice questions this is derived from values. | [optional] | +|**values** | **List<Double>** | Selected option indexes for multi-choice questions. | [optional] | |**questionId** | **String** | | | |**anonUserId** | **String** | | [optional] | |**userId** | **String** | | [optional] | diff --git a/client/docs/CreateTenantBody.md b/client/docs/CreateTenantBody.md index ae213e52..a1137721 100644 --- a/client/docs/CreateTenantBody.md +++ b/client/docs/CreateTenantBody.md @@ -15,7 +15,6 @@ |**paymentFrequency** | **Double** | | [optional] | |**billingInfoValid** | **Boolean** | | [optional] | |**billingHandledExternally** | **Boolean** | | [optional] | -|**createdBy** | **String** | | [optional] | |**isSetup** | **Boolean** | | [optional] | |**billingInfo** | [**BillingInfo**](BillingInfo.md) | | [optional] | |**stripeCustomerId** | **String** | | [optional] | diff --git a/client/docs/CreateWebhookParams.md b/client/docs/CreateWebhookParams.md new file mode 100644 index 00000000..2a65049e --- /dev/null +++ b/client/docs/CreateWebhookParams.md @@ -0,0 +1,16 @@ + + +# CreateWebhookParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**url** | **String** | Where events are delivered. Must be http(s). | | +|**event** | **WebhookEventName** | | | +|**domain** | **String** | A domain from your account configuration, or '*' (the default) for every domain. | [optional] | +|**method** | **WebhookHTTPMethod** | | [optional] | + + + diff --git a/client/docs/CreateWebhookResponse.md b/client/docs/CreateWebhookResponse.md new file mode 100644 index 00000000..d85aa0f2 --- /dev/null +++ b/client/docs/CreateWebhookResponse.md @@ -0,0 +1,14 @@ + + +# CreateWebhookResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**webhook** | [**PublicWebhook**](PublicWebhook.md) | | | + + + diff --git a/client/docs/CustomConfigParameters.md b/client/docs/CustomConfigParameters.md index 4867278a..c9127c9e 100644 --- a/client/docs/CustomConfigParameters.md +++ b/client/docs/CustomConfigParameters.md @@ -13,10 +13,14 @@ |**allowAnonFlag** | **Boolean** | | [optional] | |**allowAnonVotes** | **Boolean** | | [optional] | |**allowedLanguages** | **List<String>** | | [optional] | +|**autoGenerateUsername** | **Boolean** | Serve each new visitor a unique generated username as the prefilled defaultUsername. | [optional] | |**collapseReplies** | **Boolean** | | [optional] | |**commentCountFormat** | **String** | | [optional] | |**commentHTMLRenderingMode** | **CommentHTMLRenderingMode** | | [optional] | +|**commentsRequireApproval** | **Boolean** | Hold every new or edited comment on this page or domain for moderation, like the tenant-wide setting but scoped. | [optional] | |**commentThreadDeleteMode** | **CommentThreadDeletionMode** | | [optional] | +|**pollCreation** | **PollCreationMode** | | [optional] | +|**pollVoting** | **PollVotingMode** | | [optional] | |**commenterNameFormat** | **CommenterNameFormats** | | [optional] | |**countAboveToggle** | **Integer** | | [optional] | |**customCSS** | **String** | | [optional] | @@ -95,6 +99,7 @@ |**ticketMaxFileSize** | **Integer** | | [optional] | |**ticketAutoAssignUserIds** | **List<String>** | | [optional] | |**tos** | [**TOSConfig**](TOSConfig.md) | | [optional] | +|**commentTranslation** | **CommentTranslationMode** | | [optional] | diff --git a/client/docs/DefaultApi.md b/client/docs/DefaultApi.md index 2c687ed4..988e728b 100644 --- a/client/docs/DefaultApi.md +++ b/client/docs/DefaultApi.md @@ -16,9 +16,11 @@ All URIs are relative to *https://fastcomments.com* | [**bulkAggregateQuestionResults**](DefaultApi.md#bulkAggregateQuestionResults) | **POST** /api/v1/question-results-aggregation/bulk | | | [**changeTicketState**](DefaultApi.md#changeTicketState) | **PATCH** /api/v1/tickets/{id}/state | | | [**combineCommentsWithQuestionResults**](DefaultApi.md#combineCommentsWithQuestionResults) | **GET** /api/v1/question-results-aggregation/combine/comments | | +| [**createAgentTenant**](DefaultApi.md#createAgentTenant) | **POST** /api/v1/agent-tenants | | | [**createEmailTemplate**](DefaultApi.md#createEmailTemplate) | **POST** /api/v1/email-templates | | | [**createFeedPost**](DefaultApi.md#createFeedPost) | **POST** /api/v1/feed-posts | | | [**createModerator**](DefaultApi.md#createModerator) | **POST** /api/v1/moderators | | +| [**createPollVote**](DefaultApi.md#createPollVote) | **POST** /api/v1/poll-votes | | | [**createQuestionConfig**](DefaultApi.md#createQuestionConfig) | **POST** /api/v1/question-configs | | | [**createQuestionResult**](DefaultApi.md#createQuestionResult) | **POST** /api/v1/question-results | | | [**createSubscription**](DefaultApi.md#createSubscription) | **POST** /api/v1/subscriptions | | @@ -28,6 +30,7 @@ All URIs are relative to *https://fastcomments.com* | [**createTicket**](DefaultApi.md#createTicket) | **POST** /api/v1/tickets | | | [**createUserBadge**](DefaultApi.md#createUserBadge) | **POST** /api/v1/user-badges | | | [**createVote**](DefaultApi.md#createVote) | **POST** /api/v1/votes | | +| [**createWebhook**](DefaultApi.md#createWebhook) | **POST** /api/v1/webhooks | | | [**deleteComment**](DefaultApi.md#deleteComment) | **DELETE** /api/v1/comments/{id} | | | [**deleteDomainConfig**](DefaultApi.md#deleteDomainConfig) | **DELETE** /api/v1/domain-configs/{domain} | | | [**deleteEmailTemplate**](DefaultApi.md#deleteEmailTemplate) | **DELETE** /api/v1/email-templates/{id} | | @@ -37,6 +40,8 @@ All URIs are relative to *https://fastcomments.com* | [**deleteNotificationCount**](DefaultApi.md#deleteNotificationCount) | **DELETE** /api/v1/notification-count/{id} | | | [**deletePage**](DefaultApi.md#deletePage) | **DELETE** /api/v1/pages/{id} | | | [**deletePendingWebhookEvent**](DefaultApi.md#deletePendingWebhookEvent) | **DELETE** /api/v1/pending-webhook-events/{id} | | +| [**deletePoll**](DefaultApi.md#deletePoll) | **DELETE** /api/v1/polls/{commentId} | | +| [**deletePollVote**](DefaultApi.md#deletePollVote) | **DELETE** /api/v1/poll-votes/{id} | | | [**deleteQuestionConfig**](DefaultApi.md#deleteQuestionConfig) | **DELETE** /api/v1/question-configs/{id} | | | [**deleteQuestionResult**](DefaultApi.md#deleteQuestionResult) | **DELETE** /api/v1/question-results/{id} | | | [**deleteSSOUser**](DefaultApi.md#deleteSSOUser) | **DELETE** /api/v1/sso-users/{id} | | @@ -46,8 +51,11 @@ All URIs are relative to *https://fastcomments.com* | [**deleteTenantUser**](DefaultApi.md#deleteTenantUser) | **DELETE** /api/v1/tenant-users/{id} | | | [**deleteUserBadge**](DefaultApi.md#deleteUserBadge) | **DELETE** /api/v1/user-badges/{id} | | | [**deleteVote**](DefaultApi.md#deleteVote) | **DELETE** /api/v1/votes/{id} | | +| [**deleteWebhook**](DefaultApi.md#deleteWebhook) | **DELETE** /api/v1/webhooks/{id} | | | [**flagComment**](DefaultApi.md#flagComment) | **POST** /api/v1/comments/{id}/flag | | | [**getAuditLogs**](DefaultApi.md#getAuditLogs) | **GET** /api/v1/audit-logs | | +| [**getBatchJob**](DefaultApi.md#getBatchJob) | **GET** /api/v1/batch-jobs/{id} | | +| [**getBatchJobs**](DefaultApi.md#getBatchJobs) | **GET** /api/v1/batch-jobs | | | [**getCachedNotificationCount**](DefaultApi.md#getCachedNotificationCount) | **GET** /api/v1/notification-count/{id} | | | [**getComment**](DefaultApi.md#getComment) | **GET** /api/v1/comments/{id} | | | [**getComments**](DefaultApi.md#getComments) | **GET** /api/v1/comments | | @@ -59,14 +67,20 @@ All URIs are relative to *https://fastcomments.com* | [**getEmailTemplates**](DefaultApi.md#getEmailTemplates) | **GET** /api/v1/email-templates | | | [**getFeedPosts**](DefaultApi.md#getFeedPosts) | **GET** /api/v1/feed-posts | | | [**getHashTags**](DefaultApi.md#getHashTags) | **GET** /api/v1/hash-tags | | +| [**getMe**](DefaultApi.md#getMe) | **GET** /api/v1/me | | | [**getModerator**](DefaultApi.md#getModerator) | **GET** /api/v1/moderators/{id} | | | [**getModerators**](DefaultApi.md#getModerators) | **GET** /api/v1/moderators | | | [**getNotificationCount**](DefaultApi.md#getNotificationCount) | **GET** /api/v1/notifications/count | | | [**getNotifications**](DefaultApi.md#getNotifications) | **GET** /api/v1/notifications | | | [**getPageByURLId**](DefaultApi.md#getPageByURLId) | **GET** /api/v1/pages/by-url-id | | +| [**getPageLikes**](DefaultApi.md#getPageLikes) | **GET** /api/v1/pages/likes | | +| [**getPageReacts**](DefaultApi.md#getPageReacts) | **GET** /api/v1/pages/reacts | | | [**getPages**](DefaultApi.md#getPages) | **GET** /api/v1/pages | | | [**getPendingWebhookEventCount**](DefaultApi.md#getPendingWebhookEventCount) | **GET** /api/v1/pending-webhook-events/count | | | [**getPendingWebhookEvents**](DefaultApi.md#getPendingWebhookEvents) | **GET** /api/v1/pending-webhook-events | | +| [**getPoll**](DefaultApi.md#getPoll) | **GET** /api/v1/polls/{commentId} | | +| [**getPollVote**](DefaultApi.md#getPollVote) | **GET** /api/v1/poll-votes/{id} | | +| [**getPollVotes**](DefaultApi.md#getPollVotes) | **GET** /api/v1/poll-votes | | | [**getQuestionConfig**](DefaultApi.md#getQuestionConfig) | **GET** /api/v1/question-configs/{id} | | | [**getQuestionConfigs**](DefaultApi.md#getQuestionConfigs) | **GET** /api/v1/question-configs | | | [**getQuestionResult**](DefaultApi.md#getQuestionResult) | **GET** /api/v1/question-results/{id} | | @@ -92,11 +106,16 @@ All URIs are relative to *https://fastcomments.com* | [**getUserBadges**](DefaultApi.md#getUserBadges) | **GET** /api/v1/user-badges | | | [**getVotes**](DefaultApi.md#getVotes) | **GET** /api/v1/votes | | | [**getVotesForUser**](DefaultApi.md#getVotesForUser) | **GET** /api/v1/votes/for-user | | +| [**getWebhookSamplePayloads**](DefaultApi.md#getWebhookSamplePayloads) | **GET** /api/v1/webhooks/sample-payloads | | +| [**getWebhooks**](DefaultApi.md#getWebhooks) | **GET** /api/v1/webhooks | | +| [**migratePages**](DefaultApi.md#migratePages) | **POST** /api/v1/pages/migrations | | | [**patchDomainConfig**](DefaultApi.md#patchDomainConfig) | **PATCH** /api/v1/domain-configs/{domainToUpdate} | | | [**patchHashTag**](DefaultApi.md#patchHashTag) | **PATCH** /api/v1/hash-tags/{tag} | | | [**patchPage**](DefaultApi.md#patchPage) | **PATCH** /api/v1/pages/{id} | | +| [**patchPoll**](DefaultApi.md#patchPoll) | **PATCH** /api/v1/polls/{commentId} | | | [**patchSSOUser**](DefaultApi.md#patchSSOUser) | **PATCH** /api/v1/sso-users/{id} | | | [**putDomainConfig**](DefaultApi.md#putDomainConfig) | **PUT** /api/v1/domain-configs/{domainToUpdate} | | +| [**putPoll**](DefaultApi.md#putPoll) | **PUT** /api/v1/polls/{commentId} | | | [**putSSOUser**](DefaultApi.md#putSSOUser) | **PUT** /api/v1/sso-users/{id} | | | [**renderEmailTemplate**](DefaultApi.md#renderEmailTemplate) | **POST** /api/v1/email-templates/render | | | [**replaceTenantPackage**](DefaultApi.md#replaceTenantPackage) | **PUT** /api/v1/tenant-packages/{id} | | @@ -107,6 +126,7 @@ All URIs are relative to *https://fastcomments.com* | [**sendLoginLink**](DefaultApi.md#sendLoginLink) | **POST** /api/v1/tenant-users/{id}/send-login-link | | | [**unBlockUserFromComment**](DefaultApi.md#unBlockUserFromComment) | **POST** /api/v1/comments/{id}/un-block | | | [**unFlagComment**](DefaultApi.md#unFlagComment) | **POST** /api/v1/comments/{id}/un-flag | | +| [**undoPageMigrations**](DefaultApi.md#undoPageMigrations) | **POST** /api/v1/pages/migrations/{undoId}/undo | | | [**updateComment**](DefaultApi.md#updateComment) | **PATCH** /api/v1/comments/{id} | | | [**updateEmailTemplate**](DefaultApi.md#updateEmailTemplate) | **PATCH** /api/v1/email-templates/{id} | | | [**updateFeedPost**](DefaultApi.md#updateFeedPost) | **PATCH** /api/v1/feed-posts/{id} | | @@ -961,6 +981,70 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | + +# **createAgentTenant** +> CreateAgentTenantResponse createAgentTenant(createAgentTenantBody).execute(); + + + +Creates a new trial account for an AI agent without a human signup. No API key is needed to call this. The response contains the tenant id, an API key that works immediately against the REST API and the MCP server, and a claim URL. Give the claim URL to the human you are working for: opening it while logged in to FastComments attaches the account to them. Unclaimed accounts, and their keys, are deleted 72 hours after creation. Until claimed, the account has the standard trial limits. + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + CreateAgentTenantBody createAgentTenantBody = new CreateAgentTenantBody(); // CreateAgentTenantBody | + try { + CreateAgentTenantResponse result = apiInstance.createAgentTenant(createAgentTenantBody) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#createAgentTenant"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createAgentTenantBody** | [**CreateAgentTenantBody**](CreateAgentTenantBody.md)| | | + +### Return type + +[**CreateAgentTenantResponse**](CreateAgentTenantResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + # **createEmailTemplate** > CreateEmailTemplateResponse createEmailTemplate(tenantId, createEmailTemplateBody).execute(); @@ -1186,6 +1270,79 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | + +# **createPollVote** +> CreatePollVoteResponse createPollVote(tenantId, createPollVoteBody).execute(); + + + +Record a vote on a poll, or move an existing one to a different option. A voter has at most one vote per poll, so calling this again for the same voter moves their vote rather than adding one. This obeys the site's poll settings: if voting is set to logged-in users only, a vote with just an anonUserId is rejected, and anonymous votes are rate limited per IP per poll. + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + CreatePollVoteBody createPollVoteBody = new CreatePollVoteBody(); // CreatePollVoteBody | + try { + CreatePollVoteResponse result = apiInstance.createPollVote(tenantId, createPollVoteBody) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#createPollVote"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **createPollVoteBody** | [**CreatePollVoteBody**](CreatePollVoteBody.md)| | | + +### Return type + +[**CreatePollVoteResponse**](CreatePollVoteResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + # **createQuestionConfig** > CreateQuestionConfigResponse createQuestionConfig(tenantId, createQuestionConfigBody).execute(); @@ -1834,6 +1991,79 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | + +# **createWebhook** +> CreateWebhookResponse createWebhook(tenantId, createWebhookParams).execute(); + + + +Subscribes a URL to a comment event (REST hook subscribe). Subscribing the same URL to the same event and domain again returns the existing subscription. Deliveries are HMAC signed, see the webhooks guide; the legacy `token` header is never sent to API subscriptions. + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + CreateWebhookParams createWebhookParams = new CreateWebhookParams(); // CreateWebhookParams | + try { + CreateWebhookResponse result = apiInstance.createWebhook(tenantId, createWebhookParams) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#createWebhook"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **createWebhookParams** | [**CreateWebhookParams**](CreateWebhookParams.md)| | | + +### Return type + +[**CreateWebhookResponse**](CreateWebhookResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + # **deleteComment** > DeleteCommentResult deleteComment(tenantId, id).contextUserId(contextUserId).isLive(isLive).execute(); @@ -2485,11 +2715,13 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **deleteQuestionConfig** -> APIEmptyResponse deleteQuestionConfig(tenantId, id).execute(); + +# **deletePoll** +> APIEmptyResponse deletePoll(tenantId, commentId).execute(); + +Remove a poll from its comment, along with every vote cast on it. The comment itself is left alone. ### Example ```java @@ -2514,13 +2746,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | + String commentId = "commentId_example"; // String | try { - APIEmptyResponse result = apiInstance.deleteQuestionConfig(tenantId, id) + APIEmptyResponse result = apiInstance.deletePoll(tenantId, commentId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#deleteQuestionConfig"); + System.err.println("Exception when calling DefaultApi#deletePoll"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2535,7 +2767,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | +| **commentId** | **String**| | | ### Return type @@ -2556,11 +2788,13 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **deleteQuestionResult** -> APIEmptyResponse deleteQuestionResult(tenantId, id).execute(); + +# **deletePollVote** +> DeletePollVoteResponse deletePollVote(tenantId, id).execute(); + +Retract a vote. The option it was cast on gives its tally back. ### Example ```java @@ -2587,11 +2821,11 @@ public class Example { String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | try { - APIEmptyResponse result = apiInstance.deleteQuestionResult(tenantId, id) + DeletePollVoteResponse result = apiInstance.deletePollVote(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#deleteQuestionResult"); + System.err.println("Exception when calling DefaultApi#deletePollVote"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2610,7 +2844,7 @@ public class Example { ### Return type -[**APIEmptyResponse**](APIEmptyResponse.md) +[**DeletePollVoteResponse**](DeletePollVoteResponse.md) ### Authorization @@ -2627,9 +2861,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **deleteSSOUser** -> DeleteSSOUserAPIResponse deleteSSOUser(tenantId, id).deleteComments(deleteComments).commentDeleteMode(commentDeleteMode).execute(); + +# **deleteQuestionConfig** +> APIEmptyResponse deleteQuestionConfig(tenantId, id).execute(); @@ -2657,16 +2891,12 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | - Boolean deleteComments = true; // Boolean | - String commentDeleteMode = "commentDeleteMode_example"; // String | try { - DeleteSSOUserAPIResponse result = apiInstance.deleteSSOUser(tenantId, id) - .deleteComments(deleteComments) - .commentDeleteMode(commentDeleteMode) + APIEmptyResponse result = apiInstance.deleteQuestionConfig(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#deleteSSOUser"); + System.err.println("Exception when calling DefaultApi#deleteQuestionConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2682,12 +2912,10 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | -| **deleteComments** | **Boolean**| | [optional] | -| **commentDeleteMode** | **String**| | [optional] | ### Return type -[**DeleteSSOUserAPIResponse**](DeleteSSOUserAPIResponse.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2702,10 +2930,11 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **0** | Error | - | - -# **deleteSubscription** -> DeleteSubscriptionAPIResponse deleteSubscription(tenantId, id).userId(userId).execute(); + +# **deleteQuestionResult** +> APIEmptyResponse deleteQuestionResult(tenantId, id).execute(); @@ -2733,14 +2962,12 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | - String userId = "userId_example"; // String | try { - DeleteSubscriptionAPIResponse result = apiInstance.deleteSubscription(tenantId, id) - .userId(userId) + APIEmptyResponse result = apiInstance.deleteQuestionResult(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#deleteSubscription"); + System.err.println("Exception when calling DefaultApi#deleteQuestionResult"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2756,11 +2983,10 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | -| **userId** | **String**| | [optional] | ### Return type -[**DeleteSubscriptionAPIResponse**](DeleteSubscriptionAPIResponse.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2775,10 +3001,11 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **0** | Error | - | - -# **deleteTenant** -> APIEmptyResponse deleteTenant(tenantId, id).sure(sure).execute(); + +# **deleteSSOUser** +> DeleteSSOUserAPIResponse deleteSSOUser(tenantId, id).deleteComments(deleteComments).commentDeleteMode(commentDeleteMode).execute(); @@ -2806,14 +3033,16 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | - String sure = "sure_example"; // String | + Boolean deleteComments = true; // Boolean | + String commentDeleteMode = "commentDeleteMode_example"; // String | try { - APIEmptyResponse result = apiInstance.deleteTenant(tenantId, id) - .sure(sure) + DeleteSSOUserAPIResponse result = apiInstance.deleteSSOUser(tenantId, id) + .deleteComments(deleteComments) + .commentDeleteMode(commentDeleteMode) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#deleteTenant"); + System.err.println("Exception when calling DefaultApi#deleteSSOUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2829,11 +3058,12 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | -| **sure** | **String**| | [optional] | +| **deleteComments** | **Boolean**| | [optional] | +| **commentDeleteMode** | **String**| | [optional] | ### Return type -[**APIEmptyResponse**](APIEmptyResponse.md) +[**DeleteSSOUserAPIResponse**](DeleteSSOUserAPIResponse.md) ### Authorization @@ -2848,11 +3078,10 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - -# **deleteTenantPackage** -> APIEmptyResponse deleteTenantPackage(tenantId, id).execute(); + +# **deleteSubscription** +> DeleteSubscriptionAPIResponse deleteSubscription(tenantId, id).userId(userId).execute(); @@ -2880,12 +3109,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | + String userId = "userId_example"; // String | try { - APIEmptyResponse result = apiInstance.deleteTenantPackage(tenantId, id) + DeleteSubscriptionAPIResponse result = apiInstance.deleteSubscription(tenantId, id) + .userId(userId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#deleteTenantPackage"); + System.err.println("Exception when calling DefaultApi#deleteSubscription"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2901,10 +3132,11 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | +| **userId** | **String**| | [optional] | ### Return type -[**APIEmptyResponse**](APIEmptyResponse.md) +[**DeleteSubscriptionAPIResponse**](DeleteSubscriptionAPIResponse.md) ### Authorization @@ -2919,11 +3151,10 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - -# **deleteTenantUser** -> APIEmptyResponse deleteTenantUser(tenantId, id).deleteComments(deleteComments).commentDeleteMode(commentDeleteMode).execute(); + +# **deleteTenant** +> APIEmptyResponse deleteTenant(tenantId, id).sure(sure).execute(); @@ -2951,16 +3182,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | - String deleteComments = "deleteComments_example"; // String | - String commentDeleteMode = "commentDeleteMode_example"; // String | + String sure = "sure_example"; // String | try { - APIEmptyResponse result = apiInstance.deleteTenantUser(tenantId, id) - .deleteComments(deleteComments) - .commentDeleteMode(commentDeleteMode) + APIEmptyResponse result = apiInstance.deleteTenant(tenantId, id) + .sure(sure) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#deleteTenantUser"); + System.err.println("Exception when calling DefaultApi#deleteTenant"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2976,8 +3205,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | -| **deleteComments** | **String**| | [optional] | -| **commentDeleteMode** | **String**| | [optional] | +| **sure** | **String**| | [optional] | ### Return type @@ -2998,9 +3226,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **deleteUserBadge** -> APIEmptySuccessResponse deleteUserBadge(tenantId, id).execute(); + +# **deleteTenantPackage** +> APIEmptyResponse deleteTenantPackage(tenantId, id).execute(); @@ -3029,11 +3257,11 @@ public class Example { String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | try { - APIEmptySuccessResponse result = apiInstance.deleteUserBadge(tenantId, id) + APIEmptyResponse result = apiInstance.deleteTenantPackage(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#deleteUserBadge"); + System.err.println("Exception when calling DefaultApi#deleteTenantPackage"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3052,7 +3280,7 @@ public class Example { ### Return type -[**APIEmptySuccessResponse**](APIEmptySuccessResponse.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -3069,9 +3297,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **deleteVote** -> VoteDeleteResponse deleteVote(tenantId, id).editKey(editKey).execute(); + +# **deleteTenantUser** +> APIEmptyResponse deleteTenantUser(tenantId, id).deleteComments(deleteComments).commentDeleteMode(commentDeleteMode).execute(); @@ -3099,14 +3327,16 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | - String editKey = "editKey_example"; // String | + String deleteComments = "deleteComments_example"; // String | + String commentDeleteMode = "commentDeleteMode_example"; // String | try { - VoteDeleteResponse result = apiInstance.deleteVote(tenantId, id) - .editKey(editKey) + APIEmptyResponse result = apiInstance.deleteTenantUser(tenantId, id) + .deleteComments(deleteComments) + .commentDeleteMode(commentDeleteMode) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#deleteVote"); + System.err.println("Exception when calling DefaultApi#deleteTenantUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3122,11 +3352,12 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | -| **editKey** | **String**| | [optional] | +| **deleteComments** | **String**| | [optional] | +| **commentDeleteMode** | **String**| | [optional] | ### Return type -[**VoteDeleteResponse**](VoteDeleteResponse.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -3143,9 +3374,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **flagComment** -> FlagCommentResponse flagComment(tenantId, id).userId(userId).anonUserId(anonUserId).execute(); + +# **deleteUserBadge** +> APIEmptySuccessResponse deleteUserBadge(tenantId, id).execute(); @@ -3173,16 +3404,12 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | - String userId = "userId_example"; // String | - String anonUserId = "anonUserId_example"; // String | try { - FlagCommentResponse result = apiInstance.flagComment(tenantId, id) - .userId(userId) - .anonUserId(anonUserId) + APIEmptySuccessResponse result = apiInstance.deleteUserBadge(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#flagComment"); + System.err.println("Exception when calling DefaultApi#deleteUserBadge"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3198,12 +3425,10 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | -| **userId** | **String**| | [optional] | -| **anonUserId** | **String**| | [optional] | ### Return type -[**FlagCommentResponse**](FlagCommentResponse.md) +[**APIEmptySuccessResponse**](APIEmptySuccessResponse.md) ### Authorization @@ -3220,9 +3445,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getAuditLogs** -> GetAuditLogsResponse getAuditLogs(tenantId).limit(limit).skip(skip).order(order).after(after).before(before).execute(); + +# **deleteVote** +> VoteDeleteResponse deleteVote(tenantId, id).editKey(editKey).execute(); @@ -3249,22 +3474,15 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - Double limit = 3.4D; // Double | - Double skip = 3.4D; // Double | - SORTDIR order = SORTDIR.fromValue("ASC"); // SORTDIR | - Double after = 3.4D; // Double | - Double before = 3.4D; // Double | + String id = "id_example"; // String | + String editKey = "editKey_example"; // String | try { - GetAuditLogsResponse result = apiInstance.getAuditLogs(tenantId) - .limit(limit) - .skip(skip) - .order(order) - .after(after) - .before(before) + VoteDeleteResponse result = apiInstance.deleteVote(tenantId, id) + .editKey(editKey) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getAuditLogs"); + System.err.println("Exception when calling DefaultApi#deleteVote"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3279,15 +3497,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **limit** | **Double**| | [optional] | -| **skip** | **Double**| | [optional] | -| **order** | [**SORTDIR**](.md)| | [optional] [enum: ASC, DESC] | -| **after** | **Double**| | [optional] | -| **before** | **Double**| | [optional] | +| **id** | **String**| | | +| **editKey** | **String**| | [optional] | ### Return type -[**GetAuditLogsResponse**](GetAuditLogsResponse.md) +[**VoteDeleteResponse**](VoteDeleteResponse.md) ### Authorization @@ -3304,12 +3519,14 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getCachedNotificationCount** -> GetCachedNotificationCountResponse getCachedNotificationCount(tenantId, id).execute(); + +# **deleteWebhook** +> APIEmptyResponse deleteWebhook(tenantId, id).execute(); +Unsubscribes (REST hook unsubscribe). Only subscriptions created through this API can be deleted here; dashboard-managed webhooks are edited in the dashboard. + ### Example ```java // Import classes: @@ -3335,11 +3552,11 @@ public class Example { String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | try { - GetCachedNotificationCountResponse result = apiInstance.getCachedNotificationCount(tenantId, id) + APIEmptyResponse result = apiInstance.deleteWebhook(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getCachedNotificationCount"); + System.err.println("Exception when calling DefaultApi#deleteWebhook"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3358,7 +3575,7 @@ public class Example { ### Return type -[**GetCachedNotificationCountResponse**](GetCachedNotificationCountResponse.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -3375,9 +3592,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getComment** -> APIGetCommentResponse getComment(tenantId, id).execute(); + +# **flagComment** +> FlagCommentResponse flagComment(tenantId, id).userId(userId).anonUserId(anonUserId).execute(); @@ -3405,12 +3622,16 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | + String userId = "userId_example"; // String | + String anonUserId = "anonUserId_example"; // String | try { - APIGetCommentResponse result = apiInstance.getComment(tenantId, id) + FlagCommentResponse result = apiInstance.flagComment(tenantId, id) + .userId(userId) + .anonUserId(anonUserId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getComment"); + System.err.println("Exception when calling DefaultApi#flagComment"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3426,10 +3647,12 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | +| **userId** | **String**| | [optional] | +| **anonUserId** | **String**| | [optional] | ### Return type -[**APIGetCommentResponse**](APIGetCommentResponse.md) +[**FlagCommentResponse**](FlagCommentResponse.md) ### Authorization @@ -3446,9 +3669,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getComments** -> APIGetCommentsResponse getComments(tenantId).page(page).limit(limit).skip(skip).asTree(asTree).skipChildren(skipChildren).limitChildren(limitChildren).maxTreeDepth(maxTreeDepth).urlId(urlId).userId(userId).anonUserId(anonUserId).contextUserId(contextUserId).hashTag(hashTag).parentId(parentId).direction(direction).fromDate(fromDate).toDate(toDate).execute(); + +# **getAuditLogs** +> GetAuditLogsResponse getAuditLogs(tenantId).limit(limit).skip(skip).order(order).after(after).before(before).username(username).ip(ip).crudType(crudType).resourceName(resourceName).targetId(targetId).target(target).includeManagedTenants(includeManagedTenants).execute(); @@ -3474,45 +3697,37 @@ public class Example { //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); - String tenantId = "tenantId_example"; // String | - Integer page = 56; // Integer | - Integer limit = 56; // Integer | - Integer skip = 56; // Integer | - Boolean asTree = true; // Boolean | - Integer skipChildren = 56; // Integer | - Integer limitChildren = 56; // Integer | - Integer maxTreeDepth = 56; // Integer | - String urlId = "urlId_example"; // String | - String userId = "userId_example"; // String | - String anonUserId = "anonUserId_example"; // String | - String contextUserId = "contextUserId_example"; // String | - String hashTag = "hashTag_example"; // String | - String parentId = "parentId_example"; // String | - SortDirections direction = SortDirections.fromValue("OF"); // SortDirections | - Long fromDate = 56L; // Long | - Long toDate = 56L; // Long | + String tenantId = "tenantId_example"; // String | The tenant to read audit logs for. + Integer limit = 56; // Integer | How many logs to return. Max 10000, defaults to 1000. + Integer skip = 56; // Integer | How many logs to skip, for paging. + SORTDIR order = SORTDIR.fromValue("ASC"); // SORTDIR | Sort direction on the event time. Defaults to DESC (newest first). + Long after = 56L; // Long | + Long before = 56L; // Long | + String username = "username_example"; // String | Only return events performed by this username. + String ip = "ip_example"; // String | Only return events from this IP address. + String crudType = "crudType_example"; // String | Only return events of this type: c, r, u, d, or login. + String resourceName = "resourceName_example"; // String | Only return events for this resource, e.g. User or Moderator. + String targetId = "targetId_example"; // String | Only return events whose affected object has this id. + String target = "target_example"; // String | Case-insensitive substring match on the affected object's label, e.g. a username or email. + Boolean includeManagedTenants = true; // Boolean | Also return events from tenants this tenant manages. try { - APIGetCommentsResponse result = apiInstance.getComments(tenantId) - .page(page) + GetAuditLogsResponse result = apiInstance.getAuditLogs(tenantId) .limit(limit) .skip(skip) - .asTree(asTree) - .skipChildren(skipChildren) - .limitChildren(limitChildren) - .maxTreeDepth(maxTreeDepth) - .urlId(urlId) - .userId(userId) - .anonUserId(anonUserId) - .contextUserId(contextUserId) - .hashTag(hashTag) - .parentId(parentId) - .direction(direction) - .fromDate(fromDate) - .toDate(toDate) + .order(order) + .after(after) + .before(before) + .username(username) + .ip(ip) + .crudType(crudType) + .resourceName(resourceName) + .targetId(targetId) + .target(target) + .includeManagedTenants(includeManagedTenants) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getComments"); + System.err.println("Exception when calling DefaultApi#getAuditLogs"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3526,27 +3741,23 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **tenantId** | **String**| | | -| **page** | **Integer**| | [optional] | -| **limit** | **Integer**| | [optional] | -| **skip** | **Integer**| | [optional] | -| **asTree** | **Boolean**| | [optional] | -| **skipChildren** | **Integer**| | [optional] | -| **limitChildren** | **Integer**| | [optional] | -| **maxTreeDepth** | **Integer**| | [optional] | -| **urlId** | **String**| | [optional] | -| **userId** | **String**| | [optional] | -| **anonUserId** | **String**| | [optional] | -| **contextUserId** | **String**| | [optional] | -| **hashTag** | **String**| | [optional] | -| **parentId** | **String**| | [optional] | -| **direction** | [**SortDirections**](.md)| | [optional] [enum: OF, NF, MR] | -| **fromDate** | **Long**| | [optional] | -| **toDate** | **Long**| | [optional] | +| **tenantId** | **String**| The tenant to read audit logs for. | | +| **limit** | **Integer**| How many logs to return. Max 10000, defaults to 1000. | [optional] | +| **skip** | **Integer**| How many logs to skip, for paging. | [optional] | +| **order** | [**SORTDIR**](.md)| Sort direction on the event time. Defaults to DESC (newest first). | [optional] [enum: ASC, DESC] | +| **after** | **Long**| | [optional] | +| **before** | **Long**| | [optional] | +| **username** | **String**| Only return events performed by this username. | [optional] | +| **ip** | **String**| Only return events from this IP address. | [optional] | +| **crudType** | **String**| Only return events of this type: c, r, u, d, or login. | [optional] | +| **resourceName** | **String**| Only return events for this resource, e.g. User or Moderator. | [optional] | +| **targetId** | **String**| Only return events whose affected object has this id. | [optional] | +| **target** | **String**| Case-insensitive substring match on the affected object's label, e.g. a username or email. | [optional] | +| **includeManagedTenants** | **Boolean**| Also return events from tenants this tenant manages. | [optional] | ### Return type -[**APIGetCommentsResponse**](APIGetCommentsResponse.md) +[**GetAuditLogsResponse**](GetAuditLogsResponse.md) ### Authorization @@ -3563,12 +3774,14 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getDomainConfig** -> GetDomainConfigResponse getDomainConfig(tenantId, domain).execute(); + +# **getBatchJob** +> GetBatchJobAPIResponse getBatchJob(tenantId, id).execute(); +Status, progress and, once done, the result of one batch job. + ### Example ```java // Import classes: @@ -3592,13 +3805,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String domain = "domain_example"; // String | + String id = "id_example"; // String | try { - GetDomainConfigResponse result = apiInstance.getDomainConfig(tenantId, domain) + GetBatchJobAPIResponse result = apiInstance.getBatchJob(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getDomainConfig"); + System.err.println("Exception when calling DefaultApi#getBatchJob"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3613,11 +3826,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **domain** | **String**| | | +| **id** | **String**| | | ### Return type -[**GetDomainConfigResponse**](GetDomainConfigResponse.md) +[**GetBatchJobAPIResponse**](GetBatchJobAPIResponse.md) ### Authorization @@ -3633,11 +3846,13 @@ public class Example { |-------------|-------------|------------------| | **200** | Ok | - | - -# **getDomainConfigs** -> GetDomainConfigsResponse getDomainConfigs(tenantId).execute(); + +# **getBatchJobs** +> GetBatchJobsAPIResponse getBatchJobs(tenantId).type(type).status(status).skip(skip).execute(); + +The tenant's batch jobs (imports, exports, page migrations...), newest first. ### Example ```java @@ -3662,12 +3877,18 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | + String type = "type_example"; // String | Only jobs of this type, for example migrate-pages. + String status = "status_example"; // String | Only jobs in this status: requested, running, success or failed. + Integer skip = 56; // Integer | How many jobs to skip, for paging. try { - GetDomainConfigsResponse result = apiInstance.getDomainConfigs(tenantId) + GetBatchJobsAPIResponse result = apiInstance.getBatchJobs(tenantId) + .type(type) + .status(status) + .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getDomainConfigs"); + System.err.println("Exception when calling DefaultApi#getBatchJobs"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3682,10 +3903,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | +| **type** | **String**| Only jobs of this type, for example migrate-pages. | [optional] | +| **status** | **String**| Only jobs in this status: requested, running, success or failed. | [optional] | +| **skip** | **Integer**| How many jobs to skip, for paging. | [optional] | ### Return type -[**GetDomainConfigsResponse**](GetDomainConfigsResponse.md) +[**GetBatchJobsAPIResponse**](GetBatchJobsAPIResponse.md) ### Authorization @@ -3701,9 +3925,9 @@ public class Example { |-------------|-------------|------------------| | **200** | Ok | - | - -# **getEmailTemplate** -> GetEmailTemplateResponse getEmailTemplate(tenantId, id).execute(); + +# **getCachedNotificationCount** +> GetCachedNotificationCountResponse getCachedNotificationCount(tenantId, id).execute(); @@ -3732,11 +3956,11 @@ public class Example { String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | try { - GetEmailTemplateResponse result = apiInstance.getEmailTemplate(tenantId, id) + GetCachedNotificationCountResponse result = apiInstance.getCachedNotificationCount(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getEmailTemplate"); + System.err.println("Exception when calling DefaultApi#getCachedNotificationCount"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3755,7 +3979,7 @@ public class Example { ### Return type -[**GetEmailTemplateResponse**](GetEmailTemplateResponse.md) +[**GetCachedNotificationCountResponse**](GetCachedNotificationCountResponse.md) ### Authorization @@ -3772,9 +3996,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getEmailTemplateDefinitions** -> GetEmailTemplateDefinitionsResponse getEmailTemplateDefinitions(tenantId).execute(); + +# **getComment** +> APIGetCommentResponse getComment(tenantId, id).execute(); @@ -3801,12 +4025,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | + String id = "id_example"; // String | try { - GetEmailTemplateDefinitionsResponse result = apiInstance.getEmailTemplateDefinitions(tenantId) + APIGetCommentResponse result = apiInstance.getComment(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getEmailTemplateDefinitions"); + System.err.println("Exception when calling DefaultApi#getComment"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3821,10 +4046,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | +| **id** | **String**| | | ### Return type -[**GetEmailTemplateDefinitionsResponse**](GetEmailTemplateDefinitionsResponse.md) +[**APIGetCommentResponse**](APIGetCommentResponse.md) ### Authorization @@ -3841,9 +4067,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getEmailTemplateRenderErrors** -> GetEmailTemplateRenderErrorsResponse getEmailTemplateRenderErrors(tenantId, id).skip(skip).execute(); + +# **getComments** +> APIGetCommentsResponse getComments(tenantId).page(page).limit(limit).skip(skip).asTree(asTree).skipChildren(skipChildren).limitChildren(limitChildren).maxTreeDepth(maxTreeDepth).urlId(urlId).userId(userId).anonUserId(anonUserId).contextUserId(contextUserId).hashTag(hashTag).parentId(parentId).direction(direction).fromDate(fromDate).toDate(toDate).execute(); @@ -3870,15 +4096,44 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | - Double skip = 3.4D; // Double | - try { - GetEmailTemplateRenderErrorsResponse result = apiInstance.getEmailTemplateRenderErrors(tenantId, id) - .skip(skip) + Integer page = 56; // Integer | + Integer limit = 56; // Integer | + Integer skip = 56; // Integer | + Boolean asTree = true; // Boolean | + Integer skipChildren = 56; // Integer | + Integer limitChildren = 56; // Integer | + Integer maxTreeDepth = 56; // Integer | + String urlId = "urlId_example"; // String | + String userId = "userId_example"; // String | + String anonUserId = "anonUserId_example"; // String | + String contextUserId = "contextUserId_example"; // String | + String hashTag = "hashTag_example"; // String | + String parentId = "parentId_example"; // String | + SortDirections direction = SortDirections.fromValue("OF"); // SortDirections | + Long fromDate = 56L; // Long | + Long toDate = 56L; // Long | + try { + APIGetCommentsResponse result = apiInstance.getComments(tenantId) + .page(page) + .limit(limit) + .skip(skip) + .asTree(asTree) + .skipChildren(skipChildren) + .limitChildren(limitChildren) + .maxTreeDepth(maxTreeDepth) + .urlId(urlId) + .userId(userId) + .anonUserId(anonUserId) + .contextUserId(contextUserId) + .hashTag(hashTag) + .parentId(parentId) + .direction(direction) + .fromDate(fromDate) + .toDate(toDate) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getEmailTemplateRenderErrors"); + System.err.println("Exception when calling DefaultApi#getComments"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3893,12 +4148,26 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | -| **skip** | **Double**| | [optional] | +| **page** | **Integer**| | [optional] | +| **limit** | **Integer**| | [optional] | +| **skip** | **Integer**| | [optional] | +| **asTree** | **Boolean**| | [optional] | +| **skipChildren** | **Integer**| | [optional] | +| **limitChildren** | **Integer**| | [optional] | +| **maxTreeDepth** | **Integer**| | [optional] | +| **urlId** | **String**| | [optional] | +| **userId** | **String**| | [optional] | +| **anonUserId** | **String**| | [optional] | +| **contextUserId** | **String**| | [optional] | +| **hashTag** | **String**| | [optional] | +| **parentId** | **String**| | [optional] | +| **direction** | [**SortDirections**](.md)| | [optional] [enum: OF, NF, MR] | +| **fromDate** | **Long**| | [optional] | +| **toDate** | **Long**| | [optional] | ### Return type -[**GetEmailTemplateRenderErrorsResponse**](GetEmailTemplateRenderErrorsResponse.md) +[**APIGetCommentsResponse**](APIGetCommentsResponse.md) ### Authorization @@ -3915,9 +4184,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getEmailTemplates** -> GetEmailTemplatesResponse getEmailTemplates(tenantId).skip(skip).execute(); + +# **getDomainConfig** +> GetDomainConfigResponse getDomainConfig(tenantId, domain).execute(); @@ -3944,14 +4213,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - Double skip = 3.4D; // Double | + String domain = "domain_example"; // String | try { - GetEmailTemplatesResponse result = apiInstance.getEmailTemplates(tenantId) - .skip(skip) + GetDomainConfigResponse result = apiInstance.getDomainConfig(tenantId, domain) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getEmailTemplates"); + System.err.println("Exception when calling DefaultApi#getDomainConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3966,11 +4234,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **skip** | **Double**| | [optional] | +| **domain** | **String**| | | ### Return type -[**GetEmailTemplatesResponse**](GetEmailTemplatesResponse.md) +[**GetDomainConfigResponse**](GetDomainConfigResponse.md) ### Authorization @@ -3985,15 +4253,12 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - - -# **getFeedPosts** -> GetFeedPostsResponse getFeedPosts(tenantId).afterId(afterId).limit(limit).tags(tags).execute(); + +# **getDomainConfigs** +> GetDomainConfigsResponse getDomainConfigs(tenantId).execute(); - req tenantId afterId ### Example ```java @@ -4018,18 +4283,12 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String afterId = "afterId_example"; // String | - Integer limit = 56; // Integer | - List tags = Arrays.asList(); // List | try { - GetFeedPostsResponse result = apiInstance.getFeedPosts(tenantId) - .afterId(afterId) - .limit(limit) - .tags(tags) + GetDomainConfigsResponse result = apiInstance.getDomainConfigs(tenantId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getFeedPosts"); + System.err.println("Exception when calling DefaultApi#getDomainConfigs"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4044,13 +4303,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **afterId** | **String**| | [optional] | -| **limit** | **Integer**| | [optional] | -| **tags** | [**List<String>**](String.md)| | [optional] | ### Return type -[**GetFeedPostsResponse**](GetFeedPostsResponse.md) +[**GetDomainConfigsResponse**](GetDomainConfigsResponse.md) ### Authorization @@ -4065,11 +4321,10 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - -# **getHashTags** -> GetHashTagsResponse getHashTags(tenantId).page(page).execute(); + +# **getEmailTemplate** +> GetEmailTemplateResponse getEmailTemplate(tenantId, id).execute(); @@ -4096,14 +4351,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - Double page = 3.4D; // Double | + String id = "id_example"; // String | try { - GetHashTagsResponse result = apiInstance.getHashTags(tenantId) - .page(page) + GetEmailTemplateResponse result = apiInstance.getEmailTemplate(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getHashTags"); + System.err.println("Exception when calling DefaultApi#getEmailTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4118,11 +4372,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **page** | **Double**| | [optional] | +| **id** | **String**| | | ### Return type -[**GetHashTagsResponse**](GetHashTagsResponse.md) +[**GetEmailTemplateResponse**](GetEmailTemplateResponse.md) ### Authorization @@ -4139,9 +4393,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getModerator** -> GetModeratorResponse getModerator(tenantId, id).execute(); + +# **getEmailTemplateDefinitions** +> GetEmailTemplateDefinitionsResponse getEmailTemplateDefinitions(tenantId).execute(); @@ -4168,13 +4422,12 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | try { - GetModeratorResponse result = apiInstance.getModerator(tenantId, id) + GetEmailTemplateDefinitionsResponse result = apiInstance.getEmailTemplateDefinitions(tenantId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getModerator"); + System.err.println("Exception when calling DefaultApi#getEmailTemplateDefinitions"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4189,11 +4442,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | ### Return type -[**GetModeratorResponse**](GetModeratorResponse.md) +[**GetEmailTemplateDefinitionsResponse**](GetEmailTemplateDefinitionsResponse.md) ### Authorization @@ -4210,9 +4462,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getModerators** -> GetModeratorsResponse getModerators(tenantId).skip(skip).execute(); + +# **getEmailTemplateRenderErrors** +> GetEmailTemplateRenderErrorsResponse getEmailTemplateRenderErrors(tenantId, id).skip(skip).execute(); @@ -4239,14 +4491,15 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | + String id = "id_example"; // String | Double skip = 3.4D; // Double | try { - GetModeratorsResponse result = apiInstance.getModerators(tenantId) + GetEmailTemplateRenderErrorsResponse result = apiInstance.getEmailTemplateRenderErrors(tenantId, id) .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getModerators"); + System.err.println("Exception when calling DefaultApi#getEmailTemplateRenderErrors"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4261,11 +4514,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | +| **id** | **String**| | | | **skip** | **Double**| | [optional] | ### Return type -[**GetModeratorsResponse**](GetModeratorsResponse.md) +[**GetEmailTemplateRenderErrorsResponse**](GetEmailTemplateRenderErrorsResponse.md) ### Authorization @@ -4282,9 +4536,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getNotificationCount** -> GetNotificationCountResponse getNotificationCount(tenantId).userId(userId).urlId(urlId).fromCommentId(fromCommentId).viewed(viewed).type(type).execute(); + +# **getEmailTemplates** +> GetEmailTemplatesResponse getEmailTemplates(tenantId).skip(skip).execute(); @@ -4311,22 +4565,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String userId = "userId_example"; // String | - String urlId = "urlId_example"; // String | - String fromCommentId = "fromCommentId_example"; // String | - Boolean viewed = true; // Boolean | - String type = "type_example"; // String | + Double skip = 3.4D; // Double | try { - GetNotificationCountResponse result = apiInstance.getNotificationCount(tenantId) - .userId(userId) - .urlId(urlId) - .fromCommentId(fromCommentId) - .viewed(viewed) - .type(type) + GetEmailTemplatesResponse result = apiInstance.getEmailTemplates(tenantId) + .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getNotificationCount"); + System.err.println("Exception when calling DefaultApi#getEmailTemplates"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4341,15 +4587,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **userId** | **String**| | [optional] | -| **urlId** | **String**| | [optional] | -| **fromCommentId** | **String**| | [optional] | -| **viewed** | **Boolean**| | [optional] | -| **type** | **String**| | [optional] | +| **skip** | **Double**| | [optional] | ### Return type -[**GetNotificationCountResponse**](GetNotificationCountResponse.md) +[**GetEmailTemplatesResponse**](GetEmailTemplatesResponse.md) ### Authorization @@ -4366,11 +4608,13 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getNotifications** -> GetNotificationsResponse getNotifications(tenantId).userId(userId).urlId(urlId).fromCommentId(fromCommentId).viewed(viewed).type(type).skip(skip).execute(); + +# **getFeedPosts** +> GetFeedPostsResponse getFeedPosts(tenantId).afterId(afterId).limit(limit).tags(tags).execute(); + + req tenantId afterId ### Example ```java @@ -4395,24 +4639,18 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String userId = "userId_example"; // String | - String urlId = "urlId_example"; // String | - String fromCommentId = "fromCommentId_example"; // String | - Boolean viewed = true; // Boolean | - String type = "type_example"; // String | - Double skip = 3.4D; // Double | + String afterId = "afterId_example"; // String | + Integer limit = 56; // Integer | + List tags = Arrays.asList(); // List | try { - GetNotificationsResponse result = apiInstance.getNotifications(tenantId) - .userId(userId) - .urlId(urlId) - .fromCommentId(fromCommentId) - .viewed(viewed) - .type(type) - .skip(skip) + GetFeedPostsResponse result = apiInstance.getFeedPosts(tenantId) + .afterId(afterId) + .limit(limit) + .tags(tags) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getNotifications"); + System.err.println("Exception when calling DefaultApi#getFeedPosts"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4427,16 +4665,1230 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **userId** | **String**| | [optional] | -| **urlId** | **String**| | [optional] | -| **fromCommentId** | **String**| | [optional] | -| **viewed** | **Boolean**| | [optional] | -| **type** | **String**| | [optional] | -| **skip** | **Double**| | [optional] | +| **afterId** | **String**| | [optional] | +| **limit** | **Integer**| | [optional] | +| **tags** | [**List<String>**](String.md)| | [optional] | + +### Return type + +[**GetFeedPostsResponse**](GetFeedPostsResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getHashTags** +> GetHashTagsResponse getHashTags(tenantId).page(page).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + Double page = 3.4D; // Double | + try { + GetHashTagsResponse result = apiInstance.getHashTags(tenantId) + .page(page) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getHashTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **page** | **Double**| | [optional] | + +### Return type + +[**GetHashTagsResponse**](GetHashTagsResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getMe** +> GetMeResponse getMe(tenantId).execute(); + + + +Identifies the credential in use: the tenant it belongs to and, for OAuth tokens, the user who authorized it. Integrations use this to test a connection and label it. + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + try { + GetMeResponse result = apiInstance.getMe(tenantId) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getMe"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | + +### Return type + +[**GetMeResponse**](GetMeResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getModerator** +> GetModeratorResponse getModerator(tenantId, id).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String id = "id_example"; // String | + try { + GetModeratorResponse result = apiInstance.getModerator(tenantId, id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getModerator"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **id** | **String**| | | + +### Return type + +[**GetModeratorResponse**](GetModeratorResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getModerators** +> GetModeratorsResponse getModerators(tenantId).skip(skip).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + Double skip = 3.4D; // Double | + try { + GetModeratorsResponse result = apiInstance.getModerators(tenantId) + .skip(skip) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getModerators"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **skip** | **Double**| | [optional] | + +### Return type + +[**GetModeratorsResponse**](GetModeratorsResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getNotificationCount** +> GetNotificationCountResponse getNotificationCount(tenantId).userId(userId).urlId(urlId).fromCommentId(fromCommentId).viewed(viewed).type(type).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String userId = "userId_example"; // String | + String urlId = "urlId_example"; // String | + String fromCommentId = "fromCommentId_example"; // String | + Boolean viewed = true; // Boolean | + String type = "type_example"; // String | + try { + GetNotificationCountResponse result = apiInstance.getNotificationCount(tenantId) + .userId(userId) + .urlId(urlId) + .fromCommentId(fromCommentId) + .viewed(viewed) + .type(type) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getNotificationCount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **userId** | **String**| | [optional] | +| **urlId** | **String**| | [optional] | +| **fromCommentId** | **String**| | [optional] | +| **viewed** | **Boolean**| | [optional] | +| **type** | **String**| | [optional] | + +### Return type + +[**GetNotificationCountResponse**](GetNotificationCountResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getNotifications** +> GetNotificationsResponse getNotifications(tenantId).userId(userId).urlId(urlId).fromCommentId(fromCommentId).viewed(viewed).type(type).skip(skip).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String userId = "userId_example"; // String | + String urlId = "urlId_example"; // String | + String fromCommentId = "fromCommentId_example"; // String | + Boolean viewed = true; // Boolean | + String type = "type_example"; // String | + Double skip = 3.4D; // Double | + try { + GetNotificationsResponse result = apiInstance.getNotifications(tenantId) + .userId(userId) + .urlId(urlId) + .fromCommentId(fromCommentId) + .viewed(viewed) + .type(type) + .skip(skip) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getNotifications"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **userId** | **String**| | [optional] | +| **urlId** | **String**| | [optional] | +| **fromCommentId** | **String**| | [optional] | +| **viewed** | **Boolean**| | [optional] | +| **type** | **String**| | [optional] | +| **skip** | **Double**| | [optional] | + +### Return type + +[**GetNotificationsResponse**](GetNotificationsResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getPageByURLId** +> GetPageByURLIdAPIResponse getPageByURLId(tenantId, urlId).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String urlId = "urlId_example"; // String | + try { + GetPageByURLIdAPIResponse result = apiInstance.getPageByURLId(tenantId, urlId) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPageByURLId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **urlId** | **String**| | | + +### Return type + +[**GetPageByURLIdAPIResponse**](GetPageByURLIdAPIResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | + + +# **getPageLikes** +> GetPageLikesAPIResponse getPageLikes(tenantId, urlId).includeUserInfo(includeUserInfo).execute(); + + + +Like count for a page, optionally with the users who liked it. + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String urlId = "urlId_example"; // String | + PageReactIncludeUserInfo includeUserInfo = PageReactIncludeUserInfo.fromValue("public"); // PageReactIncludeUserInfo | \"public\" omits users with private profiles, \"include-private\" includes them. + try { + GetPageLikesAPIResponse result = apiInstance.getPageLikes(tenantId, urlId) + .includeUserInfo(includeUserInfo) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPageLikes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **urlId** | **String**| | | +| **includeUserInfo** | [**PageReactIncludeUserInfo**](.md)| \"public\" omits users with private profiles, \"include-private\" includes them. | [optional] [enum: public, include-private] | + +### Return type + +[**GetPageLikesAPIResponse**](GetPageLikesAPIResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | + + +# **getPageReacts** +> GetPageReactsAPIResponse getPageReacts(tenantId, urlId).includeUserInfo(includeUserInfo).execute(); + + + +Custom react counts for a page, optionally with the users who reacted. + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String urlId = "urlId_example"; // String | + PageReactIncludeUserInfo includeUserInfo = PageReactIncludeUserInfo.fromValue("public"); // PageReactIncludeUserInfo | \"public\" omits users with private profiles, \"include-private\" includes them. + try { + GetPageReactsAPIResponse result = apiInstance.getPageReacts(tenantId, urlId) + .includeUserInfo(includeUserInfo) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPageReacts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **urlId** | **String**| | | +| **includeUserInfo** | [**PageReactIncludeUserInfo**](.md)| \"public\" omits users with private profiles, \"include-private\" includes them. | [optional] [enum: public, include-private] | + +### Return type + +[**GetPageReactsAPIResponse**](GetPageReactsAPIResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | + + +# **getPages** +> GetPagesAPIResponse getPages(tenantId).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + try { + GetPagesAPIResponse result = apiInstance.getPages(tenantId) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPages"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | + +### Return type + +[**GetPagesAPIResponse**](GetPagesAPIResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | + + +# **getPendingWebhookEventCount** +> GetPendingWebhookEventCountResponse getPendingWebhookEventCount(tenantId).commentId(commentId).externalId(externalId).eventType(eventType).type(type).domain(domain).attemptCountGT(attemptCountGT).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String commentId = "commentId_example"; // String | + String externalId = "externalId_example"; // String | + String eventType = "eventType_example"; // String | + String type = "type_example"; // String | + String domain = "domain_example"; // String | + Double attemptCountGT = 3.4D; // Double | + try { + GetPendingWebhookEventCountResponse result = apiInstance.getPendingWebhookEventCount(tenantId) + .commentId(commentId) + .externalId(externalId) + .eventType(eventType) + .type(type) + .domain(domain) + .attemptCountGT(attemptCountGT) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPendingWebhookEventCount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **commentId** | **String**| | [optional] | +| **externalId** | **String**| | [optional] | +| **eventType** | **String**| | [optional] | +| **type** | **String**| | [optional] | +| **domain** | **String**| | [optional] | +| **attemptCountGT** | **Double**| | [optional] | + +### Return type + +[**GetPendingWebhookEventCountResponse**](GetPendingWebhookEventCountResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getPendingWebhookEvents** +> GetPendingWebhookEventsResponse getPendingWebhookEvents(tenantId).commentId(commentId).externalId(externalId).eventType(eventType).type(type).domain(domain).attemptCountGT(attemptCountGT).skip(skip).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String commentId = "commentId_example"; // String | + String externalId = "externalId_example"; // String | + String eventType = "eventType_example"; // String | + String type = "type_example"; // String | + String domain = "domain_example"; // String | + Double attemptCountGT = 3.4D; // Double | + Double skip = 3.4D; // Double | + try { + GetPendingWebhookEventsResponse result = apiInstance.getPendingWebhookEvents(tenantId) + .commentId(commentId) + .externalId(externalId) + .eventType(eventType) + .type(type) + .domain(domain) + .attemptCountGT(attemptCountGT) + .skip(skip) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPendingWebhookEvents"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **commentId** | **String**| | [optional] | +| **externalId** | **String**| | [optional] | +| **eventType** | **String**| | [optional] | +| **type** | **String**| | [optional] | +| **domain** | **String**| | [optional] | +| **attemptCountGT** | **Double**| | [optional] | +| **skip** | **Double**| | [optional] | + +### Return type + +[**GetPendingWebhookEventsResponse**](GetPendingWebhookEventsResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getPoll** +> GetPollResponse getPoll(tenantId, commentId).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String commentId = "commentId_example"; // String | + try { + GetPollResponse result = apiInstance.getPoll(tenantId, commentId) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPoll"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **commentId** | **String**| | | + +### Return type + +[**GetPollResponse**](GetPollResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getPollVote** +> GetPollVoteResponse getPollVote(tenantId, id).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String id = "id_example"; // String | + try { + GetPollVoteResponse result = apiInstance.getPollVote(tenantId, id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPollVote"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **id** | **String**| | | + +### Return type + +[**GetPollVoteResponse**](GetPollVoteResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getPollVotes** +> GetPollVotesResponse getPollVotes(tenantId, commentId).voterId(voterId).optionId(optionId).skip(skip).execute(); + + + +The individual votes behind one poll's tallies, oldest first. A poll belongs to a comment, so votes are always read one poll at a time - commentId is required. That keeps every query on the indexes the collection already has. Obeys the poll's privacy: an anonymous poll's votes cannot be read (poll-anonymous), here or by id. + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String commentId = "commentId_example"; // String | + String voterId = "voterId_example"; // String | + String optionId = "optionId_example"; // String | + Integer skip = 56; // Integer | + try { + GetPollVotesResponse result = apiInstance.getPollVotes(tenantId, commentId) + .voterId(voterId) + .optionId(optionId) + .skip(skip) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getPollVotes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **commentId** | **String**| | | +| **voterId** | **String**| | [optional] | +| **optionId** | **String**| | [optional] | +| **skip** | **Integer**| | [optional] | + +### Return type + +[**GetPollVotesResponse**](GetPollVotesResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + + +# **getQuestionConfig** +> GetQuestionConfigResponse getQuestionConfig(tenantId, id).execute(); + + + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String id = "id_example"; // String | + try { + GetQuestionConfigResponse result = apiInstance.getQuestionConfig(tenantId, id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#getQuestionConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **id** | **String**| | | ### Return type -[**GetNotificationsResponse**](GetNotificationsResponse.md) +[**GetQuestionConfigResponse**](GetQuestionConfigResponse.md) ### Authorization @@ -4453,9 +5905,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getPageByURLId** -> GetPageByURLIdAPIResponse getPageByURLId(tenantId, urlId).execute(); + +# **getQuestionConfigs** +> GetQuestionConfigsResponse getQuestionConfigs(tenantId).skip(skip).execute(); @@ -4482,13 +5934,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String urlId = "urlId_example"; // String | + Double skip = 3.4D; // Double | try { - GetPageByURLIdAPIResponse result = apiInstance.getPageByURLId(tenantId, urlId) + GetQuestionConfigsResponse result = apiInstance.getQuestionConfigs(tenantId) + .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getPageByURLId"); + System.err.println("Exception when calling DefaultApi#getQuestionConfigs"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4503,11 +5956,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **urlId** | **String**| | | +| **skip** | **Double**| | [optional] | ### Return type -[**GetPageByURLIdAPIResponse**](GetPageByURLIdAPIResponse.md) +[**GetQuestionConfigsResponse**](GetQuestionConfigsResponse.md) ### Authorization @@ -4522,10 +5975,11 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **0** | Error | - | - -# **getPages** -> GetPagesAPIResponse getPages(tenantId).execute(); + +# **getQuestionResult** +> GetQuestionResultResponse getQuestionResult(tenantId, id).execute(); @@ -4552,12 +6006,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | + String id = "id_example"; // String | try { - GetPagesAPIResponse result = apiInstance.getPages(tenantId) + GetQuestionResultResponse result = apiInstance.getQuestionResult(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getPages"); + System.err.println("Exception when calling DefaultApi#getQuestionResult"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4572,10 +6027,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | +| **id** | **String**| | | ### Return type -[**GetPagesAPIResponse**](GetPagesAPIResponse.md) +[**GetQuestionResultResponse**](GetQuestionResultResponse.md) ### Authorization @@ -4590,10 +6046,11 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **0** | Error | - | - -# **getPendingWebhookEventCount** -> GetPendingWebhookEventCountResponse getPendingWebhookEventCount(tenantId).commentId(commentId).externalId(externalId).eventType(eventType).type(type).domain(domain).attemptCountGT(attemptCountGT).execute(); + +# **getQuestionResults** +> GetQuestionResultsResponse getQuestionResults(tenantId).urlId(urlId).userId(userId).startDate(startDate).questionId(questionId).questionIds(questionIds).skip(skip).execute(); @@ -4620,24 +6077,24 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String commentId = "commentId_example"; // String | - String externalId = "externalId_example"; // String | - String eventType = "eventType_example"; // String | - String type = "type_example"; // String | - String domain = "domain_example"; // String | - Double attemptCountGT = 3.4D; // Double | + String urlId = "urlId_example"; // String | + String userId = "userId_example"; // String | + String startDate = "startDate_example"; // String | + String questionId = "questionId_example"; // String | + String questionIds = "questionIds_example"; // String | + Double skip = 3.4D; // Double | try { - GetPendingWebhookEventCountResponse result = apiInstance.getPendingWebhookEventCount(tenantId) - .commentId(commentId) - .externalId(externalId) - .eventType(eventType) - .type(type) - .domain(domain) - .attemptCountGT(attemptCountGT) + GetQuestionResultsResponse result = apiInstance.getQuestionResults(tenantId) + .urlId(urlId) + .userId(userId) + .startDate(startDate) + .questionId(questionId) + .questionIds(questionIds) + .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getPendingWebhookEventCount"); + System.err.println("Exception when calling DefaultApi#getQuestionResults"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4652,16 +6109,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **commentId** | **String**| | [optional] | -| **externalId** | **String**| | [optional] | -| **eventType** | **String**| | [optional] | -| **type** | **String**| | [optional] | -| **domain** | **String**| | [optional] | -| **attemptCountGT** | **Double**| | [optional] | +| **urlId** | **String**| | [optional] | +| **userId** | **String**| | [optional] | +| **startDate** | **String**| | [optional] | +| **questionId** | **String**| | [optional] | +| **questionIds** | **String**| | [optional] | +| **skip** | **Double**| | [optional] | ### Return type -[**GetPendingWebhookEventCountResponse**](GetPendingWebhookEventCountResponse.md) +[**GetQuestionResultsResponse**](GetQuestionResultsResponse.md) ### Authorization @@ -4678,9 +6135,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getPendingWebhookEvents** -> GetPendingWebhookEventsResponse getPendingWebhookEvents(tenantId).commentId(commentId).externalId(externalId).eventType(eventType).type(type).domain(domain).attemptCountGT(attemptCountGT).skip(skip).execute(); + +# **getSSOUserByEmail** +> GetSSOUserByEmailAPIResponse getSSOUserByEmail(tenantId, email).execute(); @@ -4707,26 +6164,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String commentId = "commentId_example"; // String | - String externalId = "externalId_example"; // String | - String eventType = "eventType_example"; // String | - String type = "type_example"; // String | - String domain = "domain_example"; // String | - Double attemptCountGT = 3.4D; // Double | - Double skip = 3.4D; // Double | + String email = "email_example"; // String | try { - GetPendingWebhookEventsResponse result = apiInstance.getPendingWebhookEvents(tenantId) - .commentId(commentId) - .externalId(externalId) - .eventType(eventType) - .type(type) - .domain(domain) - .attemptCountGT(attemptCountGT) - .skip(skip) + GetSSOUserByEmailAPIResponse result = apiInstance.getSSOUserByEmail(tenantId, email) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getPendingWebhookEvents"); + System.err.println("Exception when calling DefaultApi#getSSOUserByEmail"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4741,17 +6185,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **commentId** | **String**| | [optional] | -| **externalId** | **String**| | [optional] | -| **eventType** | **String**| | [optional] | -| **type** | **String**| | [optional] | -| **domain** | **String**| | [optional] | -| **attemptCountGT** | **Double**| | [optional] | -| **skip** | **Double**| | [optional] | +| **email** | **String**| | | ### Return type -[**GetPendingWebhookEventsResponse**](GetPendingWebhookEventsResponse.md) +[**GetSSOUserByEmailAPIResponse**](GetSSOUserByEmailAPIResponse.md) ### Authorization @@ -4766,11 +6204,10 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - -# **getQuestionConfig** -> GetQuestionConfigResponse getQuestionConfig(tenantId, id).execute(); + +# **getSSOUserById** +> GetSSOUserByIdAPIResponse getSSOUserById(tenantId, id).execute(); @@ -4799,11 +6236,11 @@ public class Example { String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | try { - GetQuestionConfigResponse result = apiInstance.getQuestionConfig(tenantId, id) + GetSSOUserByIdAPIResponse result = apiInstance.getSSOUserById(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getQuestionConfig"); + System.err.println("Exception when calling DefaultApi#getSSOUserById"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4822,7 +6259,7 @@ public class Example { ### Return type -[**GetQuestionConfigResponse**](GetQuestionConfigResponse.md) +[**GetSSOUserByIdAPIResponse**](GetSSOUserByIdAPIResponse.md) ### Authorization @@ -4837,11 +6274,10 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - -# **getQuestionConfigs** -> GetQuestionConfigsResponse getQuestionConfigs(tenantId).skip(skip).execute(); + +# **getSSOUsers** +> GetSSOUsersResponse getSSOUsers(tenantId).skip(skip).execute(); @@ -4868,14 +6304,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - Double skip = 3.4D; // Double | + Integer skip = 56; // Integer | try { - GetQuestionConfigsResponse result = apiInstance.getQuestionConfigs(tenantId) + GetSSOUsersResponse result = apiInstance.getSSOUsers(tenantId) .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getQuestionConfigs"); + System.err.println("Exception when calling DefaultApi#getSSOUsers"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4890,11 +6326,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **skip** | **Double**| | [optional] | +| **skip** | **Integer**| | [optional] | ### Return type -[**GetQuestionConfigsResponse**](GetQuestionConfigsResponse.md) +[**GetSSOUsersResponse**](GetSSOUsersResponse.md) ### Authorization @@ -4909,11 +6345,10 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - -# **getQuestionResult** -> GetQuestionResultResponse getQuestionResult(tenantId, id).execute(); + +# **getSubscriptions** +> GetSubscriptionsAPIResponse getSubscriptions(tenantId).userId(userId).execute(); @@ -4940,13 +6375,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | + String userId = "userId_example"; // String | try { - GetQuestionResultResponse result = apiInstance.getQuestionResult(tenantId, id) + GetSubscriptionsAPIResponse result = apiInstance.getSubscriptions(tenantId) + .userId(userId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getQuestionResult"); + System.err.println("Exception when calling DefaultApi#getSubscriptions"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4961,11 +6397,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | +| **userId** | **String**| | [optional] | ### Return type -[**GetQuestionResultResponse**](GetQuestionResultResponse.md) +[**GetSubscriptionsAPIResponse**](GetSubscriptionsAPIResponse.md) ### Authorization @@ -4980,11 +6416,10 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - -# **getQuestionResults** -> GetQuestionResultsResponse getQuestionResults(tenantId).urlId(urlId).userId(userId).startDate(startDate).questionId(questionId).questionIds(questionIds).skip(skip).execute(); + +# **getTenant** +> GetTenantResponse getTenant(tenantId, id).execute(); @@ -5011,24 +6446,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String urlId = "urlId_example"; // String | - String userId = "userId_example"; // String | - String startDate = "startDate_example"; // String | - String questionId = "questionId_example"; // String | - String questionIds = "questionIds_example"; // String | - Double skip = 3.4D; // Double | + String id = "id_example"; // String | try { - GetQuestionResultsResponse result = apiInstance.getQuestionResults(tenantId) - .urlId(urlId) - .userId(userId) - .startDate(startDate) - .questionId(questionId) - .questionIds(questionIds) - .skip(skip) + GetTenantResponse result = apiInstance.getTenant(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getQuestionResults"); + System.err.println("Exception when calling DefaultApi#getTenant"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5043,16 +6467,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **urlId** | **String**| | [optional] | -| **userId** | **String**| | [optional] | -| **startDate** | **String**| | [optional] | -| **questionId** | **String**| | [optional] | -| **questionIds** | **String**| | [optional] | -| **skip** | **Double**| | [optional] | +| **id** | **String**| | | ### Return type -[**GetQuestionResultsResponse**](GetQuestionResultsResponse.md) +[**GetTenantResponse**](GetTenantResponse.md) ### Authorization @@ -5069,9 +6488,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getSSOUserByEmail** -> GetSSOUserByEmailAPIResponse getSSOUserByEmail(tenantId, email).execute(); + +# **getTenantDailyUsages** +> GetTenantDailyUsagesResponse getTenantDailyUsages(tenantId).yearNumber(yearNumber).monthNumber(monthNumber).dayNumber(dayNumber).skip(skip).execute(); @@ -5098,13 +6517,20 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String email = "email_example"; // String | + Double yearNumber = 3.4D; // Double | + Double monthNumber = 3.4D; // Double | + Double dayNumber = 3.4D; // Double | + Double skip = 3.4D; // Double | try { - GetSSOUserByEmailAPIResponse result = apiInstance.getSSOUserByEmail(tenantId, email) + GetTenantDailyUsagesResponse result = apiInstance.getTenantDailyUsages(tenantId) + .yearNumber(yearNumber) + .monthNumber(monthNumber) + .dayNumber(dayNumber) + .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getSSOUserByEmail"); + System.err.println("Exception when calling DefaultApi#getTenantDailyUsages"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5119,11 +6545,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **email** | **String**| | | +| **yearNumber** | **Double**| | [optional] | +| **monthNumber** | **Double**| | [optional] | +| **dayNumber** | **Double**| | [optional] | +| **skip** | **Double**| | [optional] | ### Return type -[**GetSSOUserByEmailAPIResponse**](GetSSOUserByEmailAPIResponse.md) +[**GetTenantDailyUsagesResponse**](GetTenantDailyUsagesResponse.md) ### Authorization @@ -5138,10 +6567,11 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **0** | Error | - | - -# **getSSOUserById** -> GetSSOUserByIdAPIResponse getSSOUserById(tenantId, id).execute(); + +# **getTenantPackage** +> GetTenantPackageResponse getTenantPackage(tenantId, id).execute(); @@ -5170,11 +6600,11 @@ public class Example { String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | try { - GetSSOUserByIdAPIResponse result = apiInstance.getSSOUserById(tenantId, id) + GetTenantPackageResponse result = apiInstance.getTenantPackage(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getSSOUserById"); + System.err.println("Exception when calling DefaultApi#getTenantPackage"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5193,7 +6623,7 @@ public class Example { ### Return type -[**GetSSOUserByIdAPIResponse**](GetSSOUserByIdAPIResponse.md) +[**GetTenantPackageResponse**](GetTenantPackageResponse.md) ### Authorization @@ -5208,10 +6638,11 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **0** | Error | - | - -# **getSSOUsers** -> GetSSOUsersResponse getSSOUsers(tenantId).skip(skip).execute(); + +# **getTenantPackages** +> GetTenantPackagesResponse getTenantPackages(tenantId).skip(skip).execute(); @@ -5238,14 +6669,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - Integer skip = 56; // Integer | + Double skip = 3.4D; // Double | try { - GetSSOUsersResponse result = apiInstance.getSSOUsers(tenantId) + GetTenantPackagesResponse result = apiInstance.getTenantPackages(tenantId) .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getSSOUsers"); + System.err.println("Exception when calling DefaultApi#getTenantPackages"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5260,11 +6691,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **skip** | **Integer**| | [optional] | +| **skip** | **Double**| | [optional] | ### Return type -[**GetSSOUsersResponse**](GetSSOUsersResponse.md) +[**GetTenantPackagesResponse**](GetTenantPackagesResponse.md) ### Authorization @@ -5279,10 +6710,11 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **0** | Error | - | - -# **getSubscriptions** -> GetSubscriptionsAPIResponse getSubscriptions(tenantId).userId(userId).execute(); + +# **getTenantUser** +> GetTenantUserResponse getTenantUser(tenantId, id).execute(); @@ -5309,14 +6741,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String userId = "userId_example"; // String | + String id = "id_example"; // String | try { - GetSubscriptionsAPIResponse result = apiInstance.getSubscriptions(tenantId) - .userId(userId) + GetTenantUserResponse result = apiInstance.getTenantUser(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getSubscriptions"); + System.err.println("Exception when calling DefaultApi#getTenantUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5331,11 +6762,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **userId** | **String**| | [optional] | +| **id** | **String**| | | ### Return type -[**GetSubscriptionsAPIResponse**](GetSubscriptionsAPIResponse.md) +[**GetTenantUserResponse**](GetTenantUserResponse.md) ### Authorization @@ -5350,10 +6781,11 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **0** | Error | - | - -# **getTenant** -> GetTenantResponse getTenant(tenantId, id).execute(); + +# **getTenantUsers** +> GetTenantUsersResponse getTenantUsers(tenantId).skip(skip).execute(); @@ -5380,13 +6812,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | + Double skip = 3.4D; // Double | try { - GetTenantResponse result = apiInstance.getTenant(tenantId, id) + GetTenantUsersResponse result = apiInstance.getTenantUsers(tenantId) + .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getTenant"); + System.err.println("Exception when calling DefaultApi#getTenantUsers"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5401,11 +6834,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | +| **skip** | **Double**| | [optional] | ### Return type -[**GetTenantResponse**](GetTenantResponse.md) +[**GetTenantUsersResponse**](GetTenantUsersResponse.md) ### Authorization @@ -5422,9 +6855,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getTenantDailyUsages** -> GetTenantDailyUsagesResponse getTenantDailyUsages(tenantId).yearNumber(yearNumber).monthNumber(monthNumber).dayNumber(dayNumber).skip(skip).execute(); + +# **getTenants** +> GetTenantsResponse getTenants(tenantId).meta(meta).skip(skip).execute(); @@ -5451,20 +6884,16 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - Double yearNumber = 3.4D; // Double | - Double monthNumber = 3.4D; // Double | - Double dayNumber = 3.4D; // Double | + String meta = "meta_example"; // String | Double skip = 3.4D; // Double | try { - GetTenantDailyUsagesResponse result = apiInstance.getTenantDailyUsages(tenantId) - .yearNumber(yearNumber) - .monthNumber(monthNumber) - .dayNumber(dayNumber) + GetTenantsResponse result = apiInstance.getTenants(tenantId) + .meta(meta) .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getTenantDailyUsages"); + System.err.println("Exception when calling DefaultApi#getTenants"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5479,14 +6908,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **yearNumber** | **Double**| | [optional] | -| **monthNumber** | **Double**| | [optional] | -| **dayNumber** | **Double**| | [optional] | +| **meta** | **String**| | [optional] | | **skip** | **Double**| | [optional] | ### Return type -[**GetTenantDailyUsagesResponse**](GetTenantDailyUsagesResponse.md) +[**GetTenantsResponse**](GetTenantsResponse.md) ### Authorization @@ -5503,9 +6930,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getTenantPackage** -> GetTenantPackageResponse getTenantPackage(tenantId, id).execute(); + +# **getTicket** +> GetTicketResponse getTicket(tenantId, id).userId(userId).execute(); @@ -5533,12 +6960,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | + String userId = "userId_example"; // String | try { - GetTenantPackageResponse result = apiInstance.getTenantPackage(tenantId, id) + GetTicketResponse result = apiInstance.getTicket(tenantId, id) + .userId(userId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getTenantPackage"); + System.err.println("Exception when calling DefaultApi#getTicket"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5554,10 +6983,11 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | +| **userId** | **String**| | [optional] | ### Return type -[**GetTenantPackageResponse**](GetTenantPackageResponse.md) +[**GetTicketResponse**](GetTicketResponse.md) ### Authorization @@ -5574,9 +7004,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getTenantPackages** -> GetTenantPackagesResponse getTenantPackages(tenantId).skip(skip).execute(); + +# **getTickets** +> GetTicketsResponse getTickets(tenantId).userId(userId).state(state).skip(skip).limit(limit).execute(); @@ -5603,14 +7033,20 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | + String userId = "userId_example"; // String | + Double state = 3.4D; // Double | Double skip = 3.4D; // Double | + Double limit = 3.4D; // Double | try { - GetTenantPackagesResponse result = apiInstance.getTenantPackages(tenantId) + GetTicketsResponse result = apiInstance.getTickets(tenantId) + .userId(userId) + .state(state) .skip(skip) + .limit(limit) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getTenantPackages"); + System.err.println("Exception when calling DefaultApi#getTickets"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5625,11 +7061,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | +| **userId** | **String**| | [optional] | +| **state** | **Double**| | [optional] | | **skip** | **Double**| | [optional] | +| **limit** | **Double**| | [optional] | ### Return type -[**GetTenantPackagesResponse**](GetTenantPackagesResponse.md) +[**GetTicketsResponse**](GetTicketsResponse.md) ### Authorization @@ -5646,9 +7085,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getTenantUser** -> GetTenantUserResponse getTenantUser(tenantId, id).execute(); + +# **getUser** +> GetUserResponse getUser(tenantId, id).execute(); @@ -5677,11 +7116,11 @@ public class Example { String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | try { - GetTenantUserResponse result = apiInstance.getTenantUser(tenantId, id) + GetUserResponse result = apiInstance.getUser(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getTenantUser"); + System.err.println("Exception when calling DefaultApi#getUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5700,7 +7139,7 @@ public class Example { ### Return type -[**GetTenantUserResponse**](GetTenantUserResponse.md) +[**GetUserResponse**](GetUserResponse.md) ### Authorization @@ -5717,9 +7156,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getTenantUsers** -> GetTenantUsersResponse getTenantUsers(tenantId).skip(skip).execute(); + +# **getUserBadge** +> APIGetUserBadgeResponse getUserBadge(tenantId, id).execute(); @@ -5746,14 +7185,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - Double skip = 3.4D; // Double | + String id = "id_example"; // String | try { - GetTenantUsersResponse result = apiInstance.getTenantUsers(tenantId) - .skip(skip) + APIGetUserBadgeResponse result = apiInstance.getUserBadge(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getTenantUsers"); + System.err.println("Exception when calling DefaultApi#getUserBadge"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5768,11 +7206,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **skip** | **Double**| | [optional] | +| **id** | **String**| | | ### Return type -[**GetTenantUsersResponse**](GetTenantUsersResponse.md) +[**APIGetUserBadgeResponse**](APIGetUserBadgeResponse.md) ### Authorization @@ -5789,9 +7227,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getTenants** -> GetTenantsResponse getTenants(tenantId).meta(meta).skip(skip).execute(); + +# **getUserBadgeProgressById** +> APIGetUserBadgeProgressResponse getUserBadgeProgressById(tenantId, id).execute(); @@ -5818,16 +7256,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String meta = "meta_example"; // String | - Double skip = 3.4D; // Double | + String id = "id_example"; // String | try { - GetTenantsResponse result = apiInstance.getTenants(tenantId) - .meta(meta) - .skip(skip) + APIGetUserBadgeProgressResponse result = apiInstance.getUserBadgeProgressById(tenantId, id) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getTenants"); + System.err.println("Exception when calling DefaultApi#getUserBadgeProgressById"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5842,12 +7277,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **meta** | **String**| | [optional] | -| **skip** | **Double**| | [optional] | +| **id** | **String**| | | ### Return type -[**GetTenantsResponse**](GetTenantsResponse.md) +[**APIGetUserBadgeProgressResponse**](APIGetUserBadgeProgressResponse.md) ### Authorization @@ -5864,9 +7298,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getTicket** -> GetTicketResponse getTicket(tenantId, id).userId(userId).execute(); + +# **getUserBadgeProgressByUserId** +> APIGetUserBadgeProgressResponse getUserBadgeProgressByUserId(tenantId, userId).execute(); @@ -5893,15 +7327,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | String userId = "userId_example"; // String | try { - GetTicketResponse result = apiInstance.getTicket(tenantId, id) - .userId(userId) + APIGetUserBadgeProgressResponse result = apiInstance.getUserBadgeProgressByUserId(tenantId, userId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getTicket"); + System.err.println("Exception when calling DefaultApi#getUserBadgeProgressByUserId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5916,12 +7348,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | -| **userId** | **String**| | [optional] | +| **userId** | **String**| | | ### Return type -[**GetTicketResponse**](GetTicketResponse.md) +[**APIGetUserBadgeProgressResponse**](APIGetUserBadgeProgressResponse.md) ### Authorization @@ -5938,9 +7369,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getTickets** -> GetTicketsResponse getTickets(tenantId).userId(userId).state(state).skip(skip).limit(limit).execute(); + +# **getUserBadgeProgressList** +> APIGetUserBadgeProgressListResponse getUserBadgeProgressList(tenantId).userId(userId).limit(limit).skip(skip).execute(); @@ -5968,19 +7399,17 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String userId = "userId_example"; // String | - Double state = 3.4D; // Double | - Double skip = 3.4D; // Double | Double limit = 3.4D; // Double | + Double skip = 3.4D; // Double | try { - GetTicketsResponse result = apiInstance.getTickets(tenantId) + APIGetUserBadgeProgressListResponse result = apiInstance.getUserBadgeProgressList(tenantId) .userId(userId) - .state(state) - .skip(skip) .limit(limit) + .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getTickets"); + System.err.println("Exception when calling DefaultApi#getUserBadgeProgressList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -5996,13 +7425,12 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **userId** | **String**| | [optional] | -| **state** | **Double**| | [optional] | -| **skip** | **Double**| | [optional] | | **limit** | **Double**| | [optional] | +| **skip** | **Double**| | [optional] | ### Return type -[**GetTicketsResponse**](GetTicketsResponse.md) +[**APIGetUserBadgeProgressListResponse**](APIGetUserBadgeProgressListResponse.md) ### Authorization @@ -6019,9 +7447,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getUser** -> GetUserResponse getUser(tenantId, id).execute(); + +# **getUserBadges** +> APIGetUserBadgesResponse getUserBadges(tenantId).userId(userId).badgeId(badgeId).type(type).displayedOnComments(displayedOnComments).limit(limit).skip(skip).execute(); @@ -6048,13 +7476,24 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | + String userId = "userId_example"; // String | + String badgeId = "badgeId_example"; // String | + Double type = 3.4D; // Double | + Boolean displayedOnComments = true; // Boolean | + Double limit = 3.4D; // Double | + Double skip = 3.4D; // Double | try { - GetUserResponse result = apiInstance.getUser(tenantId, id) + APIGetUserBadgesResponse result = apiInstance.getUserBadges(tenantId) + .userId(userId) + .badgeId(badgeId) + .type(type) + .displayedOnComments(displayedOnComments) + .limit(limit) + .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getUser"); + System.err.println("Exception when calling DefaultApi#getUserBadges"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6069,11 +7508,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | +| **userId** | **String**| | [optional] | +| **badgeId** | **String**| | [optional] | +| **type** | **Double**| | [optional] | +| **displayedOnComments** | **Boolean**| | [optional] | +| **limit** | **Double**| | [optional] | +| **skip** | **Double**| | [optional] | ### Return type -[**GetUserResponse**](GetUserResponse.md) +[**APIGetUserBadgesResponse**](APIGetUserBadgesResponse.md) ### Authorization @@ -6090,9 +7534,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getUserBadge** -> APIGetUserBadgeResponse getUserBadge(tenantId, id).execute(); + +# **getVotes** +> GetVotesResponse getVotes(tenantId, urlId).execute(); @@ -6119,13 +7563,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | + String urlId = "urlId_example"; // String | try { - APIGetUserBadgeResponse result = apiInstance.getUserBadge(tenantId, id) + GetVotesResponse result = apiInstance.getVotes(tenantId, urlId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getUserBadge"); + System.err.println("Exception when calling DefaultApi#getVotes"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6140,11 +7584,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | +| **urlId** | **String**| | | ### Return type -[**APIGetUserBadgeResponse**](APIGetUserBadgeResponse.md) +[**GetVotesResponse**](GetVotesResponse.md) ### Authorization @@ -6161,9 +7605,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getUserBadgeProgressById** -> APIGetUserBadgeProgressResponse getUserBadgeProgressById(tenantId, id).execute(); + +# **getVotesForUser** +> GetVotesForUserResponse getVotesForUser(tenantId, urlId).userId(userId).anonUserId(anonUserId).execute(); @@ -6190,13 +7634,17 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | + String urlId = "urlId_example"; // String | + String userId = "userId_example"; // String | + String anonUserId = "anonUserId_example"; // String | try { - APIGetUserBadgeProgressResponse result = apiInstance.getUserBadgeProgressById(tenantId, id) + GetVotesForUserResponse result = apiInstance.getVotesForUser(tenantId, urlId) + .userId(userId) + .anonUserId(anonUserId) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getUserBadgeProgressById"); + System.err.println("Exception when calling DefaultApi#getVotesForUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6211,11 +7659,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | +| **urlId** | **String**| | | +| **userId** | **String**| | [optional] | +| **anonUserId** | **String**| | [optional] | ### Return type -[**APIGetUserBadgeProgressResponse**](APIGetUserBadgeProgressResponse.md) +[**GetVotesForUserResponse**](GetVotesForUserResponse.md) ### Authorization @@ -6232,11 +7682,13 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getUserBadgeProgressByUserId** -> APIGetUserBadgeProgressResponse getUserBadgeProgressByUserId(tenantId, userId).execute(); + +# **getWebhookSamplePayloads** +> GetWebhookSamplePayloadsResponse getWebhookSamplePayloads(tenantId).event(event).limit(limit).execute(); + +Recent comments in exactly the shape webhook deliveries use, for building integrations (for example Zapier sample data). Every event delivers the same comment object, so `event` only has to be valid. ### Example ```java @@ -6261,13 +7713,16 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String userId = "userId_example"; // String | + WebhookEventName event = WebhookEventName.fromValue("comment-created"); // WebhookEventName | + Double limit = 3.4D; // Double | try { - APIGetUserBadgeProgressResponse result = apiInstance.getUserBadgeProgressByUserId(tenantId, userId) + GetWebhookSamplePayloadsResponse result = apiInstance.getWebhookSamplePayloads(tenantId) + .event(event) + .limit(limit) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getUserBadgeProgressByUserId"); + System.err.println("Exception when calling DefaultApi#getWebhookSamplePayloads"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6282,11 +7737,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **userId** | **String**| | | +| **event** | [**WebhookEventName**](.md)| | [optional] [enum: comment-created, comment-updated, comment-deleted] | +| **limit** | **Double**| | [optional] | ### Return type -[**APIGetUserBadgeProgressResponse**](APIGetUserBadgeProgressResponse.md) +[**GetWebhookSamplePayloadsResponse**](GetWebhookSamplePayloadsResponse.md) ### Authorization @@ -6303,12 +7759,14 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getUserBadgeProgressList** -> APIGetUserBadgeProgressListResponse getUserBadgeProgressList(tenantId).userId(userId).limit(limit).skip(skip).execute(); + +# **getWebhooks** +> GetWebhooksResponse getWebhooks(tenantId).event(event).domain(domain).source(source).skip(skip).execute(); +Lists the webhooks configured for the tenant, both dashboard-managed rows and API subscriptions. + ### Example ```java // Import classes: @@ -6332,18 +7790,20 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String userId = "userId_example"; // String | - Double limit = 3.4D; // Double | + WebhookEventName event = WebhookEventName.fromValue("comment-created"); // WebhookEventName | + String domain = "domain_example"; // String | + WebhookSource source = WebhookSource.fromValue("dashboard"); // WebhookSource | Double skip = 3.4D; // Double | try { - APIGetUserBadgeProgressListResponse result = apiInstance.getUserBadgeProgressList(tenantId) - .userId(userId) - .limit(limit) + GetWebhooksResponse result = apiInstance.getWebhooks(tenantId) + .event(event) + .domain(domain) + .source(source) .skip(skip) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getUserBadgeProgressList"); + System.err.println("Exception when calling DefaultApi#getWebhooks"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6358,13 +7818,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **userId** | **String**| | [optional] | -| **limit** | **Double**| | [optional] | +| **event** | [**WebhookEventName**](.md)| | [optional] [enum: comment-created, comment-updated, comment-deleted] | +| **domain** | **String**| | [optional] | +| **source** | [**WebhookSource**](.md)| | [optional] [enum: dashboard, api] | | **skip** | **Double**| | [optional] | ### Return type -[**APIGetUserBadgeProgressListResponse**](APIGetUserBadgeProgressListResponse.md) +[**GetWebhooksResponse**](GetWebhooksResponse.md) ### Authorization @@ -6381,12 +7842,14 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **getUserBadges** -> APIGetUserBadgesResponse getUserBadges(tenantId).userId(userId).badgeId(badgeId).type(type).displayedOnComments(displayedOnComments).limit(limit).skip(skip).execute(); + +# **migratePages** +> QueuePageMigrationJobAPIResponse migratePages(tenantId, migrateAPIPagesData).execute(); +Queues a batch job that moves comments, pages and related records from one urlId or domain to another. \"urlId\" migrations only match the exact urlId. \"domain\" migrations find/replace the value inside every urlId and url. Poll GET /api/v1/batch-jobs/{batchJobId}: once it is done it carries per-migration results and an undoId. + ### Example ```java // Import classes: @@ -6410,24 +7873,13 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String userId = "userId_example"; // String | - String badgeId = "badgeId_example"; // String | - Double type = 3.4D; // Double | - Boolean displayedOnComments = true; // Boolean | - Double limit = 3.4D; // Double | - Double skip = 3.4D; // Double | + MigrateAPIPagesData migrateAPIPagesData = new MigrateAPIPagesData(); // MigrateAPIPagesData | try { - APIGetUserBadgesResponse result = apiInstance.getUserBadges(tenantId) - .userId(userId) - .badgeId(badgeId) - .type(type) - .displayedOnComments(displayedOnComments) - .limit(limit) - .skip(skip) + QueuePageMigrationJobAPIResponse result = apiInstance.migratePages(tenantId, migrateAPIPagesData) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getUserBadges"); + System.err.println("Exception when calling DefaultApi#migratePages"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6442,16 +7894,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **userId** | **String**| | [optional] | -| **badgeId** | **String**| | [optional] | -| **type** | **Double**| | [optional] | -| **displayedOnComments** | **Boolean**| | [optional] | -| **limit** | **Double**| | [optional] | -| **skip** | **Double**| | [optional] | +| **migrateAPIPagesData** | [**MigrateAPIPagesData**](MigrateAPIPagesData.md)| | | ### Return type -[**APIGetUserBadgesResponse**](APIGetUserBadgesResponse.md) +[**QueuePageMigrationJobAPIResponse**](QueuePageMigrationJobAPIResponse.md) ### Authorization @@ -6459,18 +7906,17 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - -# **getVotes** -> GetVotesResponse getVotes(tenantId, urlId).execute(); + +# **patchDomainConfig** +> PatchDomainConfigResponse patchDomainConfig(tenantId, domainToUpdate, patchDomainConfigParams).execute(); @@ -6497,13 +7943,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String urlId = "urlId_example"; // String | + String domainToUpdate = "domainToUpdate_example"; // String | + PatchDomainConfigParams patchDomainConfigParams = new PatchDomainConfigParams(); // PatchDomainConfigParams | try { - GetVotesResponse result = apiInstance.getVotes(tenantId, urlId) + PatchDomainConfigResponse result = apiInstance.patchDomainConfig(tenantId, domainToUpdate, patchDomainConfigParams) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getVotes"); + System.err.println("Exception when calling DefaultApi#patchDomainConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6518,11 +7965,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **urlId** | **String**| | | +| **domainToUpdate** | **String**| | | +| **patchDomainConfigParams** | [**PatchDomainConfigParams**](PatchDomainConfigParams.md)| | | ### Return type -[**GetVotesResponse**](GetVotesResponse.md) +[**PatchDomainConfigResponse**](PatchDomainConfigResponse.md) ### Authorization @@ -6530,18 +7978,17 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **0** | Error | - | - -# **getVotesForUser** -> GetVotesForUserResponse getVotesForUser(tenantId, urlId).userId(userId).anonUserId(anonUserId).execute(); + +# **patchHashTag** +> UpdateHashTagResponse patchHashTag(tenantId, tag).updateHashTagBody(updateHashTagBody).execute(); @@ -6568,17 +8015,15 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String urlId = "urlId_example"; // String | - String userId = "userId_example"; // String | - String anonUserId = "anonUserId_example"; // String | + String tag = "tag_example"; // String | + UpdateHashTagBody updateHashTagBody = new UpdateHashTagBody(); // UpdateHashTagBody | try { - GetVotesForUserResponse result = apiInstance.getVotesForUser(tenantId, urlId) - .userId(userId) - .anonUserId(anonUserId) + UpdateHashTagResponse result = apiInstance.patchHashTag(tenantId, tag) + .updateHashTagBody(updateHashTagBody) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#getVotesForUser"); + System.err.println("Exception when calling DefaultApi#patchHashTag"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6593,13 +8038,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **urlId** | **String**| | | -| **userId** | **String**| | [optional] | -| **anonUserId** | **String**| | [optional] | +| **tag** | **String**| | | +| **updateHashTagBody** | [**UpdateHashTagBody**](UpdateHashTagBody.md)| | [optional] | ### Return type -[**GetVotesForUserResponse**](GetVotesForUserResponse.md) +[**UpdateHashTagResponse**](UpdateHashTagResponse.md) ### Authorization @@ -6607,7 +8051,7 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -6616,9 +8060,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **patchDomainConfig** -> PatchDomainConfigResponse patchDomainConfig(tenantId, domainToUpdate, patchDomainConfigParams).execute(); + +# **patchPage** +> PatchPageAPIResponse patchPage(tenantId, id, updateAPIPageData).execute(); @@ -6645,14 +8089,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String domainToUpdate = "domainToUpdate_example"; // String | - PatchDomainConfigParams patchDomainConfigParams = new PatchDomainConfigParams(); // PatchDomainConfigParams | + String id = "id_example"; // String | + UpdateAPIPageData updateAPIPageData = new UpdateAPIPageData(); // UpdateAPIPageData | try { - PatchDomainConfigResponse result = apiInstance.patchDomainConfig(tenantId, domainToUpdate, patchDomainConfigParams) + PatchPageAPIResponse result = apiInstance.patchPage(tenantId, id, updateAPIPageData) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#patchDomainConfig"); + System.err.println("Exception when calling DefaultApi#patchPage"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6667,12 +8111,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **domainToUpdate** | **String**| | | -| **patchDomainConfigParams** | [**PatchDomainConfigParams**](PatchDomainConfigParams.md)| | | +| **id** | **String**| | | +| **updateAPIPageData** | [**UpdateAPIPageData**](UpdateAPIPageData.md)| | | ### Return type -[**PatchDomainConfigResponse**](PatchDomainConfigResponse.md) +[**PatchPageAPIResponse**](PatchPageAPIResponse.md) ### Authorization @@ -6688,12 +8132,14 @@ public class Example { |-------------|-------------|------------------| | **200** | Ok | - | - -# **patchHashTag** -> UpdateHashTagResponse patchHashTag(tenantId, tag).updateHashTagBody(updateHashTagBody).execute(); + +# **patchPoll** +> SavePollResponse patchPoll(tenantId, commentId, commentPollPatch).execute(); +Edit a poll in place, keeping its tallies: change the question, relabel an option, close or reopen it, or change who may see the voters. Options are addressed by id - to add, remove or reorder them, PUT the full list. + ### Example ```java // Import classes: @@ -6717,15 +8163,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String tag = "tag_example"; // String | - UpdateHashTagBody updateHashTagBody = new UpdateHashTagBody(); // UpdateHashTagBody | + String commentId = "commentId_example"; // String | + CommentPollPatch commentPollPatch = new CommentPollPatch(); // CommentPollPatch | try { - UpdateHashTagResponse result = apiInstance.patchHashTag(tenantId, tag) - .updateHashTagBody(updateHashTagBody) + SavePollResponse result = apiInstance.patchPoll(tenantId, commentId, commentPollPatch) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#patchHashTag"); + System.err.println("Exception when calling DefaultApi#patchPoll"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6740,12 +8185,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **tag** | **String**| | | -| **updateHashTagBody** | [**UpdateHashTagBody**](UpdateHashTagBody.md)| | [optional] | +| **commentId** | **String**| | | +| **commentPollPatch** | [**CommentPollPatch**](CommentPollPatch.md)| | | ### Return type -[**UpdateHashTagResponse**](UpdateHashTagResponse.md) +[**SavePollResponse**](SavePollResponse.md) ### Authorization @@ -6762,9 +8207,9 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | - -# **patchPage** -> PatchPageAPIResponse patchPage(tenantId, id, updateAPIPageData).execute(); + +# **patchSSOUser** +> PatchSSOUserAPIResponse patchSSOUser(tenantId, id, updateAPISSOUserData).updateComments(updateComments).execute(); @@ -6792,13 +8237,15 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | String id = "id_example"; // String | - UpdateAPIPageData updateAPIPageData = new UpdateAPIPageData(); // UpdateAPIPageData | + UpdateAPISSOUserData updateAPISSOUserData = new UpdateAPISSOUserData(); // UpdateAPISSOUserData | + Boolean updateComments = true; // Boolean | try { - PatchPageAPIResponse result = apiInstance.patchPage(tenantId, id, updateAPIPageData) + PatchSSOUserAPIResponse result = apiInstance.patchSSOUser(tenantId, id, updateAPISSOUserData) + .updateComments(updateComments) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#patchPage"); + System.err.println("Exception when calling DefaultApi#patchSSOUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6814,11 +8261,12 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **id** | **String**| | | -| **updateAPIPageData** | [**UpdateAPIPageData**](UpdateAPIPageData.md)| | | +| **updateAPISSOUserData** | [**UpdateAPISSOUserData**](UpdateAPISSOUserData.md)| | | +| **updateComments** | **Boolean**| | [optional] | ### Return type -[**PatchPageAPIResponse**](PatchPageAPIResponse.md) +[**PatchSSOUserAPIResponse**](PatchSSOUserAPIResponse.md) ### Authorization @@ -6834,9 +8282,9 @@ public class Example { |-------------|-------------|------------------| | **200** | Ok | - | - -# **patchSSOUser** -> PatchSSOUserAPIResponse patchSSOUser(tenantId, id, updateAPISSOUserData).updateComments(updateComments).execute(); + +# **putDomainConfig** +> PutDomainConfigResponse putDomainConfig(tenantId, domainToUpdate, updateDomainConfigParams).execute(); @@ -6863,16 +8311,14 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String id = "id_example"; // String | - UpdateAPISSOUserData updateAPISSOUserData = new UpdateAPISSOUserData(); // UpdateAPISSOUserData | - Boolean updateComments = true; // Boolean | + String domainToUpdate = "domainToUpdate_example"; // String | + UpdateDomainConfigParams updateDomainConfigParams = new UpdateDomainConfigParams(); // UpdateDomainConfigParams | try { - PatchSSOUserAPIResponse result = apiInstance.patchSSOUser(tenantId, id, updateAPISSOUserData) - .updateComments(updateComments) + PutDomainConfigResponse result = apiInstance.putDomainConfig(tenantId, domainToUpdate, updateDomainConfigParams) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#patchSSOUser"); + System.err.println("Exception when calling DefaultApi#putDomainConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6887,13 +8333,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **id** | **String**| | | -| **updateAPISSOUserData** | [**UpdateAPISSOUserData**](UpdateAPISSOUserData.md)| | | -| **updateComments** | **Boolean**| | [optional] | +| **domainToUpdate** | **String**| | | +| **updateDomainConfigParams** | [**UpdateDomainConfigParams**](UpdateDomainConfigParams.md)| | | ### Return type -[**PatchSSOUserAPIResponse**](PatchSSOUserAPIResponse.md) +[**PutDomainConfigResponse**](PutDomainConfigResponse.md) ### Authorization @@ -6909,12 +8354,14 @@ public class Example { |-------------|-------------|------------------| | **200** | Ok | - | - -# **putDomainConfig** -> PutDomainConfigResponse putDomainConfig(tenantId, domainToUpdate, updateDomainConfigParams).execute(); + +# **putPoll** +> SavePollResponse putPoll(tenantId, commentId, commentPollPutInput).replaceVotes(replaceVotes).execute(); +Attach a poll to a comment, or set the full state of the poll it already has. Options are matched by id: an option sent with the id of an existing option keeps its votes (and takes the new label and position), an option sent without an id is added, and existing options left out of the list are removed along with the votes cast on them. Keeping no existing option ids on a poll that has votes deletes all of them, so that needs replaceVotes=true. + ### Example ```java // Import classes: @@ -6938,14 +8385,16 @@ public class Example { DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | - String domainToUpdate = "domainToUpdate_example"; // String | - UpdateDomainConfigParams updateDomainConfigParams = new UpdateDomainConfigParams(); // UpdateDomainConfigParams | + String commentId = "commentId_example"; // String | + CommentPollPutInput commentPollPutInput = new CommentPollPutInput(); // CommentPollPutInput | + Boolean replaceVotes = true; // Boolean | try { - PutDomainConfigResponse result = apiInstance.putDomainConfig(tenantId, domainToUpdate, updateDomainConfigParams) + SavePollResponse result = apiInstance.putPoll(tenantId, commentId, commentPollPutInput) + .replaceVotes(replaceVotes) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#putDomainConfig"); + System.err.println("Exception when calling DefaultApi#putPoll"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -6960,12 +8409,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | -| **domainToUpdate** | **String**| | | -| **updateDomainConfigParams** | [**UpdateDomainConfigParams**](UpdateDomainConfigParams.md)| | | +| **commentId** | **String**| | | +| **commentPollPutInput** | [**CommentPollPutInput**](CommentPollPutInput.md)| | | +| **replaceVotes** | **Boolean**| | [optional] | ### Return type -[**PutDomainConfigResponse**](PutDomainConfigResponse.md) +[**SavePollResponse**](SavePollResponse.md) ### Authorization @@ -6980,6 +8430,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **0** | Error | - | # **putSSOUser** @@ -7747,6 +9198,78 @@ public class Example { | **200** | Ok | - | | **0** | Error | - | + +# **undoPageMigrations** +> QueuePageMigrationJobAPIResponse undoPageMigrations(tenantId, undoId).execute(); + + + +Queues a batch job that reverses every migration from one migrate-pages job, newest first. Available for 90 days. Records changed since the migration are left alone, so a later edit is never overwritten. Poll GET /api/v1/batch-jobs/{batchJobId} for the restored/skipped counts. + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String undoId = "undoId_example"; // String | + try { + QueuePageMigrationJobAPIResponse result = apiInstance.undoPageMigrations(tenantId, undoId) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#undoPageMigrations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **undoId** | **String**| | | + +### Return type + +[**QueuePageMigrationJobAPIResponse**](QueuePageMigrationJobAPIResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | + # **updateComment** > APIEmptyResponse updateComment(tenantId, id, updatableCommentParams).contextUserId(contextUserId).doSpamCheck(doSpamCheck).isLive(isLive).execute(); diff --git a/client/docs/DeletePollVoteResponse.md b/client/docs/DeletePollVoteResponse.md new file mode 100644 index 00000000..e8e11f24 --- /dev/null +++ b/client/docs/DeletePollVoteResponse.md @@ -0,0 +1,14 @@ + + +# DeletePollVoteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**poll** | [**CommentPoll**](CommentPoll.md) | | | + + + diff --git a/client/docs/EventLogEntry.md b/client/docs/EventLogEntry.md index d7a09a99..ef42764c 100644 --- a/client/docs/EventLogEntry.md +++ b/client/docs/EventLogEntry.md @@ -13,6 +13,7 @@ |**urlId** | **String** | | | |**broadcastId** | **String** | | | |**data** | **String** | | | +|**domain** | **String** | | [optional] | diff --git a/client/docs/FComment.md b/client/docs/FComment.md index 38d06245..9036aef4 100644 --- a/client/docs/FComment.md +++ b/client/docs/FComment.md @@ -49,6 +49,8 @@ |**hasCode** | **Boolean** | | [optional] | |**approved** | **Boolean** | | | |**locale** | **String** | | | +|**detectedLanguage** | **String** | | [optional] | +|**translations** | [**Map<String, CommentTranslation>**](CommentTranslation.md) | Construct a type with a set of properties K of type T | [optional] | |**isDeleted** | **Boolean** | | [optional] | |**isDeletedUser** | **Boolean** | | [optional] | |**isBannedUser** | **Boolean** | | [optional] | @@ -73,6 +75,7 @@ |**autoplayJobId** | **String** | | [optional] | |**autoplayDelayMS** | **Long** | | [optional] | |**feedbackIds** | **List<String>** | | [optional] | +|**poll** | [**CommentPoll**](CommentPoll.md) | | [optional] | |**logs** | [**List<CommentLogEntry>**](CommentLogEntry.md) | | [optional] | |**groupIds** | **List<String>** | | [optional] | |**viewCount** | **Long** | | [optional] | diff --git a/client/docs/GetBatchJobAPIResponse.md b/client/docs/GetBatchJobAPIResponse.md new file mode 100644 index 00000000..f8c6111d --- /dev/null +++ b/client/docs/GetBatchJobAPIResponse.md @@ -0,0 +1,16 @@ + + +# GetBatchJobAPIResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | **String** | | [optional] | +|**code** | **String** | | [optional] | +|**batchJob** | [**APIBatchJob**](APIBatchJob.md) | | [optional] | +|**status** | **String** | | | + + + diff --git a/client/docs/GetBatchJobsAPIResponse.md b/client/docs/GetBatchJobsAPIResponse.md new file mode 100644 index 00000000..5a4c5c1c --- /dev/null +++ b/client/docs/GetBatchJobsAPIResponse.md @@ -0,0 +1,16 @@ + + +# GetBatchJobsAPIResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | **String** | | [optional] | +|**code** | **String** | | [optional] | +|**batchJobs** | [**List<APIBatchJob>**](APIBatchJob.md) | Newest first, 100 per page. | [optional] | +|**status** | **String** | | | + + + diff --git a/client/docs/GetMeResponse.md b/client/docs/GetMeResponse.md new file mode 100644 index 00000000..f9e538e8 --- /dev/null +++ b/client/docs/GetMeResponse.md @@ -0,0 +1,20 @@ + + +# GetMeResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**tenantId** | **String** | | | +|**tenantName** | **String** | | | +|**authType** | **MeAuthType** | | | +|**scopes** | **List<OAuthScope>** | | | +|**userId** | **String** | Only present for OAuth tokens: the user who authorized the application. | [optional] | +|**username** | **String** | | [optional] | +|**email** | **String** | | [optional] | + + + diff --git a/client/docs/GetPageLikesAPIResponse.md b/client/docs/GetPageLikesAPIResponse.md new file mode 100644 index 00000000..61aae1ab --- /dev/null +++ b/client/docs/GetPageLikesAPIResponse.md @@ -0,0 +1,17 @@ + + +# GetPageLikesAPIResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | **String** | | [optional] | +|**code** | **String** | | [optional] | +|**users** | [**List<PageReactUser>**](PageReactUser.md) | Most recent first. Present when includeUserInfo is passed. Capped at 100 reacts. | [optional] | +|**likeCount** | **Integer** | | [optional] | +|**status** | **String** | | | + + + diff --git a/client/docs/GetPageReactsAPIResponse.md b/client/docs/GetPageReactsAPIResponse.md new file mode 100644 index 00000000..7b5809ba --- /dev/null +++ b/client/docs/GetPageReactsAPIResponse.md @@ -0,0 +1,17 @@ + + +# GetPageReactsAPIResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | **String** | | [optional] | +|**code** | **String** | | [optional] | +|**users** | [**List<PageCustomReactUser>**](PageCustomReactUser.md) | One entry per react, most recent first. Present when includeUserInfo is passed. Capped at 100 reacts. | [optional] | +|**counts** | **Map<String, Double>** | Construct a type with a set of properties K of type T | [optional] | +|**status** | **String** | | | + + + diff --git a/client/docs/GetPollResponse.md b/client/docs/GetPollResponse.md new file mode 100644 index 00000000..8576435d --- /dev/null +++ b/client/docs/GetPollResponse.md @@ -0,0 +1,14 @@ + + +# GetPollResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**poll** | [**CommentPoll**](CommentPoll.md) | | | + + + diff --git a/client/docs/GetPollVoteResponse.md b/client/docs/GetPollVoteResponse.md new file mode 100644 index 00000000..46872fe3 --- /dev/null +++ b/client/docs/GetPollVoteResponse.md @@ -0,0 +1,14 @@ + + +# GetPollVoteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**pollVote** | [**PublicPollVote**](PublicPollVote.md) | | | + + + diff --git a/client/docs/GetPollVotesResponse.md b/client/docs/GetPollVotesResponse.md new file mode 100644 index 00000000..05896109 --- /dev/null +++ b/client/docs/GetPollVotesResponse.md @@ -0,0 +1,14 @@ + + +# GetPollVotesResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**pollVotes** | [**List<PublicPollVote>**](PublicPollVote.md) | | | + + + diff --git a/client/docs/GetTranslationsResponse.md b/client/docs/GetTranslationsResponse.md index 904bdea6..5895e160 100644 --- a/client/docs/GetTranslationsResponse.md +++ b/client/docs/GetTranslationsResponse.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**locale** | **String** | The locale the translations were resolved for. Clients use it to set text direction. | | |**translations** | **Map<String, String>** | Construct a type with a set of properties K of type T | | |**status** | **APIStatus** | | | diff --git a/client/docs/GetV1PageLikes.md b/client/docs/GetV1PageLikes.md index 4b41176e..ca392724 100644 --- a/client/docs/GetV1PageLikes.md +++ b/client/docs/GetV1PageLikes.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**users** | [**List<PageReactUser>**](PageReactUser.md) | Most recent first. Present when includeUserInfo is passed. Capped at 100 reacts. | [optional] | |**urlIdWS** | **String** | | | |**didLike** | **Boolean** | | | |**commentCount** | **Integer** | | | diff --git a/client/docs/GetV2PageReacts.md b/client/docs/GetV2PageReacts.md index 004526b6..c0a7f2b9 100644 --- a/client/docs/GetV2PageReacts.md +++ b/client/docs/GetV2PageReacts.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**users** | [**List<PageCustomReactUser>**](PageCustomReactUser.md) | One entry per react, most recent first. Present when includeUserInfo is passed. Capped at 100 reacts. | [optional] | |**reactedIds** | **List<String>** | | [optional] | |**counts** | **Map<String, Double>** | Construct a type with a set of properties K of type T | [optional] | |**status** | **APIStatus** | | | diff --git a/client/docs/GetWebhookSamplePayloadsResponse.md b/client/docs/GetWebhookSamplePayloadsResponse.md new file mode 100644 index 00000000..8310fc15 --- /dev/null +++ b/client/docs/GetWebhookSamplePayloadsResponse.md @@ -0,0 +1,14 @@ + + +# GetWebhookSamplePayloadsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**payloads** | [**List<WebhookComment>**](WebhookComment.md) | | | + + + diff --git a/client/docs/GetWebhooksResponse.md b/client/docs/GetWebhooksResponse.md new file mode 100644 index 00000000..8998e7f3 --- /dev/null +++ b/client/docs/GetWebhooksResponse.md @@ -0,0 +1,14 @@ + + +# GetWebhooksResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**webhooks** | [**List<PublicWebhook>**](PublicWebhook.md) | | | + + + diff --git a/client/docs/ImportedSiteType.md b/client/docs/ImportedSiteType.md index fd4f1325..4f84bd1c 100644 --- a/client/docs/ImportedSiteType.md +++ b/client/docs/ImportedSiteType.md @@ -9,5 +9,7 @@ * `NUMBER_1` (value: `1`) +* `NUMBER_2` (value: `2`) + diff --git a/client/docs/LiveEvent.md b/client/docs/LiveEvent.md index f473f710..361222e9 100644 --- a/client/docs/LiveEvent.md +++ b/client/docs/LiveEvent.md @@ -17,6 +17,8 @@ |**vote** | [**PubSubVote**](PubSubVote.md) | | [optional] | |**comment** | [**PubSubComment**](PubSubComment.md) | | [optional] | |**feedPost** | [**FeedPost**](FeedPost.md) | | [optional] | +|**commentId** | **String** | | [optional] | +|**poll** | [**PickCommentPollOptionsOrTotalVotesOrClosesAt**](PickCommentPollOptionsOrTotalVotesOrClosesAt.md) | | [optional] | |**extraInfo** | [**LiveEventExtraInfo**](LiveEventExtraInfo.md) | | [optional] | |**config** | **Object** | | [optional] | |**isClosed** | **Boolean** | | [optional] | diff --git a/client/docs/LiveEventType.md b/client/docs/LiveEventType.md index f8bd38e6..d1a4b9fe 100644 --- a/client/docs/LiveEventType.md +++ b/client/docs/LiveEventType.md @@ -51,5 +51,7 @@ * `QUESTION_RESULT` (value: `"question-result"`) +* `POLL_UPDATE` (value: `"poll-update"`) + diff --git a/client/docs/MeAuthType.md b/client/docs/MeAuthType.md new file mode 100644 index 00000000..e0647ce2 --- /dev/null +++ b/client/docs/MeAuthType.md @@ -0,0 +1,13 @@ + + +# MeAuthType + +## Enum + + +* `API_KEY` (value: `"api-key"`) + +* `OAUTH` (value: `"oauth"`) + + + diff --git a/client/docs/MigrateAPIPagesData.md b/client/docs/MigrateAPIPagesData.md new file mode 100644 index 00000000..e2e16bc9 --- /dev/null +++ b/client/docs/MigrateAPIPagesData.md @@ -0,0 +1,13 @@ + + +# MigrateAPIPagesData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**migrations** | [**List<PageMigration>**](PageMigration.md) | Run in the order given, so a -> b then b -> c works. At most 100. | | + + + diff --git a/client/docs/NotificationSkipReason.md b/client/docs/NotificationSkipReason.md new file mode 100644 index 00000000..98d28d51 --- /dev/null +++ b/client/docs/NotificationSkipReason.md @@ -0,0 +1,41 @@ + + +# NotificationSkipReason + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + +* `NUMBER_3` (value: `3`) + +* `NUMBER_4` (value: `4`) + +* `NUMBER_5` (value: `5`) + +* `NUMBER_6` (value: `6`) + +* `NUMBER_7` (value: `7`) + +* `NUMBER_8` (value: `8`) + +* `NUMBER_9` (value: `9`) + +* `NUMBER_10` (value: `10`) + +* `NUMBER_11` (value: `11`) + +* `NUMBER_12` (value: `12`) + +* `NUMBER_13` (value: `13`) + +* `NUMBER_14` (value: `14`) + +* `NUMBER_15` (value: `15`) + + + diff --git a/client/docs/NotificationType.md b/client/docs/NotificationType.md index 97a72477..278d40c8 100644 --- a/client/docs/NotificationType.md +++ b/client/docs/NotificationType.md @@ -31,5 +31,9 @@ * `NUMBER_10` (value: `10`) +* `NUMBER_11` (value: `11`) + +* `NUMBER_12` (value: `12`) + diff --git a/client/docs/OAuthScope.md b/client/docs/OAuthScope.md new file mode 100644 index 00000000..b40a1737 --- /dev/null +++ b/client/docs/OAuthScope.md @@ -0,0 +1,13 @@ + + +# OAuthScope + +## Enum + + +* `READ` (value: `"read"`) + +* `WRITE` (value: `"write"`) + + + diff --git a/client/docs/PageCustomReactUser.md b/client/docs/PageCustomReactUser.md new file mode 100644 index 00000000..85ee7beb --- /dev/null +++ b/client/docs/PageCustomReactUser.md @@ -0,0 +1,17 @@ + + +# PageCustomReactUser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**avatarSrc** | **String** | | [optional] | +|**displayName** | **String** | | [optional] | +|**username** | **String** | | | +|**userId** | **String** | | | +|**reactId** | **String** | | | + + + diff --git a/client/docs/PageMigration.md b/client/docs/PageMigration.md new file mode 100644 index 00000000..ca007784 --- /dev/null +++ b/client/docs/PageMigration.md @@ -0,0 +1,15 @@ + + +# PageMigration + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | | | +|**to** | **String** | | | +|**type** | **PageMigrationType** | | | + + + diff --git a/client/docs/PageMigrationFailure.md b/client/docs/PageMigrationFailure.md new file mode 100644 index 00000000..c0eca941 --- /dev/null +++ b/client/docs/PageMigrationFailure.md @@ -0,0 +1,18 @@ + + +# PageMigrationFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | | | +|**to** | **String** | | | +|**type** | **PageMigrationType** | | | +|**status** | **APIStatus** | | | +|**code** | **String** | | | +|**reason** | **String** | | | + + + diff --git a/client/docs/PageMigrationSuccess.md b/client/docs/PageMigrationSuccess.md new file mode 100644 index 00000000..5d9b6862 --- /dev/null +++ b/client/docs/PageMigrationSuccess.md @@ -0,0 +1,17 @@ + + +# PageMigrationSuccess + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | | | +|**to** | **String** | | | +|**type** | **PageMigrationType** | | | +|**status** | **APIStatus** | | | +|**commentsMigrated** | **Integer** | | | + + + diff --git a/client/docs/PageMigrationType.md b/client/docs/PageMigrationType.md new file mode 100644 index 00000000..47e5bf36 --- /dev/null +++ b/client/docs/PageMigrationType.md @@ -0,0 +1,13 @@ + + +# PageMigrationType + +## Enum + + +* `URL_ID` (value: `"urlId"`) + +* `DOMAIN` (value: `"domain"`) + + + diff --git a/client/docs/PageMigrationUndoCounts.md b/client/docs/PageMigrationUndoCounts.md new file mode 100644 index 00000000..42034fc8 --- /dev/null +++ b/client/docs/PageMigrationUndoCounts.md @@ -0,0 +1,15 @@ + + +# PageMigrationUndoCounts + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**restored** | **Integer** | Records put back to their pre-migration values. | | +|**skipped** | **Integer** | Records left alone because they changed after the migration, or no longer exist. | | +|**notRestorable** | **Integer** | Records a page merge or duplicate cleanup deleted during the migration. These cannot be brought back. | | + + + diff --git a/client/docs/PageReactIncludeUserInfo.md b/client/docs/PageReactIncludeUserInfo.md new file mode 100644 index 00000000..d709cac6 --- /dev/null +++ b/client/docs/PageReactIncludeUserInfo.md @@ -0,0 +1,13 @@ + + +# PageReactIncludeUserInfo + +## Enum + + +* `PUBLIC` (value: `"public"`) + +* `INCLUDE_PRIVATE` (value: `"include-private"`) + + + diff --git a/client/docs/PageReactUser.md b/client/docs/PageReactUser.md new file mode 100644 index 00000000..6a4e5421 --- /dev/null +++ b/client/docs/PageReactUser.md @@ -0,0 +1,16 @@ + + +# PageReactUser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**avatarSrc** | **String** | | [optional] | +|**displayName** | **String** | | [optional] | +|**username** | **String** | | | +|**userId** | **String** | | | + + + diff --git a/client/docs/PickCommentPollOptionsOrTotalVotesOrClosesAt.md b/client/docs/PickCommentPollOptionsOrTotalVotesOrClosesAt.md new file mode 100644 index 00000000..8f7cc07d --- /dev/null +++ b/client/docs/PickCommentPollOptionsOrTotalVotesOrClosesAt.md @@ -0,0 +1,16 @@ + + +# PickCommentPollOptionsOrTotalVotesOrClosesAt + +From T, pick a set of properties whose keys are in the union K + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**options** | [**List<CommentPollOption>**](CommentPollOption.md) | | | +|**totalVotes** | **Integer** | | | +|**closesAt** | **OffsetDateTime** | | [optional] | + + + diff --git a/client/docs/PollCreationMode.md b/client/docs/PollCreationMode.md new file mode 100644 index 00000000..1af5eec3 --- /dev/null +++ b/client/docs/PollCreationMode.md @@ -0,0 +1,15 @@ + + +# PollCreationMode + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/client/docs/PollPrivacy.md b/client/docs/PollPrivacy.md new file mode 100644 index 00000000..dac1195a --- /dev/null +++ b/client/docs/PollPrivacy.md @@ -0,0 +1,15 @@ + + +# PollPrivacy + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/client/docs/PollVotingMode.md b/client/docs/PollVotingMode.md new file mode 100644 index 00000000..77df12e0 --- /dev/null +++ b/client/docs/PollVotingMode.md @@ -0,0 +1,13 @@ + + +# PollVotingMode + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + + + diff --git a/client/docs/PubSubComment.md b/client/docs/PubSubComment.md index b5e8e67a..a0e5af3e 100644 --- a/client/docs/PubSubComment.md +++ b/client/docs/PubSubComment.md @@ -36,6 +36,7 @@ |**isSpam** | **Boolean** | | [optional] | |**anonUserId** | **String** | | [optional] | |**feedbackIds** | **List<String>** | | [optional] | +|**poll** | [**CommentPoll**](CommentPoll.md) | | [optional] | |**flagCount** | **Integer** | | [optional] | |**domain** | **String** | | [optional] | |**url** | **String** | | | diff --git a/client/docs/PubSubCommentBase.md b/client/docs/PubSubCommentBase.md index ab90a043..f93ce4c9 100644 --- a/client/docs/PubSubCommentBase.md +++ b/client/docs/PubSubCommentBase.md @@ -36,6 +36,7 @@ |**isSpam** | **Boolean** | | [optional] | |**anonUserId** | **String** | | [optional] | |**feedbackIds** | **List<String>** | | [optional] | +|**poll** | [**CommentPoll**](CommentPoll.md) | | [optional] | |**flagCount** | **Integer** | | [optional] | |**domain** | **String** | | [optional] | |**url** | **String** | | | diff --git a/client/docs/PublicApi.md b/client/docs/PublicApi.md index fc189e61..b0033894 100644 --- a/client/docs/PublicApi.md +++ b/client/docs/PublicApi.md @@ -48,6 +48,7 @@ All URIs are relative to *https://fastcomments.com* | [**resetUserNotifications**](PublicApi.md#resetUserNotifications) | **POST** /user-notifications/reset | | | [**searchUsers**](PublicApi.md#searchUsers) | **GET** /user-search/{tenantId} | | | [**setCommentText**](PublicApi.md#setCommentText) | **POST** /comments/{tenantId}/{commentId}/update-text | | +| [**translateComments**](PublicApi.md#translateComments) | **POST** /comments/{tenantId}/translations | | | [**unBlockCommentPublic**](PublicApi.md#unBlockCommentPublic) | **DELETE** /block-from-comment/{commentId} | | | [**unLockComment**](PublicApi.md#unLockComment) | **POST** /comments/{tenantId}/{commentId}/unlock | | | [**unPinComment**](PublicApi.md#unPinComment) | **POST** /comments/{tenantId}/{commentId}/unpin | | @@ -197,7 +198,7 @@ No authorization required # **createCommentPublic** -> SaveCommentsResponseWithPresence createCommentPublic(tenantId, urlId, broadcastId, commentData).sessionId(sessionId).sso(sso).execute(); +> SaveCommentsResponseWithPresence createCommentPublic(tenantId, urlId, broadcastId, commentData).sessionId(sessionId).sso(sso).locale(locale).execute(); @@ -222,10 +223,12 @@ public class Example { CommentData commentData = new CommentData(); // CommentData | String sessionId = "sessionId_example"; // String | String sso = "sso_example"; // String | + String locale = "locale_example"; // String | try { SaveCommentsResponseWithPresence result = apiInstance.createCommentPublic(tenantId, urlId, broadcastId, commentData) .sessionId(sessionId) .sso(sso) + .locale(locale) .execute(); System.out.println(result); } catch (ApiException e) { @@ -249,6 +252,7 @@ public class Example { | **commentData** | [**CommentData**](CommentData.md)| | | | **sessionId** | **String**| | [optional] | | **sso** | **String**| | [optional] | +| **locale** | **String**| | [optional] | ### Return type @@ -341,7 +345,7 @@ No authorization required # **createV1PageReact** -> CreateV1PageReact createV1PageReact(tenantId, urlId).title(title).execute(); +> CreateV1PageReact createV1PageReact(tenantId, urlId).title(title).sso(sso).execute(); @@ -363,9 +367,11 @@ public class Example { String tenantId = "tenantId_example"; // String | String urlId = "urlId_example"; // String | String title = "title_example"; // String | + String sso = "sso_example"; // String | try { CreateV1PageReact result = apiInstance.createV1PageReact(tenantId, urlId) .title(title) + .sso(sso) .execute(); System.out.println(result); } catch (ApiException e) { @@ -386,6 +392,7 @@ public class Example { | **tenantId** | **String**| | | | **urlId** | **String**| | | | **title** | **String**| | [optional] | +| **sso** | **String**| | [optional] | ### Return type @@ -408,7 +415,7 @@ No authorization required # **createV2PageReact** -> CreateV1PageReact createV2PageReact(tenantId, urlId, id).title(title).execute(); +> CreateV1PageReact createV2PageReact(tenantId, urlId, id).title(title).sso(sso).execute(); @@ -431,9 +438,11 @@ public class Example { String urlId = "urlId_example"; // String | String id = "id_example"; // String | String title = "title_example"; // String | + String sso = "sso_example"; // String | try { CreateV1PageReact result = apiInstance.createV2PageReact(tenantId, urlId, id) .title(title) + .sso(sso) .execute(); System.out.println(result); } catch (ApiException e) { @@ -455,6 +464,7 @@ public class Example { | **urlId** | **String**| | | | **id** | **String**| | | | **title** | **String**| | [optional] | +| **sso** | **String**| | [optional] | ### Return type @@ -695,7 +705,7 @@ No authorization required # **deleteV1PageReact** -> CreateV1PageReact deleteV1PageReact(tenantId, urlId).execute(); +> CreateV1PageReact deleteV1PageReact(tenantId, urlId).sso(sso).execute(); @@ -716,8 +726,10 @@ public class Example { PublicApi apiInstance = new PublicApi(defaultClient); String tenantId = "tenantId_example"; // String | String urlId = "urlId_example"; // String | + String sso = "sso_example"; // String | try { CreateV1PageReact result = apiInstance.deleteV1PageReact(tenantId, urlId) + .sso(sso) .execute(); System.out.println(result); } catch (ApiException e) { @@ -737,6 +749,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **urlId** | **String**| | | +| **sso** | **String**| | [optional] | ### Return type @@ -759,7 +772,7 @@ No authorization required # **deleteV2PageReact** -> CreateV1PageReact deleteV2PageReact(tenantId, urlId, id).execute(); +> CreateV1PageReact deleteV2PageReact(tenantId, urlId, id).sso(sso).execute(); @@ -781,8 +794,10 @@ public class Example { String tenantId = "tenantId_example"; // String | String urlId = "urlId_example"; // String | String id = "id_example"; // String | + String sso = "sso_example"; // String | try { CreateV1PageReact result = apiInstance.deleteV2PageReact(tenantId, urlId, id) + .sso(sso) .execute(); System.out.println(result); } catch (ApiException e) { @@ -803,6 +818,7 @@ public class Example { | **tenantId** | **String**| | | | **urlId** | **String**| | | | **id** | **String**| | | +| **sso** | **String**| | [optional] | ### Return type @@ -1114,7 +1130,7 @@ No authorization required # **getCommentsPublic** -> GetCommentsResponseWithPresencePublicComment getCommentsPublic(tenantId, urlId).page(page).direction(direction).sso(sso).skip(skip).skipChildren(skipChildren).limit(limit).limitChildren(limitChildren).countChildren(countChildren).fetchPageForCommentId(fetchPageForCommentId).includeConfig(includeConfig).countAll(countAll).includei10n(includei10n).locale(locale).modules(modules).isCrawler(isCrawler).includeNotificationCount(includeNotificationCount).asTree(asTree).maxTreeDepth(maxTreeDepth).useFullTranslationIds(useFullTranslationIds).parentId(parentId).searchText(searchText).hashTags(hashTags).userId(userId).customConfigStr(customConfigStr).afterCommentId(afterCommentId).beforeCommentId(beforeCommentId).execute(); +> GetCommentsResponseWithPresencePublicComment getCommentsPublic(tenantId, urlId).page(page).direction(direction).sso(sso).skip(skip).skipChildren(skipChildren).limit(limit).limitChildren(limitChildren).countChildren(countChildren).fetchPageForCommentId(fetchPageForCommentId).includeConfig(includeConfig).countAll(countAll).includei10n(includei10n).locale(locale).modules(modules).isCrawler(isCrawler).includeNotificationCount(includeNotificationCount).asTree(asTree).maxTreeDepth(maxTreeDepth).useFullTranslationIds(useFullTranslationIds).parentId(parentId).searchText(searchText).hashTags(hashTags).userId(userId).customConfigStr(customConfigStr).afterCommentId(afterCommentId).beforeCommentId(beforeCommentId).questionId(questionId).questionValue(questionValue).execute(); @@ -1163,6 +1179,8 @@ public class Example { String customConfigStr = "customConfigStr_example"; // String | String afterCommentId = "afterCommentId_example"; // String | String beforeCommentId = "beforeCommentId_example"; // String | + String questionId = "questionId_example"; // String | + Integer questionValue = 56; // Integer | try { GetCommentsResponseWithPresencePublicComment result = apiInstance.getCommentsPublic(tenantId, urlId) .page(page) @@ -1191,6 +1209,8 @@ public class Example { .customConfigStr(customConfigStr) .afterCommentId(afterCommentId) .beforeCommentId(beforeCommentId) + .questionId(questionId) + .questionValue(questionValue) .execute(); System.out.println(result); } catch (ApiException e) { @@ -1236,6 +1256,8 @@ public class Example { | **customConfigStr** | **String**| | [optional] | | **afterCommentId** | **String**| | [optional] | | **beforeCommentId** | **String**| | [optional] | +| **questionId** | **String**| | [optional] | +| **questionValue** | **Integer**| | [optional] | ### Return type @@ -2423,7 +2445,7 @@ No authorization required # **getV1PageLikes** -> GetV1PageLikes getV1PageLikes(tenantId, urlId).execute(); +> GetV1PageLikes getV1PageLikes(tenantId, urlId).sso(sso).includeUserInfo(includeUserInfo).execute(); @@ -2444,8 +2466,12 @@ public class Example { PublicApi apiInstance = new PublicApi(defaultClient); String tenantId = "tenantId_example"; // String | String urlId = "urlId_example"; // String | + String sso = "sso_example"; // String | + PageReactIncludeUserInfo includeUserInfo = PageReactIncludeUserInfo.fromValue("public"); // PageReactIncludeUserInfo | When set, returns the users who liked the page (avatars and usernames). Only \"public\" is accepted, which omits private profiles. try { GetV1PageLikes result = apiInstance.getV1PageLikes(tenantId, urlId) + .sso(sso) + .includeUserInfo(includeUserInfo) .execute(); System.out.println(result); } catch (ApiException e) { @@ -2465,6 +2491,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **urlId** | **String**| | | +| **sso** | **String**| | [optional] | +| **includeUserInfo** | [**PageReactIncludeUserInfo**](.md)| When set, returns the users who liked the page (avatars and usernames). Only \"public\" is accepted, which omits private profiles. | [optional] [enum: public, include-private] | ### Return type @@ -2487,7 +2515,7 @@ No authorization required # **getV2PageReactUsers** -> GetV2PageReactUsersResponse getV2PageReactUsers(tenantId, urlId, id).execute(); +> GetV2PageReactUsersResponse getV2PageReactUsers(tenantId, urlId, id).sso(sso).execute(); @@ -2509,8 +2537,10 @@ public class Example { String tenantId = "tenantId_example"; // String | String urlId = "urlId_example"; // String | String id = "id_example"; // String | + String sso = "sso_example"; // String | try { GetV2PageReactUsersResponse result = apiInstance.getV2PageReactUsers(tenantId, urlId, id) + .sso(sso) .execute(); System.out.println(result); } catch (ApiException e) { @@ -2531,6 +2561,7 @@ public class Example { | **tenantId** | **String**| | | | **urlId** | **String**| | | | **id** | **String**| | | +| **sso** | **String**| | [optional] | ### Return type @@ -2553,7 +2584,7 @@ No authorization required # **getV2PageReacts** -> GetV2PageReacts getV2PageReacts(tenantId, urlId).execute(); +> GetV2PageReacts getV2PageReacts(tenantId, urlId).sso(sso).includeUserInfo(includeUserInfo).execute(); @@ -2574,8 +2605,12 @@ public class Example { PublicApi apiInstance = new PublicApi(defaultClient); String tenantId = "tenantId_example"; // String | String urlId = "urlId_example"; // String | + String sso = "sso_example"; // String | + PageReactIncludeUserInfo includeUserInfo = PageReactIncludeUserInfo.fromValue("public"); // PageReactIncludeUserInfo | When set, returns the users for each react id (avatars and usernames). Only \"public\" is accepted, which omits private profiles. try { GetV2PageReacts result = apiInstance.getV2PageReacts(tenantId, urlId) + .sso(sso) + .includeUserInfo(includeUserInfo) .execute(); System.out.println(result); } catch (ApiException e) { @@ -2595,6 +2630,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **tenantId** | **String**| | | | **urlId** | **String**| | | +| **sso** | **String**| | [optional] | +| **includeUserInfo** | [**PageReactIncludeUserInfo**](.md)| When set, returns the users for each react id (avatars and usernames). Only \"public\" is accepted, which omits private profiles. | [optional] [enum: public, include-private] | ### Return type @@ -3180,6 +3217,80 @@ No authorization required | **200** | Ok | - | | **0** | Error | - | + +# **translateComments** +> CommentTranslationsResponse translateComments(tenantId, urlId, commentTranslationsRequest).sso(sso).locale(locale).execute(); + + + +Translates the given comments into the widget locale. Only available when the matching widget customization rule has Comment Translation set to Automatic or Manual. + +### Example +```java +// Import classes: +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.models.*; +import com.fastcomments.api.PublicApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://fastcomments.com"); + + PublicApi apiInstance = new PublicApi(defaultClient); + String tenantId = "tenantId_example"; // String | + String urlId = "urlId_example"; // String | + CommentTranslationsRequest commentTranslationsRequest = new CommentTranslationsRequest(); // CommentTranslationsRequest | + String sso = "sso_example"; // String | + String locale = "locale_example"; // String | + try { + CommentTranslationsResponse result = apiInstance.translateComments(tenantId, urlId, commentTranslationsRequest) + .sso(sso) + .locale(locale) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PublicApi#translateComments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | | +| **urlId** | **String**| | | +| **commentTranslationsRequest** | [**CommentTranslationsRequest**](CommentTranslationsRequest.md)| | | +| **sso** | **String**| | [optional] | +| **locale** | **String**| | [optional] | + +### Return type + +[**CommentTranslationsResponse**](CommentTranslationsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **0** | Error | - | + # **unBlockCommentPublic** > UnblockSuccess unBlockCommentPublic(tenantId, commentId, publicBlockFromCommentParams).sso(sso).execute(); diff --git a/client/docs/PublicComment.md b/client/docs/PublicComment.md index 2d6d5995..81124b06 100644 --- a/client/docs/PublicComment.md +++ b/client/docs/PublicComment.md @@ -37,6 +37,7 @@ |**editKey** | **String** | | [optional] | |**approved** | **Boolean** | | [optional] | |**isUnread** | **Boolean** | | [optional] | +|**myPollVotes** | **List<String>** | Ids of the options the current viewer voted for on this comment's poll. Only set when polls are enabled and they have voted. | [optional] | |**myVoteId** | **String** | | [optional] | |**isVotedDown** | **Boolean** | | [optional] | |**isVotedUp** | **Boolean** | | [optional] | diff --git a/client/docs/PublicPollVote.md b/client/docs/PublicPollVote.md new file mode 100644 index 00000000..058e7964 --- /dev/null +++ b/client/docs/PublicPollVote.md @@ -0,0 +1,21 @@ + + +# PublicPollVote + +A single vote cast on a comment's poll. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**tenantId** | **String** | | | +|**commentId** | **String** | | | +|**urlId** | **String** | | | +|**voterId** | **String** | | | +|**optionId** | **String** | | | +|**createdAt** | **OffsetDateTime** | | | +|**updatedAt** | **OffsetDateTime** | | [optional] | + + + diff --git a/client/docs/PublicWebhook.md b/client/docs/PublicWebhook.md new file mode 100644 index 00000000..3aab3a50 --- /dev/null +++ b/client/docs/PublicWebhook.md @@ -0,0 +1,34 @@ + + +# PublicWebhook + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**url** | **String** | | | +|**event** | **WebhookEventName** | | | +|**domain** | **String** | | | +|**method** | **WebhookHTTPMethod** | | | +|**source** | **WebhookSource** | | | +|**enabled** | **Boolean** | | | +|**createdAt** | **OffsetDateTime** | | | +|**lastSuccessAt** | **OffsetDateTime** | | [optional] | +|**lastFailureAt** | **OffsetDateTime** | | [optional] | +|**failingSince** | **OffsetDateTime** | | [optional] | +|**disabledAt** | **OffsetDateTime** | | [optional] | +|**disabledReason** | [**DisabledReasonEnum**](#DisabledReasonEnum) | | [optional] | + + + +## Enum: DisabledReasonEnum + +| Name | Value | +|---- | -----| +| AUTO | "auto" | +| MANUAL | "manual" | + + + diff --git a/client/docs/QuestionCondition.md b/client/docs/QuestionCondition.md new file mode 100644 index 00000000..907a59ac --- /dev/null +++ b/client/docs/QuestionCondition.md @@ -0,0 +1,15 @@ + + +# QuestionCondition + +A rule evaluated against a question's answer. value is the score for nps/slider/star/emoji/scale, 1 or 0 for thumbs, and the option index for choice/multi. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operator** | **QuestionConditionOperator** | | | +|**value** | **Double** | | | + + + diff --git a/client/docs/QuestionConditionOperator.md b/client/docs/QuestionConditionOperator.md new file mode 100644 index 00000000..d4d5fac4 --- /dev/null +++ b/client/docs/QuestionConditionOperator.md @@ -0,0 +1,25 @@ + + +# QuestionConditionOperator + +## Enum + + +* `LT` (value: `"lt"`) + +* `LTE` (value: `"lte"`) + +* `GT` (value: `"gt"`) + +* `GTE` (value: `"gte"`) + +* `EQ` (value: `"eq"`) + +* `NEQ` (value: `"neq"`) + +* `INCLUDES` (value: `"includes"`) + +* `EXCLUDES` (value: `"excludes"`) + + + diff --git a/client/docs/QuestionConfig.md b/client/docs/QuestionConfig.md index 268a9db0..45c7f03a 100644 --- a/client/docs/QuestionConfig.md +++ b/client/docs/QuestionConfig.md @@ -17,16 +17,19 @@ |**createdBy** | **String** | | | |**usedCount** | **Double** | | | |**lastUsed** | **OffsetDateTime** | | | -|**type** | **String** | | | +|**type** | **String** | One of nps, slider, star, thumbs, choice, multi, emoji, scale. Answers: nps 0-10, slider min-max, star 1-numStars, thumbs 1 (up) or 0 (down), choice = option index, multi = option indexes (values), emoji/scale = option index + 1. | | |**numStars** | **Double** | | | |**min** | **Double** | | | |**max** | **Double** | | | |**defaultValue** | **Double** | | | |**labelNegative** | **String** | | | |**labelPositive** | **String** | | | -|**customOptions** | [**List<QuestionConfigCustomOptionsInner>**](QuestionConfigCustomOptionsInner.md) | | | +|**customOptions** | [**List<QuestionConfigCustomOptionsInner>**](QuestionConfigCustomOptionsInner.md) | Option labels for choice, multi, emoji and scale questions. | | |**subQuestionIds** | **List<String>** | | | |**alwaysShowSubQuestions** | **Boolean** | | | +|**subQuestionConditions** | [**List<SubQuestionCondition>**](SubQuestionCondition.md) | Sub-questions listed here only show when this question's answer matches. Others always show. | [optional] | +|**commentBoxCondition** | [**QuestionCondition**](QuestionCondition.md) | | [optional] | +|**commentBoxPrompt** | **String** | Placeholder for the comment box when commentBoxCondition reveals it. | [optional] | |**reportingOrder** | **Double** | | | diff --git a/client/docs/QuestionResult.md b/client/docs/QuestionResult.md index a937ff1c..8cf3558e 100644 --- a/client/docs/QuestionResult.md +++ b/client/docs/QuestionResult.md @@ -13,7 +13,8 @@ |**anonUserId** | **String** | | | |**userId** | **String** | | | |**createdAt** | **OffsetDateTime** | | | -|**value** | **Integer** | | | +|**value** | **Integer** | The answer. For multi-choice questions this is the number of selected options and the options are in values. | | +|**values** | **List<Double>** | Selected option indexes, multi-choice questions only. | [optional] | |**commentId** | **String** | | [optional] | |**questionId** | **String** | | | |**meta** | [**List<MetaItem>**](MetaItem.md) | | [optional] | diff --git a/client/docs/QueuePageMigrationJobAPIResponse.md b/client/docs/QueuePageMigrationJobAPIResponse.md new file mode 100644 index 00000000..8c7cc175 --- /dev/null +++ b/client/docs/QueuePageMigrationJobAPIResponse.md @@ -0,0 +1,16 @@ + + +# QueuePageMigrationJobAPIResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | **String** | | [optional] | +|**code** | **String** | | [optional] | +|**batchJobId** | **String** | Poll GET /api/v1/batch-jobs/{batchJobId} for progress and the result. | [optional] | +|**status** | **String** | | | + + + diff --git a/client/docs/RecordStringStringOrNumberOrNumberArrayValue.md b/client/docs/RecordStringStringOrNumberOrNumberArrayValue.md new file mode 100644 index 00000000..1735361c --- /dev/null +++ b/client/docs/RecordStringStringOrNumberOrNumberArrayValue.md @@ -0,0 +1,12 @@ + + +# RecordStringStringOrNumberOrNumberArrayValue + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/client/docs/SavePollResponse.md b/client/docs/SavePollResponse.md new file mode 100644 index 00000000..0b9a7275 --- /dev/null +++ b/client/docs/SavePollResponse.md @@ -0,0 +1,14 @@ + + +# SavePollResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **APIStatus** | | | +|**poll** | [**CommentPoll**](CommentPoll.md) | | | + + + diff --git a/client/docs/SubQuestionCondition.md b/client/docs/SubQuestionCondition.md new file mode 100644 index 00000000..e7b7a0f4 --- /dev/null +++ b/client/docs/SubQuestionCondition.md @@ -0,0 +1,15 @@ + + +# SubQuestionCondition + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operator** | **QuestionConditionOperator** | | | +|**value** | **Double** | | | +|**subQuestionId** | **String** | | | + + + diff --git a/client/docs/TenantPackage.md b/client/docs/TenantPackage.md index 7f28ddde..1be73f07 100644 --- a/client/docs/TenantPackage.md +++ b/client/docs/TenantPackage.md @@ -63,6 +63,7 @@ |**flexSSOAdminUnit** | **Double** | | [optional] | |**flexSSOModeratorCostCents** | **Double** | | [optional] | |**flexSSOModeratorUnit** | **Double** | | [optional] | +|**flexFreeModerators** | **Double** | | [optional] | |**isSSOBillingMonthlyActiveUsers** | **Boolean** | | [optional] | |**hasAIAgents** | **Boolean** | | [optional] | |**maxAIAgents** | **Double** | | [optional] | diff --git a/client/docs/UpdateQuestionConfigBody.md b/client/docs/UpdateQuestionConfigBody.md index e656b3f5..837c3e9a 100644 --- a/client/docs/UpdateQuestionConfigBody.md +++ b/client/docs/UpdateQuestionConfigBody.md @@ -10,7 +10,7 @@ |**name** | **String** | | [optional] | |**question** | **String** | | [optional] | |**helpText** | **String** | | [optional] | -|**type** | **String** | | [optional] | +|**type** | **String** | One of nps, slider, star, thumbs, choice, multi, emoji, scale. | [optional] | |**numStars** | **Double** | | [optional] | |**min** | **Double** | | [optional] | |**max** | **Double** | | [optional] | @@ -20,6 +20,9 @@ |**customOptions** | [**List<QuestionConfigCustomOptionsInner>**](QuestionConfigCustomOptionsInner.md) | | [optional] | |**subQuestionIds** | **List<String>** | | [optional] | |**alwaysShowSubQuestions** | **Boolean** | | [optional] | +|**subQuestionConditions** | [**List<SubQuestionCondition>**](SubQuestionCondition.md) | | [optional] | +|**commentBoxCondition** | [**QuestionCondition**](QuestionCondition.md) | | [optional] | +|**commentBoxPrompt** | **String** | | [optional] | |**reportingOrder** | **Double** | | [optional] | diff --git a/client/docs/UpdateQuestionResultBody.md b/client/docs/UpdateQuestionResultBody.md index 1c6e2950..eca56465 100644 --- a/client/docs/UpdateQuestionResultBody.md +++ b/client/docs/UpdateQuestionResultBody.md @@ -11,6 +11,7 @@ |**anonUserId** | **String** | | [optional] | |**userId** | **String** | | [optional] | |**value** | **Double** | | [optional] | +|**values** | **List<Double>** | Selected option indexes for multi-choice questions. | [optional] | |**commentId** | **String** | | [optional] | |**questionId** | **String** | | [optional] | |**meta** | [**List<MetaItem>**](MetaItem.md) | | [optional] | diff --git a/client/docs/UpdateTenantBody.md b/client/docs/UpdateTenantBody.md index 59a5002f..51788963 100644 --- a/client/docs/UpdateTenantBody.md +++ b/client/docs/UpdateTenantBody.md @@ -14,7 +14,6 @@ |**paymentFrequency** | **Double** | | [optional] | |**billingInfoValid** | **Boolean** | | [optional] | |**billingHandledExternally** | **Boolean** | | [optional] | -|**createdBy** | **String** | | [optional] | |**isSetup** | **Boolean** | | [optional] | |**domainConfiguration** | [**List<APIDomainConfiguration>**](APIDomainConfiguration.md) | | [optional] | |**billingInfo** | [**BillingInfo**](BillingInfo.md) | | [optional] | diff --git a/client/docs/WebhookComment.md b/client/docs/WebhookComment.md new file mode 100644 index 00000000..4167cc22 --- /dev/null +++ b/client/docs/WebhookComment.md @@ -0,0 +1,41 @@ + + +# WebhookComment + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**urlId** | **String** | | | +|**url** | **String** | | | +|**userId** | **String** | | | +|**commenterEmail** | **String** | | | +|**commenterName** | **String** | | | +|**comment** | **String** | | | +|**commentHTML** | **String** | | | +|**externalId** | **String** | | | +|**parentId** | **String** | | | +|**date** | **String** | | | +|**votes** | **Double** | | | +|**votesUp** | **Double** | | | +|**votesDown** | **Double** | | | +|**verified** | **Boolean** | | | +|**verifiedDate** | **String** | | | +|**reviewed** | **Boolean** | | | +|**avatarSrc** | **String** | | | +|**isSpam** | **Boolean** | | | +|**aiDeterminedSpam** | **Boolean** | | | +|**hasImages** | **Boolean** | | | +|**pageNumber** | **Double** | | | +|**pageNumberOF** | **Double** | | | +|**pageNumberNF** | **Double** | | | +|**approved** | **Boolean** | | | +|**locale** | **String** | | | +|**mentions** | [**List<CommentUserMentionInfo>**](CommentUserMentionInfo.md) | | | +|**domain** | **String** | | | +|**moderationGroupIds** | **List<String>** | | | + + + diff --git a/client/docs/WebhookEventName.md b/client/docs/WebhookEventName.md new file mode 100644 index 00000000..ddde2835 --- /dev/null +++ b/client/docs/WebhookEventName.md @@ -0,0 +1,15 @@ + + +# WebhookEventName + +## Enum + + +* `COMMENT_CREATED` (value: `"comment-created"`) + +* `COMMENT_UPDATED` (value: `"comment-updated"`) + +* `COMMENT_DELETED` (value: `"comment-deleted"`) + + + diff --git a/client/docs/WebhookHTTPMethod.md b/client/docs/WebhookHTTPMethod.md new file mode 100644 index 00000000..1eb4191a --- /dev/null +++ b/client/docs/WebhookHTTPMethod.md @@ -0,0 +1,15 @@ + + +# WebhookHTTPMethod + +## Enum + + +* `PUT` (value: `"PUT"`) + +* `DELETE` (value: `"DELETE"`) + +* `POST` (value: `"POST"`) + + + diff --git a/client/docs/WebhookSource.md b/client/docs/WebhookSource.md new file mode 100644 index 00000000..ff7196d5 --- /dev/null +++ b/client/docs/WebhookSource.md @@ -0,0 +1,13 @@ + + +# WebhookSource + +## Enum + + +* `DASHBOARD` (value: `"dashboard"`) + +* `API` (value: `"api"`) + + + diff --git a/client/pom.xml b/client/pom.xml index ec3db311..97686aa5 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -5,7 +5,7 @@ client jar client - 3.0.0 + 3.1.0 https://fastcomments.com FastComments API Client - A SDK for interacting with the FastComments API diff --git a/client/src/main/java/com/fastcomments/api/DefaultApi.java b/client/src/main/java/com/fastcomments/api/DefaultApi.java index 84df6073..947048ee 100644 --- a/client/src/main/java/com/fastcomments/api/DefaultApi.java +++ b/client/src/main/java/com/fastcomments/api/DefaultApi.java @@ -55,9 +55,13 @@ import com.fastcomments.model.ChangeTicketStateBody; import com.fastcomments.model.ChangeTicketStateResponse; import com.fastcomments.model.CombineQuestionResultsWithCommentsResponse; +import com.fastcomments.model.CommentPollPatch; +import com.fastcomments.model.CommentPollPutInput; import com.fastcomments.model.CreateAPIPageData; import com.fastcomments.model.CreateAPISSOUserData; import com.fastcomments.model.CreateAPIUserSubscriptionData; +import com.fastcomments.model.CreateAgentTenantBody; +import com.fastcomments.model.CreateAgentTenantResponse; import com.fastcomments.model.CreateCommentParams; import com.fastcomments.model.CreateEmailTemplateBody; import com.fastcomments.model.CreateEmailTemplateResponse; @@ -67,6 +71,8 @@ import com.fastcomments.model.CreateHashTagResponse; import com.fastcomments.model.CreateModeratorBody; import com.fastcomments.model.CreateModeratorResponse; +import com.fastcomments.model.CreatePollVoteBody; +import com.fastcomments.model.CreatePollVoteResponse; import com.fastcomments.model.CreateQuestionConfigBody; import com.fastcomments.model.CreateQuestionConfigResponse; import com.fastcomments.model.CreateQuestionResultBody; @@ -81,15 +87,20 @@ import com.fastcomments.model.CreateTicketBody; import com.fastcomments.model.CreateTicketResponse; import com.fastcomments.model.CreateUserBadgeParams; +import com.fastcomments.model.CreateWebhookParams; +import com.fastcomments.model.CreateWebhookResponse; import com.fastcomments.model.DeleteCommentResult; import com.fastcomments.model.DeleteDomainConfigResponse; import com.fastcomments.model.DeleteHashTagRequestBody; import com.fastcomments.model.DeletePageAPIResponse; +import com.fastcomments.model.DeletePollVoteResponse; import com.fastcomments.model.DeleteSSOUserAPIResponse; import com.fastcomments.model.DeleteSubscriptionAPIResponse; import com.fastcomments.model.FeedPost; import com.fastcomments.model.FlagCommentResponse; import com.fastcomments.model.GetAuditLogsResponse; +import com.fastcomments.model.GetBatchJobAPIResponse; +import com.fastcomments.model.GetBatchJobsAPIResponse; import com.fastcomments.model.GetCachedNotificationCountResponse; import com.fastcomments.model.GetDomainConfigResponse; import com.fastcomments.model.GetDomainConfigsResponse; @@ -99,14 +110,20 @@ import com.fastcomments.model.GetEmailTemplatesResponse; import com.fastcomments.model.GetFeedPostsResponse; import com.fastcomments.model.GetHashTagsResponse; +import com.fastcomments.model.GetMeResponse; import com.fastcomments.model.GetModeratorResponse; import com.fastcomments.model.GetModeratorsResponse; import com.fastcomments.model.GetNotificationCountResponse; import com.fastcomments.model.GetNotificationsResponse; import com.fastcomments.model.GetPageByURLIdAPIResponse; +import com.fastcomments.model.GetPageLikesAPIResponse; +import com.fastcomments.model.GetPageReactsAPIResponse; import com.fastcomments.model.GetPagesAPIResponse; import com.fastcomments.model.GetPendingWebhookEventCountResponse; import com.fastcomments.model.GetPendingWebhookEventsResponse; +import com.fastcomments.model.GetPollResponse; +import com.fastcomments.model.GetPollVoteResponse; +import com.fastcomments.model.GetPollVotesResponse; import com.fastcomments.model.GetQuestionConfigResponse; import com.fastcomments.model.GetQuestionConfigsResponse; import com.fastcomments.model.GetQuestionResultResponse; @@ -127,19 +144,25 @@ import com.fastcomments.model.GetUserResponse; import com.fastcomments.model.GetVotesForUserResponse; import com.fastcomments.model.GetVotesResponse; +import com.fastcomments.model.GetWebhookSamplePayloadsResponse; +import com.fastcomments.model.GetWebhooksResponse; +import com.fastcomments.model.MigrateAPIPagesData; import java.time.OffsetDateTime; +import com.fastcomments.model.PageReactIncludeUserInfo; import com.fastcomments.model.PatchDomainConfigParams; import com.fastcomments.model.PatchDomainConfigResponse; import com.fastcomments.model.PatchPageAPIResponse; import com.fastcomments.model.PatchSSOUserAPIResponse; import com.fastcomments.model.PutDomainConfigResponse; import com.fastcomments.model.PutSSOUserAPIResponse; +import com.fastcomments.model.QueuePageMigrationJobAPIResponse; import com.fastcomments.model.RenderEmailTemplateBody; import com.fastcomments.model.RenderEmailTemplateResponse; import com.fastcomments.model.ReplaceTenantPackageBody; import com.fastcomments.model.ReplaceTenantUserBody; import com.fastcomments.model.SORTDIR; import com.fastcomments.model.SaveCommentsBulkResponse; +import com.fastcomments.model.SavePollResponse; import com.fastcomments.model.SortDirections; import com.fastcomments.model.UnBlockFromCommentParams; import com.fastcomments.model.UnblockSuccess; @@ -162,6 +185,8 @@ import com.fastcomments.model.UpdateUserBadgeParams; import com.fastcomments.model.VoteDeleteResponse; import com.fastcomments.model.VoteResponse; +import com.fastcomments.model.WebhookEventName; +import com.fastcomments.model.WebhookSource; import java.lang.reflect.Type; import java.util.ArrayList; @@ -2445,6 +2470,169 @@ public okhttp3.Call executeAsync(final ApiCallback 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createAgentTenantBody; + + // create path and map variables + String localVarPath = "/api/v1/agent-tenants"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAgentTenantValidateBeforeCall(@javax.annotation.Nonnull CreateAgentTenantBody createAgentTenantBody, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createAgentTenantBody' is set + if (createAgentTenantBody == null) { + throw new ApiException("Missing the required parameter 'createAgentTenantBody' when calling createAgentTenant(Async)"); + } + + return createAgentTenantCall(createAgentTenantBody, _callback); + + } + + + private ApiResponse createAgentTenantWithHttpInfo(@javax.annotation.Nonnull CreateAgentTenantBody createAgentTenantBody) throws ApiException { + okhttp3.Call localVarCall = createAgentTenantValidateBeforeCall(createAgentTenantBody, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createAgentTenantAsync(@javax.annotation.Nonnull CreateAgentTenantBody createAgentTenantBody, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAgentTenantValidateBeforeCall(createAgentTenantBody, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateAgentTenantRequest { + @javax.annotation.Nonnull + private final CreateAgentTenantBody createAgentTenantBody; + + private APIcreateAgentTenantRequest(@javax.annotation.Nonnull CreateAgentTenantBody createAgentTenantBody) { + this.createAgentTenantBody = createAgentTenantBody; + } + + /** + * Build call for createAgentTenant + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createAgentTenantCall(createAgentTenantBody, _callback); + } + + /** + * Execute createAgentTenant request + * @return CreateAgentTenantResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public CreateAgentTenantResponse execute() throws ApiException { + ApiResponse localVarResp = createAgentTenantWithHttpInfo(createAgentTenantBody); + return localVarResp.getData(); + } + + /** + * Execute createAgentTenant request with HTTP info returned + * @return ApiResponse<CreateAgentTenantResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createAgentTenantWithHttpInfo(createAgentTenantBody); + } + + /** + * Execute createAgentTenant request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createAgentTenantAsync(createAgentTenantBody, _callback); + } + } + + /** + * + * Creates a new trial account for an AI agent without a human signup. No API key is needed to call this. The response contains the tenant id, an API key that works immediately against the REST API and the MCP server, and a claim URL. Give the claim URL to the human you are working for: opening it while logged in to FastComments attaches the account to them. Unclaimed accounts, and their keys, are deleted 72 hours after creation. Until claimed, the account has the standard trial limits. + * @param createAgentTenantBody (required) + * @return APIcreateAgentTenantRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIcreateAgentTenantRequest createAgentTenant(@javax.annotation.Nonnull CreateAgentTenantBody createAgentTenantBody) { + return new APIcreateAgentTenantRequest(createAgentTenantBody); + } private okhttp3.Call createEmailTemplateCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateEmailTemplateBody createEmailTemplateBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -3037,7 +3225,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal public APIcreateModeratorRequest createModerator(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateModeratorBody createModeratorBody) { return new APIcreateModeratorRequest(tenantId, createModeratorBody); } - private okhttp3.Call createQuestionConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createPollVoteCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreatePollVoteBody createPollVoteBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3051,10 +3239,10 @@ private okhttp3.Call createQuestionConfigCall(@javax.annotation.Nonnull String t basePath = null; } - Object localVarPostBody = createQuestionConfigBody; + Object localVarPostBody = createPollVoteBody; // create path and map variables - String localVarPath = "/api/v1/question-configs"; + String localVarPath = "/api/v1/poll-votes"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3087,49 +3275,49 @@ private okhttp3.Call createQuestionConfigCall(@javax.annotation.Nonnull String t } @SuppressWarnings("rawtypes") - private okhttp3.Call createQuestionConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createPollVoteValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreatePollVoteBody createPollVoteBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling createQuestionConfig(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling createPollVote(Async)"); } - // verify the required parameter 'createQuestionConfigBody' is set - if (createQuestionConfigBody == null) { - throw new ApiException("Missing the required parameter 'createQuestionConfigBody' when calling createQuestionConfig(Async)"); + // verify the required parameter 'createPollVoteBody' is set + if (createPollVoteBody == null) { + throw new ApiException("Missing the required parameter 'createPollVoteBody' when calling createPollVote(Async)"); } - return createQuestionConfigCall(tenantId, createQuestionConfigBody, _callback); + return createPollVoteCall(tenantId, createPollVoteBody, _callback); } - private ApiResponse createQuestionConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody) throws ApiException { - okhttp3.Call localVarCall = createQuestionConfigValidateBeforeCall(tenantId, createQuestionConfigBody, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse createPollVoteWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreatePollVoteBody createPollVoteBody) throws ApiException { + okhttp3.Call localVarCall = createPollVoteValidateBeforeCall(tenantId, createPollVoteBody, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call createQuestionConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createPollVoteAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreatePollVoteBody createPollVoteBody, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createQuestionConfigValidateBeforeCall(tenantId, createQuestionConfigBody, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = createPollVoteValidateBeforeCall(tenantId, createPollVoteBody, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIcreateQuestionConfigRequest { + public class APIcreatePollVoteRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final CreateQuestionConfigBody createQuestionConfigBody; + private final CreatePollVoteBody createPollVoteBody; - private APIcreateQuestionConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody) { + private APIcreatePollVoteRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreatePollVoteBody createPollVoteBody) { this.tenantId = tenantId; - this.createQuestionConfigBody = createQuestionConfigBody; + this.createPollVoteBody = createPollVoteBody; } /** - * Build call for createQuestionConfig + * Build call for createPollVote * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3142,12 +3330,12 @@ private APIcreateQuestionConfigRequest(@javax.annotation.Nonnull String tenantId */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return createQuestionConfigCall(tenantId, createQuestionConfigBody, _callback); + return createPollVoteCall(tenantId, createPollVoteBody, _callback); } /** - * Execute createQuestionConfig request - * @return CreateQuestionConfigResponse + * Execute createPollVote request + * @return CreatePollVoteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3157,14 +3345,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public CreateQuestionConfigResponse execute() throws ApiException { - ApiResponse localVarResp = createQuestionConfigWithHttpInfo(tenantId, createQuestionConfigBody); + public CreatePollVoteResponse execute() throws ApiException { + ApiResponse localVarResp = createPollVoteWithHttpInfo(tenantId, createPollVoteBody); return localVarResp.getData(); } /** - * Execute createQuestionConfig request with HTTP info returned - * @return ApiResponse<CreateQuestionConfigResponse> + * Execute createPollVote request with HTTP info returned + * @return ApiResponse<CreatePollVoteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3174,12 +3362,12 @@ public CreateQuestionConfigResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return createQuestionConfigWithHttpInfo(tenantId, createQuestionConfigBody); + public ApiResponse executeWithHttpInfo() throws ApiException { + return createPollVoteWithHttpInfo(tenantId, createPollVoteBody); } /** - * Execute createQuestionConfig request (asynchronously) + * Execute createPollVote request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3191,17 +3379,17 @@ public ApiResponse executeWithHttpInfo() throws Ap 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return createQuestionConfigAsync(tenantId, createQuestionConfigBody, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createPollVoteAsync(tenantId, createPollVoteBody, _callback); } } /** * - * + * Record a vote on a poll, or move an existing one to a different option. A voter has at most one vote per poll, so calling this again for the same voter moves their vote rather than adding one. This obeys the site's poll settings: if voting is set to logged-in users only, a vote with just an anonUserId is rejected, and anonymous votes are rate limited per IP per poll. * @param tenantId (required) - * @param createQuestionConfigBody (required) - * @return APIcreateQuestionConfigRequest + * @param createPollVoteBody (required) + * @return APIcreatePollVoteRequest * @http.response.details @@ -3210,10 +3398,10 @@ public okhttp3.Call executeAsync(final ApiCallback
Response Details
0 Error -
*/ - public APIcreateQuestionConfigRequest createQuestionConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody) { - return new APIcreateQuestionConfigRequest(tenantId, createQuestionConfigBody); + public APIcreatePollVoteRequest createPollVote(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreatePollVoteBody createPollVoteBody) { + return new APIcreatePollVoteRequest(tenantId, createPollVoteBody); } - private okhttp3.Call createQuestionResultCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createQuestionConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3227,10 +3415,10 @@ private okhttp3.Call createQuestionResultCall(@javax.annotation.Nonnull String t basePath = null; } - Object localVarPostBody = createQuestionResultBody; + Object localVarPostBody = createQuestionConfigBody; // create path and map variables - String localVarPath = "/api/v1/question-results"; + String localVarPath = "/api/v1/question-configs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3263,49 +3451,49 @@ private okhttp3.Call createQuestionResultCall(@javax.annotation.Nonnull String t } @SuppressWarnings("rawtypes") - private okhttp3.Call createQuestionResultValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createQuestionConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling createQuestionResult(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling createQuestionConfig(Async)"); } - // verify the required parameter 'createQuestionResultBody' is set - if (createQuestionResultBody == null) { - throw new ApiException("Missing the required parameter 'createQuestionResultBody' when calling createQuestionResult(Async)"); + // verify the required parameter 'createQuestionConfigBody' is set + if (createQuestionConfigBody == null) { + throw new ApiException("Missing the required parameter 'createQuestionConfigBody' when calling createQuestionConfig(Async)"); } - return createQuestionResultCall(tenantId, createQuestionResultBody, _callback); + return createQuestionConfigCall(tenantId, createQuestionConfigBody, _callback); } - private ApiResponse createQuestionResultWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody) throws ApiException { - okhttp3.Call localVarCall = createQuestionResultValidateBeforeCall(tenantId, createQuestionResultBody, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse createQuestionConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody) throws ApiException { + okhttp3.Call localVarCall = createQuestionConfigValidateBeforeCall(tenantId, createQuestionConfigBody, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call createQuestionResultAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createQuestionConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createQuestionResultValidateBeforeCall(tenantId, createQuestionResultBody, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = createQuestionConfigValidateBeforeCall(tenantId, createQuestionConfigBody, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIcreateQuestionResultRequest { + public class APIcreateQuestionConfigRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final CreateQuestionResultBody createQuestionResultBody; + private final CreateQuestionConfigBody createQuestionConfigBody; - private APIcreateQuestionResultRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody) { + private APIcreateQuestionConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody) { this.tenantId = tenantId; - this.createQuestionResultBody = createQuestionResultBody; + this.createQuestionConfigBody = createQuestionConfigBody; } /** - * Build call for createQuestionResult + * Build call for createQuestionConfig * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3318,12 +3506,12 @@ private APIcreateQuestionResultRequest(@javax.annotation.Nonnull String tenantId */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return createQuestionResultCall(tenantId, createQuestionResultBody, _callback); + return createQuestionConfigCall(tenantId, createQuestionConfigBody, _callback); } /** - * Execute createQuestionResult request - * @return CreateQuestionResultResponse + * Execute createQuestionConfig request + * @return CreateQuestionConfigResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3333,14 +3521,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public CreateQuestionResultResponse execute() throws ApiException { - ApiResponse localVarResp = createQuestionResultWithHttpInfo(tenantId, createQuestionResultBody); + public CreateQuestionConfigResponse execute() throws ApiException { + ApiResponse localVarResp = createQuestionConfigWithHttpInfo(tenantId, createQuestionConfigBody); return localVarResp.getData(); } /** - * Execute createQuestionResult request with HTTP info returned - * @return ApiResponse<CreateQuestionResultResponse> + * Execute createQuestionConfig request with HTTP info returned + * @return ApiResponse<CreateQuestionConfigResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3350,12 +3538,12 @@ public CreateQuestionResultResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return createQuestionResultWithHttpInfo(tenantId, createQuestionResultBody); + public ApiResponse executeWithHttpInfo() throws ApiException { + return createQuestionConfigWithHttpInfo(tenantId, createQuestionConfigBody); } /** - * Execute createQuestionResult request (asynchronously) + * Execute createQuestionConfig request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3367,8 +3555,8 @@ public ApiResponse executeWithHttpInfo() throws Ap 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return createQuestionResultAsync(tenantId, createQuestionResultBody, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createQuestionConfigAsync(tenantId, createQuestionConfigBody, _callback); } } @@ -3376,8 +3564,8 @@ public okhttp3.Call executeAsync(final ApiCallback * * * @param tenantId (required) - * @param createQuestionResultBody (required) - * @return APIcreateQuestionResultRequest + * @param createQuestionConfigBody (required) + * @return APIcreateQuestionConfigRequest * @http.response.details @@ -3386,10 +3574,10 @@ public okhttp3.Call executeAsync(final ApiCallback
Response Details
0 Error -
*/ - public APIcreateQuestionResultRequest createQuestionResult(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody) { - return new APIcreateQuestionResultRequest(tenantId, createQuestionResultBody); + public APIcreateQuestionConfigRequest createQuestionConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionConfigBody createQuestionConfigBody) { + return new APIcreateQuestionConfigRequest(tenantId, createQuestionConfigBody); } - private okhttp3.Call createSubscriptionCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateAPIUserSubscriptionData createAPIUserSubscriptionData, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createQuestionResultCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3403,10 +3591,10 @@ private okhttp3.Call createSubscriptionCall(@javax.annotation.Nonnull String ten basePath = null; } - Object localVarPostBody = createAPIUserSubscriptionData; + Object localVarPostBody = createQuestionResultBody; // create path and map variables - String localVarPath = "/api/v1/subscriptions"; + String localVarPath = "/api/v1/question-results"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3439,25 +3627,201 @@ private okhttp3.Call createSubscriptionCall(@javax.annotation.Nonnull String ten } @SuppressWarnings("rawtypes") - private okhttp3.Call createSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateAPIUserSubscriptionData createAPIUserSubscriptionData, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createQuestionResultValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling createSubscription(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling createQuestionResult(Async)"); } - // verify the required parameter 'createAPIUserSubscriptionData' is set - if (createAPIUserSubscriptionData == null) { - throw new ApiException("Missing the required parameter 'createAPIUserSubscriptionData' when calling createSubscription(Async)"); + // verify the required parameter 'createQuestionResultBody' is set + if (createQuestionResultBody == null) { + throw new ApiException("Missing the required parameter 'createQuestionResultBody' when calling createQuestionResult(Async)"); } - return createSubscriptionCall(tenantId, createAPIUserSubscriptionData, _callback); + return createQuestionResultCall(tenantId, createQuestionResultBody, _callback); } - private ApiResponse createSubscriptionWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateAPIUserSubscriptionData createAPIUserSubscriptionData) throws ApiException { - okhttp3.Call localVarCall = createSubscriptionValidateBeforeCall(tenantId, createAPIUserSubscriptionData, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse createQuestionResultWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody) throws ApiException { + okhttp3.Call localVarCall = createQuestionResultValidateBeforeCall(tenantId, createQuestionResultBody, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createQuestionResultAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createQuestionResultValidateBeforeCall(tenantId, createQuestionResultBody, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateQuestionResultRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final CreateQuestionResultBody createQuestionResultBody; + + private APIcreateQuestionResultRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody) { + this.tenantId = tenantId; + this.createQuestionResultBody = createQuestionResultBody; + } + + /** + * Build call for createQuestionResult + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createQuestionResultCall(tenantId, createQuestionResultBody, _callback); + } + + /** + * Execute createQuestionResult request + * @return CreateQuestionResultResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public CreateQuestionResultResponse execute() throws ApiException { + ApiResponse localVarResp = createQuestionResultWithHttpInfo(tenantId, createQuestionResultBody); + return localVarResp.getData(); + } + + /** + * Execute createQuestionResult request with HTTP info returned + * @return ApiResponse<CreateQuestionResultResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createQuestionResultWithHttpInfo(tenantId, createQuestionResultBody); + } + + /** + * Execute createQuestionResult request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createQuestionResultAsync(tenantId, createQuestionResultBody, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @param createQuestionResultBody (required) + * @return APIcreateQuestionResultRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIcreateQuestionResultRequest createQuestionResult(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateQuestionResultBody createQuestionResultBody) { + return new APIcreateQuestionResultRequest(tenantId, createQuestionResultBody); + } + private okhttp3.Call createSubscriptionCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateAPIUserSubscriptionData createAPIUserSubscriptionData, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createAPIUserSubscriptionData; + + // create path and map variables + String localVarPath = "/api/v1/subscriptions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateAPIUserSubscriptionData createAPIUserSubscriptionData, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling createSubscription(Async)"); + } + + // verify the required parameter 'createAPIUserSubscriptionData' is set + if (createAPIUserSubscriptionData == null) { + throw new ApiException("Missing the required parameter 'createAPIUserSubscriptionData' when calling createSubscription(Async)"); + } + + return createSubscriptionCall(tenantId, createAPIUserSubscriptionData, _callback); + + } + + + private ApiResponse createSubscriptionWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateAPIUserSubscriptionData createAPIUserSubscriptionData) throws ApiException { + okhttp3.Call localVarCall = createSubscriptionValidateBeforeCall(tenantId, createAPIUserSubscriptionData, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -4677,7 +5041,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro public APIcreateVoteRequest createVote(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull String direction) { return new APIcreateVoteRequest(tenantId, commentId, direction); } - private okhttp3.Call deleteCommentCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable Boolean isLive, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createWebhookCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateWebhookParams createWebhookParams, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4691,11 +5055,10 @@ private okhttp3.Call deleteCommentCall(@javax.annotation.Nonnull String tenantId basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = createWebhookParams; // create path and map variables - String localVarPath = "/api/v1/comments/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/webhooks"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4707,14 +5070,6 @@ private okhttp3.Call deleteCommentCall(@javax.annotation.Nonnull String tenantId localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (contextUserId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("contextUserId", contextUserId)); - } - - if (isLive != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("isLive", isLive)); - } - final String[] localVarAccepts = { "application/json" }; @@ -4724,6 +5079,7 @@ private okhttp3.Call deleteCommentCall(@javax.annotation.Nonnull String tenantId } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -4731,77 +5087,53 @@ private okhttp3.Call deleteCommentCall(@javax.annotation.Nonnull String tenantId } String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCommentValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable Boolean isLive, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createWebhookValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateWebhookParams createWebhookParams, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteComment(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling createWebhook(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteComment(Async)"); + // verify the required parameter 'createWebhookParams' is set + if (createWebhookParams == null) { + throw new ApiException("Missing the required parameter 'createWebhookParams' when calling createWebhook(Async)"); } - return deleteCommentCall(tenantId, id, contextUserId, isLive, _callback); + return createWebhookCall(tenantId, createWebhookParams, _callback); } - private ApiResponse deleteCommentWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable Boolean isLive) throws ApiException { - okhttp3.Call localVarCall = deleteCommentValidateBeforeCall(tenantId, id, contextUserId, isLive, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse createWebhookWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateWebhookParams createWebhookParams) throws ApiException { + okhttp3.Call localVarCall = createWebhookValidateBeforeCall(tenantId, createWebhookParams, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteCommentAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable Boolean isLive, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createWebhookAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateWebhookParams createWebhookParams, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteCommentValidateBeforeCall(tenantId, id, contextUserId, isLive, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = createWebhookValidateBeforeCall(tenantId, createWebhookParams, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteCommentRequest { + public class APIcreateWebhookRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String id; - @javax.annotation.Nullable - private String contextUserId; - @javax.annotation.Nullable - private Boolean isLive; + private final CreateWebhookParams createWebhookParams; - private APIdeleteCommentRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIcreateWebhookRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateWebhookParams createWebhookParams) { this.tenantId = tenantId; - this.id = id; - } - - /** - * Set contextUserId - * @param contextUserId (optional) - * @return APIdeleteCommentRequest - */ - public APIdeleteCommentRequest contextUserId(@javax.annotation.Nullable String contextUserId) { - this.contextUserId = contextUserId; - return this; + this.createWebhookParams = createWebhookParams; } /** - * Set isLive - * @param isLive (optional) - * @return APIdeleteCommentRequest - */ - public APIdeleteCommentRequest isLive(@javax.annotation.Nullable Boolean isLive) { - this.isLive = isLive; - return this; - } - - /** - * Build call for deleteComment + * Build call for createWebhook * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4814,12 +5146,12 @@ public APIdeleteCommentRequest isLive(@javax.annotation.Nullable Boolean isLive) */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteCommentCall(tenantId, id, contextUserId, isLive, _callback); + return createWebhookCall(tenantId, createWebhookParams, _callback); } /** - * Execute deleteComment request - * @return DeleteCommentResult + * Execute createWebhook request + * @return CreateWebhookResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4829,14 +5161,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public DeleteCommentResult execute() throws ApiException { - ApiResponse localVarResp = deleteCommentWithHttpInfo(tenantId, id, contextUserId, isLive); + public CreateWebhookResponse execute() throws ApiException { + ApiResponse localVarResp = createWebhookWithHttpInfo(tenantId, createWebhookParams); return localVarResp.getData(); } /** - * Execute deleteComment request with HTTP info returned - * @return ApiResponse<DeleteCommentResult> + * Execute createWebhook request with HTTP info returned + * @return ApiResponse<CreateWebhookResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4846,12 +5178,12 @@ public DeleteCommentResult execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteCommentWithHttpInfo(tenantId, id, contextUserId, isLive); + public ApiResponse executeWithHttpInfo() throws ApiException { + return createWebhookWithHttpInfo(tenantId, createWebhookParams); } /** - * Execute deleteComment request (asynchronously) + * Execute createWebhook request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4863,17 +5195,17 @@ public ApiResponse executeWithHttpInfo() throws ApiExceptio 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteCommentAsync(tenantId, id, contextUserId, isLive, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createWebhookAsync(tenantId, createWebhookParams, _callback); } } /** * - * + * Subscribes a URL to a comment event (REST hook subscribe). Subscribing the same URL to the same event and domain again returns the existing subscription. Deliveries are HMAC signed, see the webhooks guide; the legacy `token` header is never sent to API subscriptions. * @param tenantId (required) - * @param id (required) - * @return APIdeleteCommentRequest + * @param createWebhookParams (required) + * @return APIcreateWebhookRequest * @http.response.details @@ -4882,10 +5214,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac
Response Details
0 Error -
*/ - public APIdeleteCommentRequest deleteComment(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteCommentRequest(tenantId, id); + public APIcreateWebhookRequest createWebhook(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateWebhookParams createWebhookParams) { + return new APIcreateWebhookRequest(tenantId, createWebhookParams); } - private okhttp3.Call deleteDomainConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteCommentCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable Boolean isLive, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4902,8 +5234,216 @@ private okhttp3.Call deleteDomainConfigCall(@javax.annotation.Nonnull String ten Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/domain-configs/{domain}" - .replace("{" + "domain" + "}", localVarApiClient.escapeString(domain.toString())); + String localVarPath = "/api/v1/comments/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (contextUserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("contextUserId", contextUserId)); + } + + if (isLive != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isLive", isLive)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCommentValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable Boolean isLive, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteComment(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteComment(Async)"); + } + + return deleteCommentCall(tenantId, id, contextUserId, isLive, _callback); + + } + + + private ApiResponse deleteCommentWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable Boolean isLive) throws ApiException { + okhttp3.Call localVarCall = deleteCommentValidateBeforeCall(tenantId, id, contextUserId, isLive, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteCommentAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable Boolean isLive, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCommentValidateBeforeCall(tenantId, id, contextUserId, isLive, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteCommentRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String id; + @javax.annotation.Nullable + private String contextUserId; + @javax.annotation.Nullable + private Boolean isLive; + + private APIdeleteCommentRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + this.tenantId = tenantId; + this.id = id; + } + + /** + * Set contextUserId + * @param contextUserId (optional) + * @return APIdeleteCommentRequest + */ + public APIdeleteCommentRequest contextUserId(@javax.annotation.Nullable String contextUserId) { + this.contextUserId = contextUserId; + return this; + } + + /** + * Set isLive + * @param isLive (optional) + * @return APIdeleteCommentRequest + */ + public APIdeleteCommentRequest isLive(@javax.annotation.Nullable Boolean isLive) { + this.isLive = isLive; + return this; + } + + /** + * Build call for deleteComment + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteCommentCall(tenantId, id, contextUserId, isLive, _callback); + } + + /** + * Execute deleteComment request + * @return DeleteCommentResult + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public DeleteCommentResult execute() throws ApiException { + ApiResponse localVarResp = deleteCommentWithHttpInfo(tenantId, id, contextUserId, isLive); + return localVarResp.getData(); + } + + /** + * Execute deleteComment request with HTTP info returned + * @return ApiResponse<DeleteCommentResult> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteCommentWithHttpInfo(tenantId, id, contextUserId, isLive); + } + + /** + * Execute deleteComment request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteCommentAsync(tenantId, id, contextUserId, isLive, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @param id (required) + * @return APIdeleteCommentRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIdeleteCommentRequest deleteComment(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteCommentRequest(tenantId, id); + } + private okhttp3.Call deleteDomainConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/domain-configs/{domain}" + .replace("{" + "domain" + "}", localVarApiClient.escapeString(domain.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6322,7 +6862,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) public APIdeletePendingWebhookEventRequest deletePendingWebhookEvent(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { return new APIdeletePendingWebhookEventRequest(tenantId, id); } - private okhttp3.Call deleteQuestionConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deletePollCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6339,8 +6879,8 @@ private okhttp3.Call deleteQuestionConfigCall(@javax.annotation.Nonnull String t Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/question-configs/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/polls/{commentId}" + .replace("{" + "commentId" + "}", localVarApiClient.escapeString(commentId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6372,49 +6912,49 @@ private okhttp3.Call deleteQuestionConfigCall(@javax.annotation.Nonnull String t } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteQuestionConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deletePollValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteQuestionConfig(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deletePoll(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteQuestionConfig(Async)"); + // verify the required parameter 'commentId' is set + if (commentId == null) { + throw new ApiException("Missing the required parameter 'commentId' when calling deletePoll(Async)"); } - return deleteQuestionConfigCall(tenantId, id, _callback); + return deletePollCall(tenantId, commentId, _callback); } - private ApiResponse deleteQuestionConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = deleteQuestionConfigValidateBeforeCall(tenantId, id, null); + private ApiResponse deletePollWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId) throws ApiException { + okhttp3.Call localVarCall = deletePollValidateBeforeCall(tenantId, commentId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteQuestionConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deletePollAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteQuestionConfigValidateBeforeCall(tenantId, id, _callback); + okhttp3.Call localVarCall = deletePollValidateBeforeCall(tenantId, commentId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteQuestionConfigRequest { + public class APIdeletePollRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String id; + private final String commentId; - private APIdeleteQuestionConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeletePollRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId) { this.tenantId = tenantId; - this.id = id; + this.commentId = commentId; } /** - * Build call for deleteQuestionConfig + * Build call for deletePoll * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6427,11 +6967,11 @@ private APIdeleteQuestionConfigRequest(@javax.annotation.Nonnull String tenantId */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteQuestionConfigCall(tenantId, id, _callback); + return deletePollCall(tenantId, commentId, _callback); } /** - * Execute deleteQuestionConfig request + * Execute deletePoll request * @return APIEmptyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6443,12 +6983,12 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public APIEmptyResponse execute() throws ApiException { - ApiResponse localVarResp = deleteQuestionConfigWithHttpInfo(tenantId, id); + ApiResponse localVarResp = deletePollWithHttpInfo(tenantId, commentId); return localVarResp.getData(); } /** - * Execute deleteQuestionConfig request with HTTP info returned + * Execute deletePoll request with HTTP info returned * @return ApiResponse<APIEmptyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6460,11 +7000,11 @@ public APIEmptyResponse execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteQuestionConfigWithHttpInfo(tenantId, id); + return deletePollWithHttpInfo(tenantId, commentId); } /** - * Execute deleteQuestionConfig request (asynchronously) + * Execute deletePoll request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6477,16 +7017,16 @@ public ApiResponse executeWithHttpInfo() throws ApiException { */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteQuestionConfigAsync(tenantId, id, _callback); + return deletePollAsync(tenantId, commentId, _callback); } } /** * - * + * Remove a poll from its comment, along with every vote cast on it. The comment itself is left alone. * @param tenantId (required) - * @param id (required) - * @return APIdeleteQuestionConfigRequest + * @param commentId (required) + * @return APIdeletePollRequest * @http.response.details @@ -6495,10 +7035,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callback)
Response Details
0 Error -
*/ - public APIdeleteQuestionConfigRequest deleteQuestionConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteQuestionConfigRequest(tenantId, id); + public APIdeletePollRequest deletePoll(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId) { + return new APIdeletePollRequest(tenantId, commentId); } - private okhttp3.Call deleteQuestionResultCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deletePollVoteCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6515,7 +7055,7 @@ private okhttp3.Call deleteQuestionResultCall(@javax.annotation.Nonnull String t Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/question-results/{id}" + String localVarPath = "/api/v1/poll-votes/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -6548,49 +7088,49 @@ private okhttp3.Call deleteQuestionResultCall(@javax.annotation.Nonnull String t } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteQuestionResultValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deletePollVoteValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteQuestionResult(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deletePollVote(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteQuestionResult(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deletePollVote(Async)"); } - return deleteQuestionResultCall(tenantId, id, _callback); + return deletePollVoteCall(tenantId, id, _callback); } - private ApiResponse deleteQuestionResultWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = deleteQuestionResultValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deletePollVoteWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = deletePollVoteValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteQuestionResultAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deletePollVoteAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteQuestionResultValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deletePollVoteValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteQuestionResultRequest { + public class APIdeletePollVoteRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - private APIdeleteQuestionResultRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeletePollVoteRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for deleteQuestionResult + * Build call for deletePollVote * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6603,12 +7143,12 @@ private APIdeleteQuestionResultRequest(@javax.annotation.Nonnull String tenantId */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteQuestionResultCall(tenantId, id, _callback); + return deletePollVoteCall(tenantId, id, _callback); } /** - * Execute deleteQuestionResult request - * @return APIEmptyResponse + * Execute deletePollVote request + * @return DeletePollVoteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6618,14 +7158,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public APIEmptyResponse execute() throws ApiException { - ApiResponse localVarResp = deleteQuestionResultWithHttpInfo(tenantId, id); + public DeletePollVoteResponse execute() throws ApiException { + ApiResponse localVarResp = deletePollVoteWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute deleteQuestionResult request with HTTP info returned - * @return ApiResponse<APIEmptyResponse> + * Execute deletePollVote request with HTTP info returned + * @return ApiResponse<DeletePollVoteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6635,12 +7175,12 @@ public APIEmptyResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteQuestionResultWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deletePollVoteWithHttpInfo(tenantId, id); } /** - * Execute deleteQuestionResult request (asynchronously) + * Execute deletePollVote request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6652,17 +7192,17 @@ public ApiResponse executeWithHttpInfo() throws ApiException { 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteQuestionResultAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deletePollVoteAsync(tenantId, id, _callback); } } /** * - * + * Retract a vote. The option it was cast on gives its tally back. * @param tenantId (required) * @param id (required) - * @return APIdeleteQuestionResultRequest + * @return APIdeletePollVoteRequest * @http.response.details @@ -6671,10 +7211,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callback)
Response Details
0 Error -
*/ - public APIdeleteQuestionResultRequest deleteQuestionResult(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteQuestionResultRequest(tenantId, id); + public APIdeletePollVoteRequest deletePollVote(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeletePollVoteRequest(tenantId, id); } - private okhttp3.Call deleteSSOUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Boolean deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteQuestionConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6691,7 +7231,7 @@ private okhttp3.Call deleteSSOUserCall(@javax.annotation.Nonnull String tenantId Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/sso-users/{id}" + String localVarPath = "/api/v1/question-configs/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -6704,14 +7244,6 @@ private okhttp3.Call deleteSSOUserCall(@javax.annotation.Nonnull String tenantId localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (deleteComments != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteComments", deleteComments)); - } - - if (commentDeleteMode != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("commentDeleteMode", commentDeleteMode)); - } - final String[] localVarAccepts = { "application/json" }; @@ -6732,73 +7264,49 @@ private okhttp3.Call deleteSSOUserCall(@javax.annotation.Nonnull String tenantId } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSSOUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Boolean deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteQuestionConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteSSOUser(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteQuestionConfig(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteSSOUser(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deleteQuestionConfig(Async)"); } - return deleteSSOUserCall(tenantId, id, deleteComments, commentDeleteMode, _callback); + return deleteQuestionConfigCall(tenantId, id, _callback); } - private ApiResponse deleteSSOUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Boolean deleteComments, @javax.annotation.Nullable String commentDeleteMode) throws ApiException { - okhttp3.Call localVarCall = deleteSSOUserValidateBeforeCall(tenantId, id, deleteComments, commentDeleteMode, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deleteQuestionConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = deleteQuestionConfigValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteSSOUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Boolean deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteQuestionConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteSSOUserValidateBeforeCall(tenantId, id, deleteComments, commentDeleteMode, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteQuestionConfigValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteSSOUserRequest { + public class APIdeleteQuestionConfigRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - @javax.annotation.Nullable - private Boolean deleteComments; - @javax.annotation.Nullable - private String commentDeleteMode; - private APIdeleteSSOUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeleteQuestionConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Set deleteComments - * @param deleteComments (optional) - * @return APIdeleteSSOUserRequest - */ - public APIdeleteSSOUserRequest deleteComments(@javax.annotation.Nullable Boolean deleteComments) { - this.deleteComments = deleteComments; - return this; - } - - /** - * Set commentDeleteMode - * @param commentDeleteMode (optional) - * @return APIdeleteSSOUserRequest - */ - public APIdeleteSSOUserRequest commentDeleteMode(@javax.annotation.Nullable String commentDeleteMode) { - this.commentDeleteMode = commentDeleteMode; - return this; - } - - /** - * Build call for deleteSSOUser + * Build call for deleteQuestionConfig * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6807,45 +7315,48 @@ public APIdeleteSSOUserRequest commentDeleteMode(@javax.annotation.Nullable Stri Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteSSOUserCall(tenantId, id, deleteComments, commentDeleteMode, _callback); + return deleteQuestionConfigCall(tenantId, id, _callback); } /** - * Execute deleteSSOUser request - * @return DeleteSSOUserAPIResponse + * Execute deleteQuestionConfig request + * @return APIEmptyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public DeleteSSOUserAPIResponse execute() throws ApiException { - ApiResponse localVarResp = deleteSSOUserWithHttpInfo(tenantId, id, deleteComments, commentDeleteMode); + public APIEmptyResponse execute() throws ApiException { + ApiResponse localVarResp = deleteQuestionConfigWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute deleteSSOUser request with HTTP info returned - * @return ApiResponse<DeleteSSOUserAPIResponse> + * Execute deleteQuestionConfig request with HTTP info returned + * @return ApiResponse<APIEmptyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteSSOUserWithHttpInfo(tenantId, id, deleteComments, commentDeleteMode); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteQuestionConfigWithHttpInfo(tenantId, id); } /** - * Execute deleteSSOUser request (asynchronously) + * Execute deleteQuestionConfig request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6854,10 +7365,11 @@ public ApiResponse executeWithHttpInfo() throws ApiExc Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteSSOUserAsync(tenantId, id, deleteComments, commentDeleteMode, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteQuestionConfigAsync(tenantId, id, _callback); } } @@ -6866,18 +7378,19 @@ public okhttp3.Call executeAsync(final ApiCallback _ca * * @param tenantId (required) * @param id (required) - * @return APIdeleteSSOUserRequest + * @return APIdeleteQuestionConfigRequest * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIdeleteSSOUserRequest deleteSSOUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteSSOUserRequest(tenantId, id); + public APIdeleteQuestionConfigRequest deleteQuestionConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteQuestionConfigRequest(tenantId, id); } - private okhttp3.Call deleteSubscriptionCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteQuestionResultCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6894,7 +7407,7 @@ private okhttp3.Call deleteSubscriptionCall(@javax.annotation.Nonnull String ten Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/subscriptions/{id}" + String localVarPath = "/api/v1/question-results/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -6907,10 +7420,6 @@ private okhttp3.Call deleteSubscriptionCall(@javax.annotation.Nonnull String ten localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - final String[] localVarAccepts = { "application/json" }; @@ -6931,61 +7440,49 @@ private okhttp3.Call deleteSubscriptionCall(@javax.annotation.Nonnull String ten } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteQuestionResultValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteSubscription(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteQuestionResult(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteSubscription(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deleteQuestionResult(Async)"); } - return deleteSubscriptionCall(tenantId, id, userId, _callback); + return deleteQuestionResultCall(tenantId, id, _callback); } - private ApiResponse deleteSubscriptionWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId) throws ApiException { - okhttp3.Call localVarCall = deleteSubscriptionValidateBeforeCall(tenantId, id, userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deleteQuestionResultWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = deleteQuestionResultValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteSubscriptionAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteQuestionResultAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteSubscriptionValidateBeforeCall(tenantId, id, userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteQuestionResultValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteSubscriptionRequest { + public class APIdeleteQuestionResultRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - @javax.annotation.Nullable - private String userId; - private APIdeleteSubscriptionRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeleteQuestionResultRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Set userId - * @param userId (optional) - * @return APIdeleteSubscriptionRequest - */ - public APIdeleteSubscriptionRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; - return this; - } - - /** - * Build call for deleteSubscription + * Build call for deleteQuestionResult * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6994,45 +7491,48 @@ public APIdeleteSubscriptionRequest userId(@javax.annotation.Nullable String use Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteSubscriptionCall(tenantId, id, userId, _callback); + return deleteQuestionResultCall(tenantId, id, _callback); } /** - * Execute deleteSubscription request - * @return DeleteSubscriptionAPIResponse + * Execute deleteQuestionResult request + * @return APIEmptyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public DeleteSubscriptionAPIResponse execute() throws ApiException { - ApiResponse localVarResp = deleteSubscriptionWithHttpInfo(tenantId, id, userId); + public APIEmptyResponse execute() throws ApiException { + ApiResponse localVarResp = deleteQuestionResultWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute deleteSubscription request with HTTP info returned - * @return ApiResponse<DeleteSubscriptionAPIResponse> + * Execute deleteQuestionResult request with HTTP info returned + * @return ApiResponse<APIEmptyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteSubscriptionWithHttpInfo(tenantId, id, userId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteQuestionResultWithHttpInfo(tenantId, id); } /** - * Execute deleteSubscription request (asynchronously) + * Execute deleteQuestionResult request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -7041,10 +7541,11 @@ public ApiResponse executeWithHttpInfo() throws A Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteSubscriptionAsync(tenantId, id, userId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteQuestionResultAsync(tenantId, id, _callback); } } @@ -7053,18 +7554,19 @@ public okhttp3.Call executeAsync(final ApiCallback Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public APIdeleteSubscriptionRequest deleteSubscription(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteSubscriptionRequest(tenantId, id); + public APIdeleteQuestionResultRequest deleteQuestionResult(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteQuestionResultRequest(tenantId, id); } - private okhttp3.Call deleteTenantCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sure, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteSSOUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Boolean deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7081,7 +7583,7 @@ private okhttp3.Call deleteTenantCall(@javax.annotation.Nonnull String tenantId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenants/{id}" + String localVarPath = "/api/v1/sso-users/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -7094,8 +7596,12 @@ private okhttp3.Call deleteTenantCall(@javax.annotation.Nonnull String tenantId, localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (sure != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sure", sure)); + if (deleteComments != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteComments", deleteComments)); + } + + if (commentDeleteMode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("commentDeleteMode", commentDeleteMode)); } final String[] localVarAccepts = { @@ -7118,111 +7624,120 @@ private okhttp3.Call deleteTenantCall(@javax.annotation.Nonnull String tenantId, } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteTenantValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sure, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteSSOUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Boolean deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteTenant(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteSSOUser(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteTenant(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deleteSSOUser(Async)"); } - return deleteTenantCall(tenantId, id, sure, _callback); + return deleteSSOUserCall(tenantId, id, deleteComments, commentDeleteMode, _callback); } - private ApiResponse deleteTenantWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sure) throws ApiException { - okhttp3.Call localVarCall = deleteTenantValidateBeforeCall(tenantId, id, sure, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deleteSSOUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Boolean deleteComments, @javax.annotation.Nullable String commentDeleteMode) throws ApiException { + okhttp3.Call localVarCall = deleteSSOUserValidateBeforeCall(tenantId, id, deleteComments, commentDeleteMode, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteTenantAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sure, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteSSOUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Boolean deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteTenantValidateBeforeCall(tenantId, id, sure, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteSSOUserValidateBeforeCall(tenantId, id, deleteComments, commentDeleteMode, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteTenantRequest { + public class APIdeleteSSOUserRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; @javax.annotation.Nullable - private String sure; + private Boolean deleteComments; + @javax.annotation.Nullable + private String commentDeleteMode; - private APIdeleteTenantRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeleteSSOUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Set sure - * @param sure (optional) - * @return APIdeleteTenantRequest + * Set deleteComments + * @param deleteComments (optional) + * @return APIdeleteSSOUserRequest */ - public APIdeleteTenantRequest sure(@javax.annotation.Nullable String sure) { - this.sure = sure; + public APIdeleteSSOUserRequest deleteComments(@javax.annotation.Nullable Boolean deleteComments) { + this.deleteComments = deleteComments; return this; } /** - * Build call for deleteTenant - * @param _callback ApiCallback API callback - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - + * Set commentDeleteMode + * @param commentDeleteMode (optional) + * @return APIdeleteSSOUserRequest + */ + public APIdeleteSSOUserRequest commentDeleteMode(@javax.annotation.Nullable String commentDeleteMode) { + this.commentDeleteMode = commentDeleteMode; + return this; + } + + /** + * Build call for deleteSSOUser + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details +
Response Details
Status Code Description Response Headers
+ + -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteTenantCall(tenantId, id, sure, _callback); + return deleteSSOUserCall(tenantId, id, deleteComments, commentDeleteMode, _callback); } /** - * Execute deleteTenant request - * @return APIEmptyResponse + * Execute deleteSSOUser request + * @return DeleteSSOUserAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIEmptyResponse execute() throws ApiException { - ApiResponse localVarResp = deleteTenantWithHttpInfo(tenantId, id, sure); + public DeleteSSOUserAPIResponse execute() throws ApiException { + ApiResponse localVarResp = deleteSSOUserWithHttpInfo(tenantId, id, deleteComments, commentDeleteMode); return localVarResp.getData(); } /** - * Execute deleteTenant request with HTTP info returned - * @return ApiResponse<APIEmptyResponse> + * Execute deleteSSOUser request with HTTP info returned + * @return ApiResponse<DeleteSSOUserAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteTenantWithHttpInfo(tenantId, id, sure); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteSSOUserWithHttpInfo(tenantId, id, deleteComments, commentDeleteMode); } /** - * Execute deleteTenant request (asynchronously) + * Execute deleteSSOUser request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -7231,11 +7746,10 @@ public ApiResponse executeWithHttpInfo() throws ApiException { Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteTenantAsync(tenantId, id, sure, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteSSOUserAsync(tenantId, id, deleteComments, commentDeleteMode, _callback); } } @@ -7244,19 +7758,18 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) * * @param tenantId (required) * @param id (required) - * @return APIdeleteTenantRequest + * @return APIdeleteSSOUserRequest * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIdeleteTenantRequest deleteTenant(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteTenantRequest(tenantId, id); + public APIdeleteSSOUserRequest deleteSSOUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteSSOUserRequest(tenantId, id); } - private okhttp3.Call deleteTenantPackageCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteSubscriptionCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7273,7 +7786,7 @@ private okhttp3.Call deleteTenantPackageCall(@javax.annotation.Nonnull String te Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenant-packages/{id}" + String localVarPath = "/api/v1/subscriptions/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -7286,6 +7799,10 @@ private okhttp3.Call deleteTenantPackageCall(@javax.annotation.Nonnull String te localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + final String[] localVarAccepts = { "application/json" }; @@ -7306,49 +7823,61 @@ private okhttp3.Call deleteTenantPackageCall(@javax.annotation.Nonnull String te } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteTenantPackageValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteTenantPackage(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteSubscription(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteTenantPackage(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deleteSubscription(Async)"); } - return deleteTenantPackageCall(tenantId, id, _callback); + return deleteSubscriptionCall(tenantId, id, userId, _callback); } - private ApiResponse deleteTenantPackageWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = deleteTenantPackageValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deleteSubscriptionWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId) throws ApiException { + okhttp3.Call localVarCall = deleteSubscriptionValidateBeforeCall(tenantId, id, userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteTenantPackageAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteSubscriptionAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteTenantPackageValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteSubscriptionValidateBeforeCall(tenantId, id, userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteTenantPackageRequest { + public class APIdeleteSubscriptionRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; + @javax.annotation.Nullable + private String userId; - private APIdeleteTenantPackageRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeleteSubscriptionRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for deleteTenantPackage + * Set userId + * @param userId (optional) + * @return APIdeleteSubscriptionRequest + */ + public APIdeleteSubscriptionRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Build call for deleteSubscription * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7357,48 +7886,45 @@ private APIdeleteTenantPackageRequest(@javax.annotation.Nonnull String tenantId, Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteTenantPackageCall(tenantId, id, _callback); + return deleteSubscriptionCall(tenantId, id, userId, _callback); } /** - * Execute deleteTenantPackage request - * @return APIEmptyResponse + * Execute deleteSubscription request + * @return DeleteSubscriptionAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIEmptyResponse execute() throws ApiException { - ApiResponse localVarResp = deleteTenantPackageWithHttpInfo(tenantId, id); + public DeleteSubscriptionAPIResponse execute() throws ApiException { + ApiResponse localVarResp = deleteSubscriptionWithHttpInfo(tenantId, id, userId); return localVarResp.getData(); } /** - * Execute deleteTenantPackage request with HTTP info returned - * @return ApiResponse<APIEmptyResponse> + * Execute deleteSubscription request with HTTP info returned + * @return ApiResponse<DeleteSubscriptionAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteTenantPackageWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteSubscriptionWithHttpInfo(tenantId, id, userId); } /** - * Execute deleteTenantPackage request (asynchronously) + * Execute deleteSubscription request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -7407,11 +7933,10 @@ public ApiResponse executeWithHttpInfo() throws ApiException { Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteTenantPackageAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteSubscriptionAsync(tenantId, id, userId, _callback); } } @@ -7420,19 +7945,18 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) * * @param tenantId (required) * @param id (required) - * @return APIdeleteTenantPackageRequest + * @return APIdeleteSubscriptionRequest * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIdeleteTenantPackageRequest deleteTenantPackage(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteTenantPackageRequest(tenantId, id); + public APIdeleteSubscriptionRequest deleteSubscription(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteSubscriptionRequest(tenantId, id); } - private okhttp3.Call deleteTenantUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTenantCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sure, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7449,7 +7973,7 @@ private okhttp3.Call deleteTenantUserCall(@javax.annotation.Nonnull String tenan Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenant-users/{id}" + String localVarPath = "/api/v1/tenants/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -7462,12 +7986,8 @@ private okhttp3.Call deleteTenantUserCall(@javax.annotation.Nonnull String tenan localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (deleteComments != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteComments", deleteComments)); - } - - if (commentDeleteMode != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("commentDeleteMode", commentDeleteMode)); + if (sure != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sure", sure)); } final String[] localVarAccepts = { @@ -7490,73 +8010,61 @@ private okhttp3.Call deleteTenantUserCall(@javax.annotation.Nonnull String tenan } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteTenantUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTenantValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sure, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteTenantUser(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteTenant(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteTenantUser(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deleteTenant(Async)"); } - return deleteTenantUserCall(tenantId, id, deleteComments, commentDeleteMode, _callback); + return deleteTenantCall(tenantId, id, sure, _callback); } - private ApiResponse deleteTenantUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String deleteComments, @javax.annotation.Nullable String commentDeleteMode) throws ApiException { - okhttp3.Call localVarCall = deleteTenantUserValidateBeforeCall(tenantId, id, deleteComments, commentDeleteMode, null); + private ApiResponse deleteTenantWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sure) throws ApiException { + okhttp3.Call localVarCall = deleteTenantValidateBeforeCall(tenantId, id, sure, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteTenantUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTenantAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sure, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteTenantUserValidateBeforeCall(tenantId, id, deleteComments, commentDeleteMode, _callback); + okhttp3.Call localVarCall = deleteTenantValidateBeforeCall(tenantId, id, sure, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteTenantUserRequest { + public class APIdeleteTenantRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; @javax.annotation.Nullable - private String deleteComments; - @javax.annotation.Nullable - private String commentDeleteMode; + private String sure; - private APIdeleteTenantUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeleteTenantRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Set deleteComments - * @param deleteComments (optional) - * @return APIdeleteTenantUserRequest - */ - public APIdeleteTenantUserRequest deleteComments(@javax.annotation.Nullable String deleteComments) { - this.deleteComments = deleteComments; - return this; - } - - /** - * Set commentDeleteMode - * @param commentDeleteMode (optional) - * @return APIdeleteTenantUserRequest + * Set sure + * @param sure (optional) + * @return APIdeleteTenantRequest */ - public APIdeleteTenantUserRequest commentDeleteMode(@javax.annotation.Nullable String commentDeleteMode) { - this.commentDeleteMode = commentDeleteMode; + public APIdeleteTenantRequest sure(@javax.annotation.Nullable String sure) { + this.sure = sure; return this; } /** - * Build call for deleteTenantUser + * Build call for deleteTenant * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7569,11 +8077,11 @@ public APIdeleteTenantUserRequest commentDeleteMode(@javax.annotation.Nullable S */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteTenantUserCall(tenantId, id, deleteComments, commentDeleteMode, _callback); + return deleteTenantCall(tenantId, id, sure, _callback); } /** - * Execute deleteTenantUser request + * Execute deleteTenant request * @return APIEmptyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7585,12 +8093,12 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public APIEmptyResponse execute() throws ApiException { - ApiResponse localVarResp = deleteTenantUserWithHttpInfo(tenantId, id, deleteComments, commentDeleteMode); + ApiResponse localVarResp = deleteTenantWithHttpInfo(tenantId, id, sure); return localVarResp.getData(); } /** - * Execute deleteTenantUser request with HTTP info returned + * Execute deleteTenant request with HTTP info returned * @return ApiResponse<APIEmptyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7602,11 +8110,11 @@ public APIEmptyResponse execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteTenantUserWithHttpInfo(tenantId, id, deleteComments, commentDeleteMode); + return deleteTenantWithHttpInfo(tenantId, id, sure); } /** - * Execute deleteTenantUser request (asynchronously) + * Execute deleteTenant request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -7619,7 +8127,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException { */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteTenantUserAsync(tenantId, id, deleteComments, commentDeleteMode, _callback); + return deleteTenantAsync(tenantId, id, sure, _callback); } } @@ -7628,7 +8136,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) * * @param tenantId (required) * @param id (required) - * @return APIdeleteTenantUserRequest + * @return APIdeleteTenantRequest * @http.response.details @@ -7637,10 +8145,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callback)
Response Details
0 Error -
*/ - public APIdeleteTenantUserRequest deleteTenantUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteTenantUserRequest(tenantId, id); + public APIdeleteTenantRequest deleteTenant(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteTenantRequest(tenantId, id); } - private okhttp3.Call deleteUserBadgeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTenantPackageCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7657,7 +8165,7 @@ private okhttp3.Call deleteUserBadgeCall(@javax.annotation.Nonnull String tenant Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/user-badges/{id}" + String localVarPath = "/api/v1/tenant-packages/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -7690,49 +8198,49 @@ private okhttp3.Call deleteUserBadgeCall(@javax.annotation.Nonnull String tenant } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserBadgeValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTenantPackageValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteUserBadge(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteTenantPackage(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteUserBadge(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deleteTenantPackage(Async)"); } - return deleteUserBadgeCall(tenantId, id, _callback); + return deleteTenantPackageCall(tenantId, id, _callback); } - private ApiResponse deleteUserBadgeWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = deleteUserBadgeValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deleteTenantPackageWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = deleteTenantPackageValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteUserBadgeAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTenantPackageAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteUserBadgeValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteTenantPackageValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteUserBadgeRequest { + public class APIdeleteTenantPackageRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - private APIdeleteUserBadgeRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeleteTenantPackageRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for deleteUserBadge + * Build call for deleteTenantPackage * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7745,12 +8253,12 @@ private APIdeleteUserBadgeRequest(@javax.annotation.Nonnull String tenantId, @ja */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteUserBadgeCall(tenantId, id, _callback); + return deleteTenantPackageCall(tenantId, id, _callback); } /** - * Execute deleteUserBadge request - * @return APIEmptySuccessResponse + * Execute deleteTenantPackage request + * @return APIEmptyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7760,14 +8268,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public APIEmptySuccessResponse execute() throws ApiException { - ApiResponse localVarResp = deleteUserBadgeWithHttpInfo(tenantId, id); + public APIEmptyResponse execute() throws ApiException { + ApiResponse localVarResp = deleteTenantPackageWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute deleteUserBadge request with HTTP info returned - * @return ApiResponse<APIEmptySuccessResponse> + * Execute deleteTenantPackage request with HTTP info returned + * @return ApiResponse<APIEmptyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7777,12 +8285,12 @@ public APIEmptySuccessResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteUserBadgeWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteTenantPackageWithHttpInfo(tenantId, id); } /** - * Execute deleteUserBadge request (asynchronously) + * Execute deleteTenantPackage request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -7794,8 +8302,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExce 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteUserBadgeAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteTenantPackageAsync(tenantId, id, _callback); } } @@ -7804,7 +8312,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal * * @param tenantId (required) * @param id (required) - * @return APIdeleteUserBadgeRequest + * @return APIdeleteTenantPackageRequest * @http.response.details @@ -7813,10 +8321,10 @@ public okhttp3.Call executeAsync(final ApiCallback _cal
Response Details
0 Error -
*/ - public APIdeleteUserBadgeRequest deleteUserBadge(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteUserBadgeRequest(tenantId, id); + public APIdeleteTenantPackageRequest deleteTenantPackage(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteTenantPackageRequest(tenantId, id); } - private okhttp3.Call deleteVoteCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String editKey, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTenantUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7833,7 +8341,7 @@ private okhttp3.Call deleteVoteCall(@javax.annotation.Nonnull String tenantId, @ Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/votes/{id}" + String localVarPath = "/api/v1/tenant-users/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -7846,8 +8354,12 @@ private okhttp3.Call deleteVoteCall(@javax.annotation.Nonnull String tenantId, @ localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (editKey != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("editKey", editKey)); + if (deleteComments != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteComments", deleteComments)); + } + + if (commentDeleteMode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("commentDeleteMode", commentDeleteMode)); } final String[] localVarAccepts = { @@ -7870,61 +8382,73 @@ private okhttp3.Call deleteVoteCall(@javax.annotation.Nonnull String tenantId, @ } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVoteValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String editKey, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTenantUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling deleteVote(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteTenantUser(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteVote(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deleteTenantUser(Async)"); } - return deleteVoteCall(tenantId, id, editKey, _callback); + return deleteTenantUserCall(tenantId, id, deleteComments, commentDeleteMode, _callback); } - private ApiResponse deleteVoteWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String editKey) throws ApiException { - okhttp3.Call localVarCall = deleteVoteValidateBeforeCall(tenantId, id, editKey, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deleteTenantUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String deleteComments, @javax.annotation.Nullable String commentDeleteMode) throws ApiException { + okhttp3.Call localVarCall = deleteTenantUserValidateBeforeCall(tenantId, id, deleteComments, commentDeleteMode, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteVoteAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String editKey, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTenantUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String deleteComments, @javax.annotation.Nullable String commentDeleteMode, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteVoteValidateBeforeCall(tenantId, id, editKey, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteTenantUserValidateBeforeCall(tenantId, id, deleteComments, commentDeleteMode, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIdeleteVoteRequest { + public class APIdeleteTenantUserRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; @javax.annotation.Nullable - private String editKey; + private String deleteComments; + @javax.annotation.Nullable + private String commentDeleteMode; - private APIdeleteVoteRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeleteTenantUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Set editKey - * @param editKey (optional) - * @return APIdeleteVoteRequest + * Set deleteComments + * @param deleteComments (optional) + * @return APIdeleteTenantUserRequest */ - public APIdeleteVoteRequest editKey(@javax.annotation.Nullable String editKey) { - this.editKey = editKey; + public APIdeleteTenantUserRequest deleteComments(@javax.annotation.Nullable String deleteComments) { + this.deleteComments = deleteComments; return this; } /** - * Build call for deleteVote + * Set commentDeleteMode + * @param commentDeleteMode (optional) + * @return APIdeleteTenantUserRequest + */ + public APIdeleteTenantUserRequest commentDeleteMode(@javax.annotation.Nullable String commentDeleteMode) { + this.commentDeleteMode = commentDeleteMode; + return this; + } + + /** + * Build call for deleteTenantUser * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7937,12 +8461,12 @@ public APIdeleteVoteRequest editKey(@javax.annotation.Nullable String editKey) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteVoteCall(tenantId, id, editKey, _callback); + return deleteTenantUserCall(tenantId, id, deleteComments, commentDeleteMode, _callback); } /** - * Execute deleteVote request - * @return VoteDeleteResponse + * Execute deleteTenantUser request + * @return APIEmptyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7952,14 +8476,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public VoteDeleteResponse execute() throws ApiException { - ApiResponse localVarResp = deleteVoteWithHttpInfo(tenantId, id, editKey); + public APIEmptyResponse execute() throws ApiException { + ApiResponse localVarResp = deleteTenantUserWithHttpInfo(tenantId, id, deleteComments, commentDeleteMode); return localVarResp.getData(); } /** - * Execute deleteVote request with HTTP info returned - * @return ApiResponse<VoteDeleteResponse> + * Execute deleteTenantUser request with HTTP info returned + * @return ApiResponse<APIEmptyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7969,12 +8493,12 @@ public VoteDeleteResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteVoteWithHttpInfo(tenantId, id, editKey); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteTenantUserWithHttpInfo(tenantId, id, deleteComments, commentDeleteMode); } /** - * Execute deleteVote request (asynchronously) + * Execute deleteTenantUser request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -7986,8 +8510,8 @@ public ApiResponse executeWithHttpInfo() throws ApiException 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteVoteAsync(tenantId, id, editKey, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteTenantUserAsync(tenantId, id, deleteComments, commentDeleteMode, _callback); } } @@ -7996,7 +8520,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback * * @param tenantId (required) * @param id (required) - * @return APIdeleteVoteRequest + * @return APIdeleteTenantUserRequest * @http.response.details @@ -8005,10 +8529,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callback
Response Details
0 Error -
*/ - public APIdeleteVoteRequest deleteVote(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIdeleteVoteRequest(tenantId, id); + public APIdeleteTenantUserRequest deleteTenantUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteTenantUserRequest(tenantId, id); } - private okhttp3.Call flagCommentCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserBadgeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -8025,7 +8549,7 @@ private okhttp3.Call flagCommentCall(@javax.annotation.Nonnull String tenantId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/comments/{id}/flag" + String localVarPath = "/api/v1/user-badges/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -8038,14 +8562,6 @@ private okhttp3.Call flagCommentCall(@javax.annotation.Nonnull String tenantId, localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - if (anonUserId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("anonUserId", anonUserId)); - } - final String[] localVarAccepts = { "application/json" }; @@ -8062,77 +8578,53 @@ private okhttp3.Call flagCommentCall(@javax.annotation.Nonnull String tenantId, } String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call flagCommentValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserBadgeValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling flagComment(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteUserBadge(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling flagComment(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deleteUserBadge(Async)"); } - return flagCommentCall(tenantId, id, userId, anonUserId, _callback); + return deleteUserBadgeCall(tenantId, id, _callback); } - private ApiResponse flagCommentWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId) throws ApiException { - okhttp3.Call localVarCall = flagCommentValidateBeforeCall(tenantId, id, userId, anonUserId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deleteUserBadgeWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = deleteUserBadgeValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call flagCommentAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserBadgeAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = flagCommentValidateBeforeCall(tenantId, id, userId, anonUserId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteUserBadgeValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIflagCommentRequest { + public class APIdeleteUserBadgeRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - @javax.annotation.Nullable - private String userId; - @javax.annotation.Nullable - private String anonUserId; - private APIflagCommentRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeleteUserBadgeRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Set userId - * @param userId (optional) - * @return APIflagCommentRequest - */ - public APIflagCommentRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; - return this; - } - - /** - * Set anonUserId - * @param anonUserId (optional) - * @return APIflagCommentRequest - */ - public APIflagCommentRequest anonUserId(@javax.annotation.Nullable String anonUserId) { - this.anonUserId = anonUserId; - return this; - } - - /** - * Build call for flagComment + * Build call for deleteUserBadge * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -8145,12 +8637,12 @@ public APIflagCommentRequest anonUserId(@javax.annotation.Nullable String anonUs */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return flagCommentCall(tenantId, id, userId, anonUserId, _callback); + return deleteUserBadgeCall(tenantId, id, _callback); } /** - * Execute flagComment request - * @return FlagCommentResponse + * Execute deleteUserBadge request + * @return APIEmptySuccessResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8160,14 +8652,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public FlagCommentResponse execute() throws ApiException { - ApiResponse localVarResp = flagCommentWithHttpInfo(tenantId, id, userId, anonUserId); + public APIEmptySuccessResponse execute() throws ApiException { + ApiResponse localVarResp = deleteUserBadgeWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute flagComment request with HTTP info returned - * @return ApiResponse<FlagCommentResponse> + * Execute deleteUserBadge request with HTTP info returned + * @return ApiResponse<APIEmptySuccessResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8177,12 +8669,12 @@ public FlagCommentResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return flagCommentWithHttpInfo(tenantId, id, userId, anonUserId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteUserBadgeWithHttpInfo(tenantId, id); } /** - * Execute flagComment request (asynchronously) + * Execute deleteUserBadge request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -8194,8 +8686,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExceptio 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return flagCommentAsync(tenantId, id, userId, anonUserId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteUserBadgeAsync(tenantId, id, _callback); } } @@ -8204,7 +8696,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac * * @param tenantId (required) * @param id (required) - * @return APIflagCommentRequest + * @return APIdeleteUserBadgeRequest * @http.response.details @@ -8213,10 +8705,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac
Response Details
0 Error -
*/ - public APIflagCommentRequest flagComment(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIflagCommentRequest(tenantId, id); + public APIdeleteUserBadgeRequest deleteUserBadge(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteUserBadgeRequest(tenantId, id); } - private okhttp3.Call getAuditLogsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable SORTDIR order, @javax.annotation.Nullable Double after, @javax.annotation.Nullable Double before, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteVoteCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String editKey, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -8233,7 +8725,8 @@ private okhttp3.Call getAuditLogsCall(@javax.annotation.Nonnull String tenantId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/audit-logs"; + String localVarPath = "/api/v1/votes/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -8245,24 +8738,8 @@ private okhttp3.Call getAuditLogsCall(@javax.annotation.Nonnull String tenantId, localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (skip != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); - } - - if (order != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); - } - - if (after != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after)); - } - - if (before != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before)); + if (editKey != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("editKey", editKey)); } final String[] localVarAccepts = { @@ -8281,105 +8758,65 @@ private okhttp3.Call getAuditLogsCall(@javax.annotation.Nonnull String tenantId, } String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getAuditLogsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable SORTDIR order, @javax.annotation.Nullable Double after, @javax.annotation.Nullable Double before, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteVoteValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String editKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getAuditLogs(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteVote(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteVote(Async)"); } - return getAuditLogsCall(tenantId, limit, skip, order, after, before, _callback); + return deleteVoteCall(tenantId, id, editKey, _callback); } - private ApiResponse getAuditLogsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable SORTDIR order, @javax.annotation.Nullable Double after, @javax.annotation.Nullable Double before) throws ApiException { - okhttp3.Call localVarCall = getAuditLogsValidateBeforeCall(tenantId, limit, skip, order, after, before, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deleteVoteWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String editKey) throws ApiException { + okhttp3.Call localVarCall = deleteVoteValidateBeforeCall(tenantId, id, editKey, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getAuditLogsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable SORTDIR order, @javax.annotation.Nullable Double after, @javax.annotation.Nullable Double before, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteVoteAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String editKey, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAuditLogsValidateBeforeCall(tenantId, limit, skip, order, after, before, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteVoteValidateBeforeCall(tenantId, id, editKey, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetAuditLogsRequest { + public class APIdeleteVoteRequest { @javax.annotation.Nonnull private final String tenantId; + @javax.annotation.Nonnull + private final String id; @javax.annotation.Nullable - private Double limit; - @javax.annotation.Nullable - private Double skip; - @javax.annotation.Nullable - private SORTDIR order; - @javax.annotation.Nullable - private Double after; - @javax.annotation.Nullable - private Double before; + private String editKey; - private APIgetAuditLogsRequest(@javax.annotation.Nonnull String tenantId) { + private APIdeleteVoteRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; + this.id = id; } /** - * Set limit - * @param limit (optional) - * @return APIgetAuditLogsRequest - */ - public APIgetAuditLogsRequest limit(@javax.annotation.Nullable Double limit) { - this.limit = limit; - return this; - } - - /** - * Set skip - * @param skip (optional) - * @return APIgetAuditLogsRequest - */ - public APIgetAuditLogsRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; - return this; - } - - /** - * Set order - * @param order (optional) - * @return APIgetAuditLogsRequest - */ - public APIgetAuditLogsRequest order(@javax.annotation.Nullable SORTDIR order) { - this.order = order; - return this; - } - - /** - * Set after - * @param after (optional) - * @return APIgetAuditLogsRequest - */ - public APIgetAuditLogsRequest after(@javax.annotation.Nullable Double after) { - this.after = after; - return this; - } - - /** - * Set before - * @param before (optional) - * @return APIgetAuditLogsRequest + * Set editKey + * @param editKey (optional) + * @return APIdeleteVoteRequest */ - public APIgetAuditLogsRequest before(@javax.annotation.Nullable Double before) { - this.before = before; + public APIdeleteVoteRequest editKey(@javax.annotation.Nullable String editKey) { + this.editKey = editKey; return this; } /** - * Build call for getAuditLogs + * Build call for deleteVote * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -8392,12 +8829,12 @@ public APIgetAuditLogsRequest before(@javax.annotation.Nullable Double before) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getAuditLogsCall(tenantId, limit, skip, order, after, before, _callback); + return deleteVoteCall(tenantId, id, editKey, _callback); } /** - * Execute getAuditLogs request - * @return GetAuditLogsResponse + * Execute deleteVote request + * @return VoteDeleteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8407,14 +8844,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetAuditLogsResponse execute() throws ApiException { - ApiResponse localVarResp = getAuditLogsWithHttpInfo(tenantId, limit, skip, order, after, before); + public VoteDeleteResponse execute() throws ApiException { + ApiResponse localVarResp = deleteVoteWithHttpInfo(tenantId, id, editKey); return localVarResp.getData(); } /** - * Execute getAuditLogs request with HTTP info returned - * @return ApiResponse<GetAuditLogsResponse> + * Execute deleteVote request with HTTP info returned + * @return ApiResponse<VoteDeleteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8424,12 +8861,12 @@ public GetAuditLogsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getAuditLogsWithHttpInfo(tenantId, limit, skip, order, after, before); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteVoteWithHttpInfo(tenantId, id, editKey); } /** - * Execute getAuditLogs request (asynchronously) + * Execute deleteVote request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -8441,8 +8878,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExcepti 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getAuditLogsAsync(tenantId, limit, skip, order, after, before, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteVoteAsync(tenantId, id, editKey, _callback); } } @@ -8450,7 +8887,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callba * * * @param tenantId (required) - * @return APIgetAuditLogsRequest + * @param id (required) + * @return APIdeleteVoteRequest * @http.response.details @@ -8459,10 +8897,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callba
Response Details
0 Error -
*/ - public APIgetAuditLogsRequest getAuditLogs(@javax.annotation.Nonnull String tenantId) { - return new APIgetAuditLogsRequest(tenantId); + public APIdeleteVoteRequest deleteVote(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteVoteRequest(tenantId, id); } - private okhttp3.Call getCachedNotificationCountCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteWebhookCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -8479,7 +8917,7 @@ private okhttp3.Call getCachedNotificationCountCall(@javax.annotation.Nonnull St Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/notification-count/{id}" + String localVarPath = "/api/v1/webhooks/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -8508,53 +8946,53 @@ private okhttp3.Call getCachedNotificationCountCall(@javax.annotation.Nonnull St } String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCachedNotificationCountValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteWebhookValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getCachedNotificationCount(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling deleteWebhook(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getCachedNotificationCount(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling deleteWebhook(Async)"); } - return getCachedNotificationCountCall(tenantId, id, _callback); + return deleteWebhookCall(tenantId, id, _callback); } - private ApiResponse getCachedNotificationCountWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getCachedNotificationCountValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse deleteWebhookWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = deleteWebhookValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getCachedNotificationCountAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteWebhookAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCachedNotificationCountValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteWebhookValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetCachedNotificationCountRequest { + public class APIdeleteWebhookRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - private APIgetCachedNotificationCountRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIdeleteWebhookRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for getCachedNotificationCount + * Build call for deleteWebhook * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -8567,12 +9005,12 @@ private APIgetCachedNotificationCountRequest(@javax.annotation.Nonnull String te */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getCachedNotificationCountCall(tenantId, id, _callback); + return deleteWebhookCall(tenantId, id, _callback); } /** - * Execute getCachedNotificationCount request - * @return GetCachedNotificationCountResponse + * Execute deleteWebhook request + * @return APIEmptyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8582,14 +9020,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetCachedNotificationCountResponse execute() throws ApiException { - ApiResponse localVarResp = getCachedNotificationCountWithHttpInfo(tenantId, id); + public APIEmptyResponse execute() throws ApiException { + ApiResponse localVarResp = deleteWebhookWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getCachedNotificationCount request with HTTP info returned - * @return ApiResponse<GetCachedNotificationCountResponse> + * Execute deleteWebhook request with HTTP info returned + * @return ApiResponse<APIEmptyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8599,12 +9037,12 @@ public GetCachedNotificationCountResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getCachedNotificationCountWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteWebhookWithHttpInfo(tenantId, id); } /** - * Execute getCachedNotificationCount request (asynchronously) + * Execute deleteWebhook request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -8616,17 +9054,17 @@ public ApiResponse executeWithHttpInfo() thr 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getCachedNotificationCountAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteWebhookAsync(tenantId, id, _callback); } } /** * - * + * Unsubscribes (REST hook unsubscribe). Only subscriptions created through this API can be deleted here; dashboard-managed webhooks are edited in the dashboard. * @param tenantId (required) * @param id (required) - * @return APIgetCachedNotificationCountRequest + * @return APIdeleteWebhookRequest * @http.response.details @@ -8635,10 +9073,10 @@ public okhttp3.Call executeAsync(final ApiCallback
Response Details
0 Error -
*/ - public APIgetCachedNotificationCountRequest getCachedNotificationCount(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetCachedNotificationCountRequest(tenantId, id); + public APIdeleteWebhookRequest deleteWebhook(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIdeleteWebhookRequest(tenantId, id); } - private okhttp3.Call getCommentCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call flagCommentCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -8655,7 +9093,7 @@ private okhttp3.Call getCommentCall(@javax.annotation.Nonnull String tenantId, @ Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/comments/{id}" + String localVarPath = "/api/v1/comments/{id}/flag" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -8668,6 +9106,14 @@ private okhttp3.Call getCommentCall(@javax.annotation.Nonnull String tenantId, @ localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + + if (anonUserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("anonUserId", anonUserId)); + } + final String[] localVarAccepts = { "application/json" }; @@ -8684,53 +9130,77 @@ private okhttp3.Call getCommentCall(@javax.annotation.Nonnull String tenantId, @ } String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCommentValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call flagCommentValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getComment(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling flagComment(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getComment(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling flagComment(Async)"); } - return getCommentCall(tenantId, id, _callback); + return flagCommentCall(tenantId, id, userId, anonUserId, _callback); } - private ApiResponse getCommentWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getCommentValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse flagCommentWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId) throws ApiException { + okhttp3.Call localVarCall = flagCommentValidateBeforeCall(tenantId, id, userId, anonUserId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getCommentAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call flagCommentAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCommentValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = flagCommentValidateBeforeCall(tenantId, id, userId, anonUserId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetCommentRequest { + public class APIflagCommentRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; + @javax.annotation.Nullable + private String userId; + @javax.annotation.Nullable + private String anonUserId; - private APIgetCommentRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIflagCommentRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for getComment + * Set userId + * @param userId (optional) + * @return APIflagCommentRequest + */ + public APIflagCommentRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Set anonUserId + * @param anonUserId (optional) + * @return APIflagCommentRequest + */ + public APIflagCommentRequest anonUserId(@javax.annotation.Nullable String anonUserId) { + this.anonUserId = anonUserId; + return this; + } + + /** + * Build call for flagComment * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -8743,12 +9213,12 @@ private APIgetCommentRequest(@javax.annotation.Nonnull String tenantId, @javax.a */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getCommentCall(tenantId, id, _callback); + return flagCommentCall(tenantId, id, userId, anonUserId, _callback); } /** - * Execute getComment request - * @return APIGetCommentResponse + * Execute flagComment request + * @return FlagCommentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8758,14 +9228,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public APIGetCommentResponse execute() throws ApiException { - ApiResponse localVarResp = getCommentWithHttpInfo(tenantId, id); + public FlagCommentResponse execute() throws ApiException { + ApiResponse localVarResp = flagCommentWithHttpInfo(tenantId, id, userId, anonUserId); return localVarResp.getData(); } /** - * Execute getComment request with HTTP info returned - * @return ApiResponse<APIGetCommentResponse> + * Execute flagComment request with HTTP info returned + * @return ApiResponse<FlagCommentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8775,12 +9245,12 @@ public APIGetCommentResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getCommentWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return flagCommentWithHttpInfo(tenantId, id, userId, anonUserId); } /** - * Execute getComment request (asynchronously) + * Execute flagComment request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -8792,8 +9262,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExcept 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getCommentAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return flagCommentAsync(tenantId, id, userId, anonUserId, _callback); } } @@ -8802,7 +9272,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb * * @param tenantId (required) * @param id (required) - * @return APIgetCommentRequest + * @return APIflagCommentRequest * @http.response.details @@ -8811,10 +9281,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callb
Response Details
0 Error -
*/ - public APIgetCommentRequest getComment(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetCommentRequest(tenantId, id); + public APIflagCommentRequest flagComment(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIflagCommentRequest(tenantId, id); } - private okhttp3.Call getCommentsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable String hashTag, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable Long fromDate, @javax.annotation.Nullable Long toDate, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAuditLogsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable SORTDIR order, @javax.annotation.Nullable Long after, @javax.annotation.Nullable Long before, @javax.annotation.Nullable String username, @javax.annotation.Nullable String ip, @javax.annotation.Nullable String crudType, @javax.annotation.Nullable String resourceName, @javax.annotation.Nullable String targetId, @javax.annotation.Nullable String target, @javax.annotation.Nullable Boolean includeManagedTenants, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -8831,7 +9301,7 @@ private okhttp3.Call getCommentsCall(@javax.annotation.Nonnull String tenantId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/comments"; + String localVarPath = "/api/v1/audit-logs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -8843,10 +9313,6 @@ private okhttp3.Call getCommentsCall(@javax.annotation.Nonnull String tenantId, localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } @@ -8855,64 +9321,52 @@ private okhttp3.Call getCommentsCall(@javax.annotation.Nonnull String tenantId, localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); } - if (asTree != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("asTree", asTree)); + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); } - if (skipChildren != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skipChildren", skipChildren)); + if (after != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after)); } - if (limitChildren != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitChildren", limitChildren)); + if (before != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before)); } - if (maxTreeDepth != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxTreeDepth", maxTreeDepth)); + if (username != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username)); } - if (urlId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + if (ip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ip", ip)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + if (crudType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("crudType", crudType)); } - if (anonUserId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("anonUserId", anonUserId)); + if (resourceName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceName", resourceName)); } - if (contextUserId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("contextUserId", contextUserId)); + if (targetId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("targetId", targetId)); } - if (hashTag != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("hashTag", hashTag)); + if (target != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("target", target)); } - if (parentId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("parentId", parentId)); + if (includeManagedTenants != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeManagedTenants", includeManagedTenants)); } - if (direction != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("direction", direction)); - } - - if (fromDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromDate", fromDate)); - } - - if (toDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("toDate", toDate)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { @@ -8927,233 +9381,185 @@ private okhttp3.Call getCommentsCall(@javax.annotation.Nonnull String tenantId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getCommentsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable String hashTag, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable Long fromDate, @javax.annotation.Nullable Long toDate, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAuditLogsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable SORTDIR order, @javax.annotation.Nullable Long after, @javax.annotation.Nullable Long before, @javax.annotation.Nullable String username, @javax.annotation.Nullable String ip, @javax.annotation.Nullable String crudType, @javax.annotation.Nullable String resourceName, @javax.annotation.Nullable String targetId, @javax.annotation.Nullable String target, @javax.annotation.Nullable Boolean includeManagedTenants, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getComments(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getAuditLogs(Async)"); } - return getCommentsCall(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, _callback); + return getAuditLogsCall(tenantId, limit, skip, order, after, before, username, ip, crudType, resourceName, targetId, target, includeManagedTenants, _callback); } - private ApiResponse getCommentsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable String hashTag, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable Long fromDate, @javax.annotation.Nullable Long toDate) throws ApiException { - okhttp3.Call localVarCall = getCommentsValidateBeforeCall(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getAuditLogsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable SORTDIR order, @javax.annotation.Nullable Long after, @javax.annotation.Nullable Long before, @javax.annotation.Nullable String username, @javax.annotation.Nullable String ip, @javax.annotation.Nullable String crudType, @javax.annotation.Nullable String resourceName, @javax.annotation.Nullable String targetId, @javax.annotation.Nullable String target, @javax.annotation.Nullable Boolean includeManagedTenants) throws ApiException { + okhttp3.Call localVarCall = getAuditLogsValidateBeforeCall(tenantId, limit, skip, order, after, before, username, ip, crudType, resourceName, targetId, target, includeManagedTenants, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getCommentsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable String hashTag, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable Long fromDate, @javax.annotation.Nullable Long toDate, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAuditLogsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable SORTDIR order, @javax.annotation.Nullable Long after, @javax.annotation.Nullable Long before, @javax.annotation.Nullable String username, @javax.annotation.Nullable String ip, @javax.annotation.Nullable String crudType, @javax.annotation.Nullable String resourceName, @javax.annotation.Nullable String targetId, @javax.annotation.Nullable String target, @javax.annotation.Nullable Boolean includeManagedTenants, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCommentsValidateBeforeCall(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getAuditLogsValidateBeforeCall(tenantId, limit, skip, order, after, before, username, ip, crudType, resourceName, targetId, target, includeManagedTenants, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetCommentsRequest { + public class APIgetAuditLogsRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nullable - private Integer page; - @javax.annotation.Nullable private Integer limit; @javax.annotation.Nullable private Integer skip; @javax.annotation.Nullable - private Boolean asTree; - @javax.annotation.Nullable - private Integer skipChildren; - @javax.annotation.Nullable - private Integer limitChildren; - @javax.annotation.Nullable - private Integer maxTreeDepth; + private SORTDIR order; @javax.annotation.Nullable - private String urlId; + private Long after; @javax.annotation.Nullable - private String userId; + private Long before; @javax.annotation.Nullable - private String anonUserId; + private String username; @javax.annotation.Nullable - private String contextUserId; + private String ip; @javax.annotation.Nullable - private String hashTag; + private String crudType; @javax.annotation.Nullable - private String parentId; + private String resourceName; @javax.annotation.Nullable - private SortDirections direction; + private String targetId; @javax.annotation.Nullable - private Long fromDate; + private String target; @javax.annotation.Nullable - private Long toDate; + private Boolean includeManagedTenants; - private APIgetCommentsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetAuditLogsRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } - /** - * Set page - * @param page (optional) - * @return APIgetCommentsRequest - */ - public APIgetCommentsRequest page(@javax.annotation.Nullable Integer page) { - this.page = page; - return this; - } - /** * Set limit - * @param limit (optional) - * @return APIgetCommentsRequest + * @param limit How many logs to return. Max 10000, defaults to 1000. (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest limit(@javax.annotation.Nullable Integer limit) { + public APIgetAuditLogsRequest limit(@javax.annotation.Nullable Integer limit) { this.limit = limit; return this; } /** * Set skip - * @param skip (optional) - * @return APIgetCommentsRequest + * @param skip How many logs to skip, for paging. (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest skip(@javax.annotation.Nullable Integer skip) { + public APIgetAuditLogsRequest skip(@javax.annotation.Nullable Integer skip) { this.skip = skip; return this; } /** - * Set asTree - * @param asTree (optional) - * @return APIgetCommentsRequest - */ - public APIgetCommentsRequest asTree(@javax.annotation.Nullable Boolean asTree) { - this.asTree = asTree; - return this; - } - - /** - * Set skipChildren - * @param skipChildren (optional) - * @return APIgetCommentsRequest - */ - public APIgetCommentsRequest skipChildren(@javax.annotation.Nullable Integer skipChildren) { - this.skipChildren = skipChildren; - return this; - } - - /** - * Set limitChildren - * @param limitChildren (optional) - * @return APIgetCommentsRequest - */ - public APIgetCommentsRequest limitChildren(@javax.annotation.Nullable Integer limitChildren) { - this.limitChildren = limitChildren; - return this; - } - - /** - * Set maxTreeDepth - * @param maxTreeDepth (optional) - * @return APIgetCommentsRequest + * Set order + * @param order Sort direction on the event time. Defaults to DESC (newest first). (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest maxTreeDepth(@javax.annotation.Nullable Integer maxTreeDepth) { - this.maxTreeDepth = maxTreeDepth; + public APIgetAuditLogsRequest order(@javax.annotation.Nullable SORTDIR order) { + this.order = order; return this; } /** - * Set urlId - * @param urlId (optional) - * @return APIgetCommentsRequest + * Set after + * @param after (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest urlId(@javax.annotation.Nullable String urlId) { - this.urlId = urlId; + public APIgetAuditLogsRequest after(@javax.annotation.Nullable Long after) { + this.after = after; return this; } /** - * Set userId - * @param userId (optional) - * @return APIgetCommentsRequest + * Set before + * @param before (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; + public APIgetAuditLogsRequest before(@javax.annotation.Nullable Long before) { + this.before = before; return this; } /** - * Set anonUserId - * @param anonUserId (optional) - * @return APIgetCommentsRequest + * Set username + * @param username Only return events performed by this username. (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest anonUserId(@javax.annotation.Nullable String anonUserId) { - this.anonUserId = anonUserId; + public APIgetAuditLogsRequest username(@javax.annotation.Nullable String username) { + this.username = username; return this; } /** - * Set contextUserId - * @param contextUserId (optional) - * @return APIgetCommentsRequest + * Set ip + * @param ip Only return events from this IP address. (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest contextUserId(@javax.annotation.Nullable String contextUserId) { - this.contextUserId = contextUserId; + public APIgetAuditLogsRequest ip(@javax.annotation.Nullable String ip) { + this.ip = ip; return this; } /** - * Set hashTag - * @param hashTag (optional) - * @return APIgetCommentsRequest + * Set crudType + * @param crudType Only return events of this type: c, r, u, d, or login. (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest hashTag(@javax.annotation.Nullable String hashTag) { - this.hashTag = hashTag; + public APIgetAuditLogsRequest crudType(@javax.annotation.Nullable String crudType) { + this.crudType = crudType; return this; } /** - * Set parentId - * @param parentId (optional) - * @return APIgetCommentsRequest + * Set resourceName + * @param resourceName Only return events for this resource, e.g. User or Moderator. (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest parentId(@javax.annotation.Nullable String parentId) { - this.parentId = parentId; + public APIgetAuditLogsRequest resourceName(@javax.annotation.Nullable String resourceName) { + this.resourceName = resourceName; return this; } /** - * Set direction - * @param direction (optional) - * @return APIgetCommentsRequest + * Set targetId + * @param targetId Only return events whose affected object has this id. (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest direction(@javax.annotation.Nullable SortDirections direction) { - this.direction = direction; + public APIgetAuditLogsRequest targetId(@javax.annotation.Nullable String targetId) { + this.targetId = targetId; return this; } /** - * Set fromDate - * @param fromDate (optional) - * @return APIgetCommentsRequest + * Set target + * @param target Case-insensitive substring match on the affected object's label, e.g. a username or email. (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest fromDate(@javax.annotation.Nullable Long fromDate) { - this.fromDate = fromDate; + public APIgetAuditLogsRequest target(@javax.annotation.Nullable String target) { + this.target = target; return this; } /** - * Set toDate - * @param toDate (optional) - * @return APIgetCommentsRequest + * Set includeManagedTenants + * @param includeManagedTenants Also return events from tenants this tenant manages. (optional) + * @return APIgetAuditLogsRequest */ - public APIgetCommentsRequest toDate(@javax.annotation.Nullable Long toDate) { - this.toDate = toDate; + public APIgetAuditLogsRequest includeManagedTenants(@javax.annotation.Nullable Boolean includeManagedTenants) { + this.includeManagedTenants = includeManagedTenants; return this; } /** - * Build call for getComments + * Build call for getAuditLogs * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -9166,12 +9572,12 @@ public APIgetCommentsRequest toDate(@javax.annotation.Nullable Long toDate) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getCommentsCall(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, _callback); + return getAuditLogsCall(tenantId, limit, skip, order, after, before, username, ip, crudType, resourceName, targetId, target, includeManagedTenants, _callback); } /** - * Execute getComments request - * @return APIGetCommentsResponse + * Execute getAuditLogs request + * @return GetAuditLogsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9181,14 +9587,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public APIGetCommentsResponse execute() throws ApiException { - ApiResponse localVarResp = getCommentsWithHttpInfo(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate); + public GetAuditLogsResponse execute() throws ApiException { + ApiResponse localVarResp = getAuditLogsWithHttpInfo(tenantId, limit, skip, order, after, before, username, ip, crudType, resourceName, targetId, target, includeManagedTenants); return localVarResp.getData(); } /** - * Execute getComments request with HTTP info returned - * @return ApiResponse<APIGetCommentsResponse> + * Execute getAuditLogs request with HTTP info returned + * @return ApiResponse<GetAuditLogsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9198,12 +9604,12 @@ public APIGetCommentsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getCommentsWithHttpInfo(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getAuditLogsWithHttpInfo(tenantId, limit, skip, order, after, before, username, ip, crudType, resourceName, targetId, target, includeManagedTenants); } /** - * Execute getComments request (asynchronously) + * Execute getAuditLogs request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -9215,16 +9621,16 @@ public ApiResponse executeWithHttpInfo() throws ApiExcep 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getCommentsAsync(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getAuditLogsAsync(tenantId, limit, skip, order, after, before, username, ip, crudType, resourceName, targetId, target, includeManagedTenants, _callback); } } /** * * - * @param tenantId (required) - * @return APIgetCommentsRequest + * @param tenantId The tenant to read audit logs for. (required) + * @return APIgetAuditLogsRequest * @http.response.details @@ -9233,10 +9639,10 @@ public okhttp3.Call executeAsync(final ApiCallback _call
Response Details
0 Error -
*/ - public APIgetCommentsRequest getComments(@javax.annotation.Nonnull String tenantId) { - return new APIgetCommentsRequest(tenantId); + public APIgetAuditLogsRequest getAuditLogs(@javax.annotation.Nonnull String tenantId) { + return new APIgetAuditLogsRequest(tenantId); } - private okhttp3.Call getDomainConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBatchJobCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -9253,8 +9659,8 @@ private okhttp3.Call getDomainConfigCall(@javax.annotation.Nonnull String tenant Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/domain-configs/{domain}" - .replace("{" + "domain" + "}", localVarApiClient.escapeString(domain.toString())); + String localVarPath = "/api/v1/batch-jobs/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -9286,49 +9692,49 @@ private okhttp3.Call getDomainConfigCall(@javax.annotation.Nonnull String tenant } @SuppressWarnings("rawtypes") - private okhttp3.Call getDomainConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBatchJobValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getDomainConfig(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getBatchJob(Async)"); } - // verify the required parameter 'domain' is set - if (domain == null) { - throw new ApiException("Missing the required parameter 'domain' when calling getDomainConfig(Async)"); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getBatchJob(Async)"); } - return getDomainConfigCall(tenantId, domain, _callback); + return getBatchJobCall(tenantId, id, _callback); } - private ApiResponse getDomainConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain) throws ApiException { - okhttp3.Call localVarCall = getDomainConfigValidateBeforeCall(tenantId, domain, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getBatchJobWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getBatchJobValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getDomainConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBatchJobAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getDomainConfigValidateBeforeCall(tenantId, domain, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getBatchJobValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetDomainConfigRequest { + public class APIgetBatchJobRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String domain; + private final String id; - private APIgetDomainConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain) { + private APIgetBatchJobRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; - this.domain = domain; + this.id = id; } /** - * Build call for getDomainConfig + * Build call for getBatchJob * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -9340,12 +9746,12 @@ private APIgetDomainConfigRequest(@javax.annotation.Nonnull String tenantId, @ja */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getDomainConfigCall(tenantId, domain, _callback); + return getBatchJobCall(tenantId, id, _callback); } /** - * Execute getDomainConfig request - * @return GetDomainConfigResponse + * Execute getBatchJob request + * @return GetBatchJobAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9354,14 +9760,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
200 Ok -
*/ - public GetDomainConfigResponse execute() throws ApiException { - ApiResponse localVarResp = getDomainConfigWithHttpInfo(tenantId, domain); + public GetBatchJobAPIResponse execute() throws ApiException { + ApiResponse localVarResp = getBatchJobWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getDomainConfig request with HTTP info returned - * @return ApiResponse<GetDomainConfigResponse> + * Execute getBatchJob request with HTTP info returned + * @return ApiResponse<GetBatchJobAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9370,12 +9776,12 @@ public GetDomainConfigResponse execute() throws ApiException {
200 Ok -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getDomainConfigWithHttpInfo(tenantId, domain); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getBatchJobWithHttpInfo(tenantId, id); } /** - * Execute getDomainConfig request (asynchronously) + * Execute getBatchJob request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -9386,17 +9792,17 @@ public ApiResponse executeWithHttpInfo() throws ApiExce 200 Ok - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getDomainConfigAsync(tenantId, domain, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getBatchJobAsync(tenantId, id, _callback); } } /** * - * + * Status, progress and, once done, the result of one batch job. * @param tenantId (required) - * @param domain (required) - * @return APIgetDomainConfigRequest + * @param id (required) + * @return APIgetBatchJobRequest * @http.response.details @@ -9404,10 +9810,10 @@ public okhttp3.Call executeAsync(final ApiCallback _cal
Response Details
200 Ok -
*/ - public APIgetDomainConfigRequest getDomainConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain) { - return new APIgetDomainConfigRequest(tenantId, domain); + public APIgetBatchJobRequest getBatchJob(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetBatchJobRequest(tenantId, id); } - private okhttp3.Call getDomainConfigsCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBatchJobsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String type, @javax.annotation.Nullable String status, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -9424,7 +9830,7 @@ private okhttp3.Call getDomainConfigsCall(@javax.annotation.Nonnull String tenan Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/domain-configs"; + String localVarPath = "/api/v1/batch-jobs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -9436,6 +9842,18 @@ private okhttp3.Call getDomainConfigsCall(@javax.annotation.Nonnull String tenan localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (status != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + final String[] localVarAccepts = { "application/json" }; @@ -9456,41 +9874,77 @@ private okhttp3.Call getDomainConfigsCall(@javax.annotation.Nonnull String tenan } @SuppressWarnings("rawtypes") - private okhttp3.Call getDomainConfigsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBatchJobsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String type, @javax.annotation.Nullable String status, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getDomainConfigs(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getBatchJobs(Async)"); } - return getDomainConfigsCall(tenantId, _callback); + return getBatchJobsCall(tenantId, type, status, skip, _callback); } - private ApiResponse getDomainConfigsWithHttpInfo(@javax.annotation.Nonnull String tenantId) throws ApiException { - okhttp3.Call localVarCall = getDomainConfigsValidateBeforeCall(tenantId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getBatchJobsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String type, @javax.annotation.Nullable String status, @javax.annotation.Nullable Integer skip) throws ApiException { + okhttp3.Call localVarCall = getBatchJobsValidateBeforeCall(tenantId, type, status, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getDomainConfigsAsync(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBatchJobsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String type, @javax.annotation.Nullable String status, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getDomainConfigsValidateBeforeCall(tenantId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getBatchJobsValidateBeforeCall(tenantId, type, status, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetDomainConfigsRequest { + public class APIgetBatchJobsRequest { @javax.annotation.Nonnull private final String tenantId; + @javax.annotation.Nullable + private String type; + @javax.annotation.Nullable + private String status; + @javax.annotation.Nullable + private Integer skip; - private APIgetDomainConfigsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetBatchJobsRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } /** - * Build call for getDomainConfigs + * Set type + * @param type Only jobs of this type, for example migrate-pages. (optional) + * @return APIgetBatchJobsRequest + */ + public APIgetBatchJobsRequest type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Set status + * @param status Only jobs in this status: requested, running, success or failed. (optional) + * @return APIgetBatchJobsRequest + */ + public APIgetBatchJobsRequest status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Set skip + * @param skip How many jobs to skip, for paging. (optional) + * @return APIgetBatchJobsRequest + */ + public APIgetBatchJobsRequest skip(@javax.annotation.Nullable Integer skip) { + this.skip = skip; + return this; + } + + /** + * Build call for getBatchJobs * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -9502,12 +9956,12 @@ private APIgetDomainConfigsRequest(@javax.annotation.Nonnull String tenantId) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getDomainConfigsCall(tenantId, _callback); + return getBatchJobsCall(tenantId, type, status, skip, _callback); } /** - * Execute getDomainConfigs request - * @return GetDomainConfigsResponse + * Execute getBatchJobs request + * @return GetBatchJobsAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9516,14 +9970,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
200 Ok -
*/ - public GetDomainConfigsResponse execute() throws ApiException { - ApiResponse localVarResp = getDomainConfigsWithHttpInfo(tenantId); + public GetBatchJobsAPIResponse execute() throws ApiException { + ApiResponse localVarResp = getBatchJobsWithHttpInfo(tenantId, type, status, skip); return localVarResp.getData(); } /** - * Execute getDomainConfigs request with HTTP info returned - * @return ApiResponse<GetDomainConfigsResponse> + * Execute getBatchJobs request with HTTP info returned + * @return ApiResponse<GetBatchJobsAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9532,12 +9986,12 @@ public GetDomainConfigsResponse execute() throws ApiException {
200 Ok -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getDomainConfigsWithHttpInfo(tenantId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getBatchJobsWithHttpInfo(tenantId, type, status, skip); } /** - * Execute getDomainConfigs request (asynchronously) + * Execute getBatchJobs request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -9548,16 +10002,16 @@ public ApiResponse executeWithHttpInfo() throws ApiExc 200 Ok - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getDomainConfigsAsync(tenantId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getBatchJobsAsync(tenantId, type, status, skip, _callback); } } /** * - * + * The tenant's batch jobs (imports, exports, page migrations...), newest first. * @param tenantId (required) - * @return APIgetDomainConfigsRequest + * @return APIgetBatchJobsRequest * @http.response.details @@ -9565,10 +10019,10 @@ public okhttp3.Call executeAsync(final ApiCallback _ca
Response Details
200 Ok -
*/ - public APIgetDomainConfigsRequest getDomainConfigs(@javax.annotation.Nonnull String tenantId) { - return new APIgetDomainConfigsRequest(tenantId); + public APIgetBatchJobsRequest getBatchJobs(@javax.annotation.Nonnull String tenantId) { + return new APIgetBatchJobsRequest(tenantId); } - private okhttp3.Call getEmailTemplateCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCachedNotificationCountCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -9585,7 +10039,7 @@ private okhttp3.Call getEmailTemplateCall(@javax.annotation.Nonnull String tenan Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/email-templates/{id}" + String localVarPath = "/api/v1/notification-count/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -9618,49 +10072,49 @@ private okhttp3.Call getEmailTemplateCall(@javax.annotation.Nonnull String tenan } @SuppressWarnings("rawtypes") - private okhttp3.Call getEmailTemplateValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCachedNotificationCountValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getEmailTemplate(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getCachedNotificationCount(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getEmailTemplate(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling getCachedNotificationCount(Async)"); } - return getEmailTemplateCall(tenantId, id, _callback); + return getCachedNotificationCountCall(tenantId, id, _callback); } - private ApiResponse getEmailTemplateWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getEmailTemplateValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getCachedNotificationCountWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getCachedNotificationCountValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getEmailTemplateAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCachedNotificationCountAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getEmailTemplateValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getCachedNotificationCountValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetEmailTemplateRequest { + public class APIgetCachedNotificationCountRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - private APIgetEmailTemplateRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetCachedNotificationCountRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for getEmailTemplate + * Build call for getCachedNotificationCount * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -9673,12 +10127,12 @@ private APIgetEmailTemplateRequest(@javax.annotation.Nonnull String tenantId, @j */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getEmailTemplateCall(tenantId, id, _callback); + return getCachedNotificationCountCall(tenantId, id, _callback); } /** - * Execute getEmailTemplate request - * @return GetEmailTemplateResponse + * Execute getCachedNotificationCount request + * @return GetCachedNotificationCountResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9688,14 +10142,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetEmailTemplateResponse execute() throws ApiException { - ApiResponse localVarResp = getEmailTemplateWithHttpInfo(tenantId, id); + public GetCachedNotificationCountResponse execute() throws ApiException { + ApiResponse localVarResp = getCachedNotificationCountWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getEmailTemplate request with HTTP info returned - * @return ApiResponse<GetEmailTemplateResponse> + * Execute getCachedNotificationCount request with HTTP info returned + * @return ApiResponse<GetCachedNotificationCountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9705,12 +10159,12 @@ public GetEmailTemplateResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getEmailTemplateWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getCachedNotificationCountWithHttpInfo(tenantId, id); } /** - * Execute getEmailTemplate request (asynchronously) + * Execute getCachedNotificationCount request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -9722,8 +10176,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExc 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getEmailTemplateAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getCachedNotificationCountAsync(tenantId, id, _callback); } } @@ -9732,7 +10186,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ca * * @param tenantId (required) * @param id (required) - * @return APIgetEmailTemplateRequest + * @return APIgetCachedNotificationCountRequest * @http.response.details @@ -9741,10 +10195,10 @@ public okhttp3.Call executeAsync(final ApiCallback _ca
Response Details
0 Error -
*/ - public APIgetEmailTemplateRequest getEmailTemplate(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetEmailTemplateRequest(tenantId, id); + public APIgetCachedNotificationCountRequest getCachedNotificationCount(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetCachedNotificationCountRequest(tenantId, id); } - private okhttp3.Call getEmailTemplateDefinitionsCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommentCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -9761,7 +10215,8 @@ private okhttp3.Call getEmailTemplateDefinitionsCall(@javax.annotation.Nonnull S Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/email-templates/definitions"; + String localVarPath = "/api/v1/comments/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -9793,41 +10248,49 @@ private okhttp3.Call getEmailTemplateDefinitionsCall(@javax.annotation.Nonnull S } @SuppressWarnings("rawtypes") - private okhttp3.Call getEmailTemplateDefinitionsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommentValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getEmailTemplateDefinitions(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getComment(Async)"); } - return getEmailTemplateDefinitionsCall(tenantId, _callback); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getComment(Async)"); + } + + return getCommentCall(tenantId, id, _callback); } - private ApiResponse getEmailTemplateDefinitionsWithHttpInfo(@javax.annotation.Nonnull String tenantId) throws ApiException { - okhttp3.Call localVarCall = getEmailTemplateDefinitionsValidateBeforeCall(tenantId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getCommentWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getCommentValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getEmailTemplateDefinitionsAsync(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommentAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getEmailTemplateDefinitionsValidateBeforeCall(tenantId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getCommentValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetEmailTemplateDefinitionsRequest { + public class APIgetCommentRequest { @javax.annotation.Nonnull private final String tenantId; + @javax.annotation.Nonnull + private final String id; - private APIgetEmailTemplateDefinitionsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetCommentRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; + this.id = id; } /** - * Build call for getEmailTemplateDefinitions + * Build call for getComment * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -9840,12 +10303,12 @@ private APIgetEmailTemplateDefinitionsRequest(@javax.annotation.Nonnull String t */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getEmailTemplateDefinitionsCall(tenantId, _callback); + return getCommentCall(tenantId, id, _callback); } /** - * Execute getEmailTemplateDefinitions request - * @return GetEmailTemplateDefinitionsResponse + * Execute getComment request + * @return APIGetCommentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9855,14 +10318,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetEmailTemplateDefinitionsResponse execute() throws ApiException { - ApiResponse localVarResp = getEmailTemplateDefinitionsWithHttpInfo(tenantId); + public APIGetCommentResponse execute() throws ApiException { + ApiResponse localVarResp = getCommentWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getEmailTemplateDefinitions request with HTTP info returned - * @return ApiResponse<GetEmailTemplateDefinitionsResponse> + * Execute getComment request with HTTP info returned + * @return ApiResponse<APIGetCommentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -9872,12 +10335,12 @@ public GetEmailTemplateDefinitionsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getEmailTemplateDefinitionsWithHttpInfo(tenantId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getCommentWithHttpInfo(tenantId, id); } /** - * Execute getEmailTemplateDefinitions request (asynchronously) + * Execute getComment request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -9889,8 +10352,8 @@ public ApiResponse executeWithHttpInfo() th 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getEmailTemplateDefinitionsAsync(tenantId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getCommentAsync(tenantId, id, _callback); } } @@ -9898,7 +10361,8 @@ public okhttp3.Call executeAsync(final ApiCallback Response Details @@ -9907,10 +10371,10 @@ public okhttp3.Call executeAsync(final ApiCallback 0 Error - */ - public APIgetEmailTemplateDefinitionsRequest getEmailTemplateDefinitions(@javax.annotation.Nonnull String tenantId) { - return new APIgetEmailTemplateDefinitionsRequest(tenantId); + public APIgetCommentRequest getComment(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetCommentRequest(tenantId, id); } - private okhttp3.Call getEmailTemplateRenderErrorsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommentsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable String hashTag, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable Long fromDate, @javax.annotation.Nullable Long toDate, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -9927,8 +10391,7 @@ private okhttp3.Call getEmailTemplateRenderErrorsCall(@javax.annotation.Nonnull Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/email-templates/{id}/render-errors" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/comments"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -9940,10 +10403,70 @@ private okhttp3.Call getEmailTemplateRenderErrorsCall(@javax.annotation.Nonnull localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + if (skip != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); } + if (asTree != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("asTree", asTree)); + } + + if (skipChildren != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skipChildren", skipChildren)); + } + + if (limitChildren != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitChildren", limitChildren)); + } + + if (maxTreeDepth != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxTreeDepth", maxTreeDepth)); + } + + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + } + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + + if (anonUserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("anonUserId", anonUserId)); + } + + if (contextUserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("contextUserId", contextUserId)); + } + + if (hashTag != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hashTag", hashTag)); + } + + if (parentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("parentId", parentId)); + } + + if (direction != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("direction", direction)); + } + + if (fromDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromDate", fromDate)); + } + + if (toDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("toDate", toDate)); + } + final String[] localVarAccepts = { "application/json" }; @@ -9964,61 +10487,3267 @@ private okhttp3.Call getEmailTemplateRenderErrorsCall(@javax.annotation.Nonnull } @SuppressWarnings("rawtypes") - private okhttp3.Call getEmailTemplateRenderErrorsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommentsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable String hashTag, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable Long fromDate, @javax.annotation.Nullable Long toDate, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getEmailTemplateRenderErrors(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getEmailTemplateRenderErrors(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getComments(Async)"); } - return getEmailTemplateRenderErrorsCall(tenantId, id, skip, _callback); + return getCommentsCall(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, _callback); } - private ApiResponse getEmailTemplateRenderErrorsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getEmailTemplateRenderErrorsValidateBeforeCall(tenantId, id, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getCommentsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable String hashTag, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable Long fromDate, @javax.annotation.Nullable Long toDate) throws ApiException { + okhttp3.Call localVarCall = getCommentsValidateBeforeCall(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getEmailTemplateRenderErrorsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommentsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable String hashTag, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable Long fromDate, @javax.annotation.Nullable Long toDate, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCommentsValidateBeforeCall(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetCommentsRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nullable + private Integer page; + @javax.annotation.Nullable + private Integer limit; + @javax.annotation.Nullable + private Integer skip; + @javax.annotation.Nullable + private Boolean asTree; + @javax.annotation.Nullable + private Integer skipChildren; + @javax.annotation.Nullable + private Integer limitChildren; + @javax.annotation.Nullable + private Integer maxTreeDepth; + @javax.annotation.Nullable + private String urlId; + @javax.annotation.Nullable + private String userId; + @javax.annotation.Nullable + private String anonUserId; + @javax.annotation.Nullable + private String contextUserId; + @javax.annotation.Nullable + private String hashTag; + @javax.annotation.Nullable + private String parentId; + @javax.annotation.Nullable + private SortDirections direction; + @javax.annotation.Nullable + private Long fromDate; + @javax.annotation.Nullable + private Long toDate; + + private APIgetCommentsRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Set page + * @param page (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest page(@javax.annotation.Nullable Integer page) { + this.page = page; + return this; + } + + /** + * Set limit + * @param limit (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest limit(@javax.annotation.Nullable Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set skip + * @param skip (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest skip(@javax.annotation.Nullable Integer skip) { + this.skip = skip; + return this; + } + + /** + * Set asTree + * @param asTree (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest asTree(@javax.annotation.Nullable Boolean asTree) { + this.asTree = asTree; + return this; + } + + /** + * Set skipChildren + * @param skipChildren (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest skipChildren(@javax.annotation.Nullable Integer skipChildren) { + this.skipChildren = skipChildren; + return this; + } + + /** + * Set limitChildren + * @param limitChildren (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest limitChildren(@javax.annotation.Nullable Integer limitChildren) { + this.limitChildren = limitChildren; + return this; + } + + /** + * Set maxTreeDepth + * @param maxTreeDepth (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest maxTreeDepth(@javax.annotation.Nullable Integer maxTreeDepth) { + this.maxTreeDepth = maxTreeDepth; + return this; + } + + /** + * Set urlId + * @param urlId (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest urlId(@javax.annotation.Nullable String urlId) { + this.urlId = urlId; + return this; + } + + /** + * Set userId + * @param userId (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Set anonUserId + * @param anonUserId (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest anonUserId(@javax.annotation.Nullable String anonUserId) { + this.anonUserId = anonUserId; + return this; + } + + /** + * Set contextUserId + * @param contextUserId (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest contextUserId(@javax.annotation.Nullable String contextUserId) { + this.contextUserId = contextUserId; + return this; + } + + /** + * Set hashTag + * @param hashTag (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest hashTag(@javax.annotation.Nullable String hashTag) { + this.hashTag = hashTag; + return this; + } + + /** + * Set parentId + * @param parentId (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest parentId(@javax.annotation.Nullable String parentId) { + this.parentId = parentId; + return this; + } + + /** + * Set direction + * @param direction (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest direction(@javax.annotation.Nullable SortDirections direction) { + this.direction = direction; + return this; + } + + /** + * Set fromDate + * @param fromDate (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest fromDate(@javax.annotation.Nullable Long fromDate) { + this.fromDate = fromDate; + return this; + } + + /** + * Set toDate + * @param toDate (optional) + * @return APIgetCommentsRequest + */ + public APIgetCommentsRequest toDate(@javax.annotation.Nullable Long toDate) { + this.toDate = toDate; + return this; + } + + /** + * Build call for getComments + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getCommentsCall(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, _callback); + } + + /** + * Execute getComments request + * @return APIGetCommentsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIGetCommentsResponse execute() throws ApiException { + ApiResponse localVarResp = getCommentsWithHttpInfo(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate); + return localVarResp.getData(); + } + + /** + * Execute getComments request with HTTP info returned + * @return ApiResponse<APIGetCommentsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getCommentsWithHttpInfo(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate); + } + + /** + * Execute getComments request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getCommentsAsync(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction, fromDate, toDate, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @return APIgetCommentsRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetCommentsRequest getComments(@javax.annotation.Nonnull String tenantId) { + return new APIgetCommentsRequest(tenantId); + } + private okhttp3.Call getDomainConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/domain-configs/{domain}" + .replace("{" + "domain" + "}", localVarApiClient.escapeString(domain.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getDomainConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getDomainConfig(Async)"); + } + + // verify the required parameter 'domain' is set + if (domain == null) { + throw new ApiException("Missing the required parameter 'domain' when calling getDomainConfig(Async)"); + } + + return getDomainConfigCall(tenantId, domain, _callback); + + } + + + private ApiResponse getDomainConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain) throws ApiException { + okhttp3.Call localVarCall = getDomainConfigValidateBeforeCall(tenantId, domain, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getDomainConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getDomainConfigValidateBeforeCall(tenantId, domain, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetDomainConfigRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String domain; + + private APIgetDomainConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain) { + this.tenantId = tenantId; + this.domain = domain; + } + + /** + * Build call for getDomainConfig + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getDomainConfigCall(tenantId, domain, _callback); + } + + /** + * Execute getDomainConfig request + * @return GetDomainConfigResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public GetDomainConfigResponse execute() throws ApiException { + ApiResponse localVarResp = getDomainConfigWithHttpInfo(tenantId, domain); + return localVarResp.getData(); + } + + /** + * Execute getDomainConfig request with HTTP info returned + * @return ApiResponse<GetDomainConfigResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getDomainConfigWithHttpInfo(tenantId, domain); + } + + /** + * Execute getDomainConfig request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getDomainConfigAsync(tenantId, domain, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @param domain (required) + * @return APIgetDomainConfigRequest + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public APIgetDomainConfigRequest getDomainConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domain) { + return new APIgetDomainConfigRequest(tenantId, domain); + } + private okhttp3.Call getDomainConfigsCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/domain-configs"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getDomainConfigsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getDomainConfigs(Async)"); + } + + return getDomainConfigsCall(tenantId, _callback); + + } + + + private ApiResponse getDomainConfigsWithHttpInfo(@javax.annotation.Nonnull String tenantId) throws ApiException { + okhttp3.Call localVarCall = getDomainConfigsValidateBeforeCall(tenantId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getDomainConfigsAsync(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getDomainConfigsValidateBeforeCall(tenantId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetDomainConfigsRequest { + @javax.annotation.Nonnull + private final String tenantId; + + private APIgetDomainConfigsRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Build call for getDomainConfigs + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getDomainConfigsCall(tenantId, _callback); + } + + /** + * Execute getDomainConfigs request + * @return GetDomainConfigsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public GetDomainConfigsResponse execute() throws ApiException { + ApiResponse localVarResp = getDomainConfigsWithHttpInfo(tenantId); + return localVarResp.getData(); + } + + /** + * Execute getDomainConfigs request with HTTP info returned + * @return ApiResponse<GetDomainConfigsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getDomainConfigsWithHttpInfo(tenantId); + } + + /** + * Execute getDomainConfigs request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getDomainConfigsAsync(tenantId, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @return APIgetDomainConfigsRequest + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public APIgetDomainConfigsRequest getDomainConfigs(@javax.annotation.Nonnull String tenantId) { + return new APIgetDomainConfigsRequest(tenantId); + } + private okhttp3.Call getEmailTemplateCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/email-templates/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getEmailTemplateValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getEmailTemplate(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getEmailTemplate(Async)"); + } + + return getEmailTemplateCall(tenantId, id, _callback); + + } + + + private ApiResponse getEmailTemplateWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getEmailTemplateValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getEmailTemplateAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getEmailTemplateValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetEmailTemplateRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String id; + + private APIgetEmailTemplateRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + this.tenantId = tenantId; + this.id = id; + } + + /** + * Build call for getEmailTemplate + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getEmailTemplateCall(tenantId, id, _callback); + } + + /** + * Execute getEmailTemplate request + * @return GetEmailTemplateResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetEmailTemplateResponse execute() throws ApiException { + ApiResponse localVarResp = getEmailTemplateWithHttpInfo(tenantId, id); + return localVarResp.getData(); + } + + /** + * Execute getEmailTemplate request with HTTP info returned + * @return ApiResponse<GetEmailTemplateResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getEmailTemplateWithHttpInfo(tenantId, id); + } + + /** + * Execute getEmailTemplate request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getEmailTemplateAsync(tenantId, id, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @param id (required) + * @return APIgetEmailTemplateRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetEmailTemplateRequest getEmailTemplate(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetEmailTemplateRequest(tenantId, id); + } + private okhttp3.Call getEmailTemplateDefinitionsCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/email-templates/definitions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getEmailTemplateDefinitionsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getEmailTemplateDefinitions(Async)"); + } + + return getEmailTemplateDefinitionsCall(tenantId, _callback); + + } + + + private ApiResponse getEmailTemplateDefinitionsWithHttpInfo(@javax.annotation.Nonnull String tenantId) throws ApiException { + okhttp3.Call localVarCall = getEmailTemplateDefinitionsValidateBeforeCall(tenantId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getEmailTemplateDefinitionsAsync(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getEmailTemplateDefinitionsValidateBeforeCall(tenantId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetEmailTemplateDefinitionsRequest { + @javax.annotation.Nonnull + private final String tenantId; + + private APIgetEmailTemplateDefinitionsRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Build call for getEmailTemplateDefinitions + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getEmailTemplateDefinitionsCall(tenantId, _callback); + } + + /** + * Execute getEmailTemplateDefinitions request + * @return GetEmailTemplateDefinitionsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetEmailTemplateDefinitionsResponse execute() throws ApiException { + ApiResponse localVarResp = getEmailTemplateDefinitionsWithHttpInfo(tenantId); + return localVarResp.getData(); + } + + /** + * Execute getEmailTemplateDefinitions request with HTTP info returned + * @return ApiResponse<GetEmailTemplateDefinitionsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getEmailTemplateDefinitionsWithHttpInfo(tenantId); + } + + /** + * Execute getEmailTemplateDefinitions request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getEmailTemplateDefinitionsAsync(tenantId, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @return APIgetEmailTemplateDefinitionsRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetEmailTemplateDefinitionsRequest getEmailTemplateDefinitions(@javax.annotation.Nonnull String tenantId) { + return new APIgetEmailTemplateDefinitionsRequest(tenantId); + } + private okhttp3.Call getEmailTemplateRenderErrorsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/email-templates/{id}/render-errors" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getEmailTemplateRenderErrorsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getEmailTemplateRenderErrors(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getEmailTemplateRenderErrors(Async)"); + } + + return getEmailTemplateRenderErrorsCall(tenantId, id, skip, _callback); + + } + + + private ApiResponse getEmailTemplateRenderErrorsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getEmailTemplateRenderErrorsValidateBeforeCall(tenantId, id, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getEmailTemplateRenderErrorsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getEmailTemplateRenderErrorsValidateBeforeCall(tenantId, id, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetEmailTemplateRenderErrorsRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String id; + @javax.annotation.Nullable + private Double skip; + + private APIgetEmailTemplateRenderErrorsRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + this.tenantId = tenantId; + this.id = id; + } + + /** + * Set skip + * @param skip (optional) + * @return APIgetEmailTemplateRenderErrorsRequest + */ + public APIgetEmailTemplateRenderErrorsRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; + return this; + } + + /** + * Build call for getEmailTemplateRenderErrors + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getEmailTemplateRenderErrorsCall(tenantId, id, skip, _callback); + } + + /** + * Execute getEmailTemplateRenderErrors request + * @return GetEmailTemplateRenderErrorsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetEmailTemplateRenderErrorsResponse execute() throws ApiException { + ApiResponse localVarResp = getEmailTemplateRenderErrorsWithHttpInfo(tenantId, id, skip); + return localVarResp.getData(); + } + + /** + * Execute getEmailTemplateRenderErrors request with HTTP info returned + * @return ApiResponse<GetEmailTemplateRenderErrorsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getEmailTemplateRenderErrorsWithHttpInfo(tenantId, id, skip); + } + + /** + * Execute getEmailTemplateRenderErrors request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getEmailTemplateRenderErrorsAsync(tenantId, id, skip, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @param id (required) + * @return APIgetEmailTemplateRenderErrorsRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetEmailTemplateRenderErrorsRequest getEmailTemplateRenderErrors(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetEmailTemplateRenderErrorsRequest(tenantId, id); + } + private okhttp3.Call getEmailTemplatesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/email-templates"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getEmailTemplatesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getEmailTemplates(Async)"); + } + + return getEmailTemplatesCall(tenantId, skip, _callback); + + } + + + private ApiResponse getEmailTemplatesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getEmailTemplatesValidateBeforeCall(tenantId, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getEmailTemplatesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getEmailTemplatesValidateBeforeCall(tenantId, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetEmailTemplatesRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nullable + private Double skip; + + private APIgetEmailTemplatesRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Set skip + * @param skip (optional) + * @return APIgetEmailTemplatesRequest + */ + public APIgetEmailTemplatesRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; + return this; + } + + /** + * Build call for getEmailTemplates + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getEmailTemplatesCall(tenantId, skip, _callback); + } + + /** + * Execute getEmailTemplates request + * @return GetEmailTemplatesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetEmailTemplatesResponse execute() throws ApiException { + ApiResponse localVarResp = getEmailTemplatesWithHttpInfo(tenantId, skip); + return localVarResp.getData(); + } + + /** + * Execute getEmailTemplates request with HTTP info returned + * @return ApiResponse<GetEmailTemplatesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getEmailTemplatesWithHttpInfo(tenantId, skip); + } + + /** + * Execute getEmailTemplates request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getEmailTemplatesAsync(tenantId, skip, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @return APIgetEmailTemplatesRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetEmailTemplatesRequest getEmailTemplates(@javax.annotation.Nonnull String tenantId) { + return new APIgetEmailTemplatesRequest(tenantId); + } + private okhttp3.Call getFeedPostsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String afterId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List tags, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/feed-posts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (afterId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("afterId", afterId)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (tags != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "tags", tags)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getFeedPostsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String afterId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List tags, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getFeedPosts(Async)"); + } + + return getFeedPostsCall(tenantId, afterId, limit, tags, _callback); + + } + + + private ApiResponse getFeedPostsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String afterId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List tags) throws ApiException { + okhttp3.Call localVarCall = getFeedPostsValidateBeforeCall(tenantId, afterId, limit, tags, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getFeedPostsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String afterId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List tags, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getFeedPostsValidateBeforeCall(tenantId, afterId, limit, tags, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetFeedPostsRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nullable + private String afterId; + @javax.annotation.Nullable + private Integer limit; + @javax.annotation.Nullable + private List tags; + + private APIgetFeedPostsRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Set afterId + * @param afterId (optional) + * @return APIgetFeedPostsRequest + */ + public APIgetFeedPostsRequest afterId(@javax.annotation.Nullable String afterId) { + this.afterId = afterId; + return this; + } + + /** + * Set limit + * @param limit (optional) + * @return APIgetFeedPostsRequest + */ + public APIgetFeedPostsRequest limit(@javax.annotation.Nullable Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set tags + * @param tags (optional) + * @return APIgetFeedPostsRequest + */ + public APIgetFeedPostsRequest tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + /** + * Build call for getFeedPosts + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getFeedPostsCall(tenantId, afterId, limit, tags, _callback); + } + + /** + * Execute getFeedPosts request + * @return GetFeedPostsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetFeedPostsResponse execute() throws ApiException { + ApiResponse localVarResp = getFeedPostsWithHttpInfo(tenantId, afterId, limit, tags); + return localVarResp.getData(); + } + + /** + * Execute getFeedPosts request with HTTP info returned + * @return ApiResponse<GetFeedPostsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getFeedPostsWithHttpInfo(tenantId, afterId, limit, tags); + } + + /** + * Execute getFeedPosts request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getFeedPostsAsync(tenantId, afterId, limit, tags, _callback); + } + } + + /** + * + * req tenantId afterId + * @param tenantId (required) + * @return APIgetFeedPostsRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetFeedPostsRequest getFeedPosts(@javax.annotation.Nonnull String tenantId) { + return new APIgetFeedPostsRequest(tenantId); + } + private okhttp3.Call getHashTagsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double page, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/hash-tags"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getHashTagsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double page, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getHashTags(Async)"); + } + + return getHashTagsCall(tenantId, page, _callback); + + } + + + private ApiResponse getHashTagsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double page) throws ApiException { + okhttp3.Call localVarCall = getHashTagsValidateBeforeCall(tenantId, page, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getHashTagsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double page, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getHashTagsValidateBeforeCall(tenantId, page, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetHashTagsRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nullable + private Double page; + + private APIgetHashTagsRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Set page + * @param page (optional) + * @return APIgetHashTagsRequest + */ + public APIgetHashTagsRequest page(@javax.annotation.Nullable Double page) { + this.page = page; + return this; + } + + /** + * Build call for getHashTags + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getHashTagsCall(tenantId, page, _callback); + } + + /** + * Execute getHashTags request + * @return GetHashTagsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetHashTagsResponse execute() throws ApiException { + ApiResponse localVarResp = getHashTagsWithHttpInfo(tenantId, page); + return localVarResp.getData(); + } + + /** + * Execute getHashTags request with HTTP info returned + * @return ApiResponse<GetHashTagsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getHashTagsWithHttpInfo(tenantId, page); + } + + /** + * Execute getHashTags request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getHashTagsAsync(tenantId, page, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @return APIgetHashTagsRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetHashTagsRequest getHashTags(@javax.annotation.Nonnull String tenantId) { + return new APIgetHashTagsRequest(tenantId); + } + private okhttp3.Call getMeCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/me"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getMeValidateBeforeCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getMe(Async)"); + } + + return getMeCall(tenantId, _callback); + + } + + + private ApiResponse getMeWithHttpInfo(@javax.annotation.Nonnull String tenantId) throws ApiException { + okhttp3.Call localVarCall = getMeValidateBeforeCall(tenantId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getMeAsync(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getMeValidateBeforeCall(tenantId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetMeRequest { + @javax.annotation.Nonnull + private final String tenantId; + + private APIgetMeRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Build call for getMe + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getMeCall(tenantId, _callback); + } + + /** + * Execute getMe request + * @return GetMeResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetMeResponse execute() throws ApiException { + ApiResponse localVarResp = getMeWithHttpInfo(tenantId); + return localVarResp.getData(); + } + + /** + * Execute getMe request with HTTP info returned + * @return ApiResponse<GetMeResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getMeWithHttpInfo(tenantId); + } + + /** + * Execute getMe request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getMeAsync(tenantId, _callback); + } + } + + /** + * + * Identifies the credential in use: the tenant it belongs to and, for OAuth tokens, the user who authorized it. Integrations use this to test a connection and label it. + * @param tenantId (required) + * @return APIgetMeRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetMeRequest getMe(@javax.annotation.Nonnull String tenantId) { + return new APIgetMeRequest(tenantId); + } + private okhttp3.Call getModeratorCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/moderators/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getModeratorValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getModerator(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getModerator(Async)"); + } + + return getModeratorCall(tenantId, id, _callback); + + } + + + private ApiResponse getModeratorWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getModeratorValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getModeratorAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getModeratorValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetModeratorRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String id; + + private APIgetModeratorRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + this.tenantId = tenantId; + this.id = id; + } + + /** + * Build call for getModerator + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getModeratorCall(tenantId, id, _callback); + } + + /** + * Execute getModerator request + * @return GetModeratorResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetModeratorResponse execute() throws ApiException { + ApiResponse localVarResp = getModeratorWithHttpInfo(tenantId, id); + return localVarResp.getData(); + } + + /** + * Execute getModerator request with HTTP info returned + * @return ApiResponse<GetModeratorResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getModeratorWithHttpInfo(tenantId, id); + } + + /** + * Execute getModerator request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getModeratorAsync(tenantId, id, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @param id (required) + * @return APIgetModeratorRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetModeratorRequest getModerator(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetModeratorRequest(tenantId, id); + } + private okhttp3.Call getModeratorsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/moderators"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getModeratorsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getModerators(Async)"); + } + + return getModeratorsCall(tenantId, skip, _callback); + + } + + + private ApiResponse getModeratorsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getModeratorsValidateBeforeCall(tenantId, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getModeratorsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getModeratorsValidateBeforeCall(tenantId, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetModeratorsRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nullable + private Double skip; + + private APIgetModeratorsRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Set skip + * @param skip (optional) + * @return APIgetModeratorsRequest + */ + public APIgetModeratorsRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; + return this; + } + + /** + * Build call for getModerators + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getModeratorsCall(tenantId, skip, _callback); + } + + /** + * Execute getModerators request + * @return GetModeratorsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetModeratorsResponse execute() throws ApiException { + ApiResponse localVarResp = getModeratorsWithHttpInfo(tenantId, skip); + return localVarResp.getData(); + } + + /** + * Execute getModerators request with HTTP info returned + * @return ApiResponse<GetModeratorsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getModeratorsWithHttpInfo(tenantId, skip); + } + + /** + * Execute getModerators request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getModeratorsAsync(tenantId, skip, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @return APIgetModeratorsRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetModeratorsRequest getModerators(@javax.annotation.Nonnull String tenantId) { + return new APIgetModeratorsRequest(tenantId); + } + private okhttp3.Call getNotificationCountCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/notifications/count"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + } + + if (fromCommentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromCommentId", fromCommentId)); + } + + if (viewed != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("viewed", viewed)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getNotificationCountValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getNotificationCount(Async)"); + } + + return getNotificationCountCall(tenantId, userId, urlId, fromCommentId, viewed, type, _callback); + + } + + + private ApiResponse getNotificationCountWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type) throws ApiException { + okhttp3.Call localVarCall = getNotificationCountValidateBeforeCall(tenantId, userId, urlId, fromCommentId, viewed, type, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getNotificationCountAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getNotificationCountValidateBeforeCall(tenantId, userId, urlId, fromCommentId, viewed, type, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetNotificationCountRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nullable + private String userId; + @javax.annotation.Nullable + private String urlId; + @javax.annotation.Nullable + private String fromCommentId; + @javax.annotation.Nullable + private Boolean viewed; + @javax.annotation.Nullable + private String type; + + private APIgetNotificationCountRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Set userId + * @param userId (optional) + * @return APIgetNotificationCountRequest + */ + public APIgetNotificationCountRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Set urlId + * @param urlId (optional) + * @return APIgetNotificationCountRequest + */ + public APIgetNotificationCountRequest urlId(@javax.annotation.Nullable String urlId) { + this.urlId = urlId; + return this; + } + + /** + * Set fromCommentId + * @param fromCommentId (optional) + * @return APIgetNotificationCountRequest + */ + public APIgetNotificationCountRequest fromCommentId(@javax.annotation.Nullable String fromCommentId) { + this.fromCommentId = fromCommentId; + return this; + } + + /** + * Set viewed + * @param viewed (optional) + * @return APIgetNotificationCountRequest + */ + public APIgetNotificationCountRequest viewed(@javax.annotation.Nullable Boolean viewed) { + this.viewed = viewed; + return this; + } + + /** + * Set type + * @param type (optional) + * @return APIgetNotificationCountRequest + */ + public APIgetNotificationCountRequest type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Build call for getNotificationCount + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getNotificationCountCall(tenantId, userId, urlId, fromCommentId, viewed, type, _callback); + } + + /** + * Execute getNotificationCount request + * @return GetNotificationCountResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetNotificationCountResponse execute() throws ApiException { + ApiResponse localVarResp = getNotificationCountWithHttpInfo(tenantId, userId, urlId, fromCommentId, viewed, type); + return localVarResp.getData(); + } + + /** + * Execute getNotificationCount request with HTTP info returned + * @return ApiResponse<GetNotificationCountResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getNotificationCountWithHttpInfo(tenantId, userId, urlId, fromCommentId, viewed, type); + } + + /** + * Execute getNotificationCount request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getNotificationCountAsync(tenantId, userId, urlId, fromCommentId, viewed, type, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @return APIgetNotificationCountRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetNotificationCountRequest getNotificationCount(@javax.annotation.Nonnull String tenantId) { + return new APIgetNotificationCountRequest(tenantId); + } + private okhttp3.Call getNotificationsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/notifications"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + } + + if (fromCommentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromCommentId", fromCommentId)); + } + + if (viewed != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("viewed", viewed)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getNotificationsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getNotifications(Async)"); + } + + return getNotificationsCall(tenantId, userId, urlId, fromCommentId, viewed, type, skip, _callback); + + } + + + private ApiResponse getNotificationsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(tenantId, userId, urlId, fromCommentId, viewed, type, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getNotificationsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(tenantId, userId, urlId, fromCommentId, viewed, type, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetNotificationsRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nullable + private String userId; + @javax.annotation.Nullable + private String urlId; + @javax.annotation.Nullable + private String fromCommentId; + @javax.annotation.Nullable + private Boolean viewed; + @javax.annotation.Nullable + private String type; + @javax.annotation.Nullable + private Double skip; + + private APIgetNotificationsRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Set userId + * @param userId (optional) + * @return APIgetNotificationsRequest + */ + public APIgetNotificationsRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Set urlId + * @param urlId (optional) + * @return APIgetNotificationsRequest + */ + public APIgetNotificationsRequest urlId(@javax.annotation.Nullable String urlId) { + this.urlId = urlId; + return this; + } + + /** + * Set fromCommentId + * @param fromCommentId (optional) + * @return APIgetNotificationsRequest + */ + public APIgetNotificationsRequest fromCommentId(@javax.annotation.Nullable String fromCommentId) { + this.fromCommentId = fromCommentId; + return this; + } + + /** + * Set viewed + * @param viewed (optional) + * @return APIgetNotificationsRequest + */ + public APIgetNotificationsRequest viewed(@javax.annotation.Nullable Boolean viewed) { + this.viewed = viewed; + return this; + } + + /** + * Set type + * @param type (optional) + * @return APIgetNotificationsRequest + */ + public APIgetNotificationsRequest type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Set skip + * @param skip (optional) + * @return APIgetNotificationsRequest + */ + public APIgetNotificationsRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; + return this; + } + + /** + * Build call for getNotifications + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getNotificationsCall(tenantId, userId, urlId, fromCommentId, viewed, type, skip, _callback); + } + + /** + * Execute getNotifications request + * @return GetNotificationsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public GetNotificationsResponse execute() throws ApiException { + ApiResponse localVarResp = getNotificationsWithHttpInfo(tenantId, userId, urlId, fromCommentId, viewed, type, skip); + return localVarResp.getData(); + } + + /** + * Execute getNotifications request with HTTP info returned + * @return ApiResponse<GetNotificationsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getNotificationsWithHttpInfo(tenantId, userId, urlId, fromCommentId, viewed, type, skip); + } + + /** + * Execute getNotifications request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getNotificationsAsync(tenantId, userId, urlId, fromCommentId, viewed, type, skip, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @return APIgetNotificationsRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APIgetNotificationsRequest getNotifications(@javax.annotation.Nonnull String tenantId) { + return new APIgetNotificationsRequest(tenantId); + } + private okhttp3.Call getPageByURLIdCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/pages/by-url-id"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getPageByURLIdValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getPageByURLId(Async)"); + } + + // verify the required parameter 'urlId' is set + if (urlId == null) { + throw new ApiException("Missing the required parameter 'urlId' when calling getPageByURLId(Async)"); + } + + return getPageByURLIdCall(tenantId, urlId, _callback); + + } + + + private ApiResponse getPageByURLIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) throws ApiException { + okhttp3.Call localVarCall = getPageByURLIdValidateBeforeCall(tenantId, urlId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getPageByURLIdAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getPageByURLIdValidateBeforeCall(tenantId, urlId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetPageByURLIdRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String urlId; + + private APIgetPageByURLIdRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + this.tenantId = tenantId; + this.urlId = urlId; + } + + /** + * Build call for getPageByURLId + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getPageByURLIdCall(tenantId, urlId, _callback); + } + + /** + * Execute getPageByURLId request + * @return GetPageByURLIdAPIResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public GetPageByURLIdAPIResponse execute() throws ApiException { + ApiResponse localVarResp = getPageByURLIdWithHttpInfo(tenantId, urlId); + return localVarResp.getData(); + } + + /** + * Execute getPageByURLId request with HTTP info returned + * @return ApiResponse<GetPageByURLIdAPIResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPageByURLIdWithHttpInfo(tenantId, urlId); + } + + /** + * Execute getPageByURLId request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPageByURLIdAsync(tenantId, urlId, _callback); + } + } + + /** + * + * + * @param tenantId (required) + * @param urlId (required) + * @return APIgetPageByURLIdRequest + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public APIgetPageByURLIdRequest getPageByURLId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + return new APIgetPageByURLIdRequest(tenantId, urlId); + } + private okhttp3.Call getPageLikesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/pages/likes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + } + + if (includeUserInfo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeUserInfo", includeUserInfo)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getPageLikesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getPageLikes(Async)"); + } + + // verify the required parameter 'urlId' is set + if (urlId == null) { + throw new ApiException("Missing the required parameter 'urlId' when calling getPageLikes(Async)"); + } + + return getPageLikesCall(tenantId, urlId, includeUserInfo, _callback); + + } + + + private ApiResponse getPageLikesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo) throws ApiException { + okhttp3.Call localVarCall = getPageLikesValidateBeforeCall(tenantId, urlId, includeUserInfo, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getPageLikesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getPageLikesValidateBeforeCall(tenantId, urlId, includeUserInfo, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetPageLikesRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String urlId; + @javax.annotation.Nullable + private PageReactIncludeUserInfo includeUserInfo; + + private APIgetPageLikesRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + this.tenantId = tenantId; + this.urlId = urlId; + } + + /** + * Set includeUserInfo + * @param includeUserInfo \"public\" omits users with private profiles, \"include-private\" includes them. (optional) + * @return APIgetPageLikesRequest + */ + public APIgetPageLikesRequest includeUserInfo(@javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo) { + this.includeUserInfo = includeUserInfo; + return this; + } + + /** + * Build call for getPageLikes + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getPageLikesCall(tenantId, urlId, includeUserInfo, _callback); + } + + /** + * Execute getPageLikes request + * @return GetPageLikesAPIResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public GetPageLikesAPIResponse execute() throws ApiException { + ApiResponse localVarResp = getPageLikesWithHttpInfo(tenantId, urlId, includeUserInfo); + return localVarResp.getData(); + } + + /** + * Execute getPageLikes request with HTTP info returned + * @return ApiResponse<GetPageLikesAPIResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPageLikesWithHttpInfo(tenantId, urlId, includeUserInfo); + } + + /** + * Execute getPageLikes request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPageLikesAsync(tenantId, urlId, includeUserInfo, _callback); + } + } + + /** + * + * Like count for a page, optionally with the users who liked it. + * @param tenantId (required) + * @param urlId (required) + * @return APIgetPageLikesRequest + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public APIgetPageLikesRequest getPageLikes(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + return new APIgetPageLikesRequest(tenantId, urlId); + } + private okhttp3.Call getPageReactsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/pages/reacts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + } + + if (includeUserInfo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeUserInfo", includeUserInfo)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - okhttp3.Call localVarCall = getEmailTemplateRenderErrorsValidateBeforeCall(tenantId, id, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getPageReactsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getPageReacts(Async)"); + } + + // verify the required parameter 'urlId' is set + if (urlId == null) { + throw new ApiException("Missing the required parameter 'urlId' when calling getPageReacts(Async)"); + } + + return getPageReactsCall(tenantId, urlId, includeUserInfo, _callback); + + } + + + private ApiResponse getPageReactsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo) throws ApiException { + okhttp3.Call localVarCall = getPageReactsValidateBeforeCall(tenantId, urlId, includeUserInfo, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getPageReactsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getPageReactsValidateBeforeCall(tenantId, urlId, includeUserInfo, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetEmailTemplateRenderErrorsRequest { + public class APIgetPageReactsRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String id; + private final String urlId; @javax.annotation.Nullable - private Double skip; + private PageReactIncludeUserInfo includeUserInfo; - private APIgetEmailTemplateRenderErrorsRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetPageReactsRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { this.tenantId = tenantId; - this.id = id; + this.urlId = urlId; } /** - * Set skip - * @param skip (optional) - * @return APIgetEmailTemplateRenderErrorsRequest + * Set includeUserInfo + * @param includeUserInfo \"public\" omits users with private profiles, \"include-private\" includes them. (optional) + * @return APIgetPageReactsRequest */ - public APIgetEmailTemplateRenderErrorsRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; + public APIgetPageReactsRequest includeUserInfo(@javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo) { + this.includeUserInfo = includeUserInfo; return this; } /** - * Build call for getEmailTemplateRenderErrors + * Build call for getPageReacts * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10027,48 +13756,45 @@ public APIgetEmailTemplateRenderErrorsRequest skip(@javax.annotation.Nullable Do Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getEmailTemplateRenderErrorsCall(tenantId, id, skip, _callback); + return getPageReactsCall(tenantId, urlId, includeUserInfo, _callback); } /** - * Execute getEmailTemplateRenderErrors request - * @return GetEmailTemplateRenderErrorsResponse + * Execute getPageReacts request + * @return GetPageReactsAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetEmailTemplateRenderErrorsResponse execute() throws ApiException { - ApiResponse localVarResp = getEmailTemplateRenderErrorsWithHttpInfo(tenantId, id, skip); + public GetPageReactsAPIResponse execute() throws ApiException { + ApiResponse localVarResp = getPageReactsWithHttpInfo(tenantId, urlId, includeUserInfo); return localVarResp.getData(); } /** - * Execute getEmailTemplateRenderErrors request with HTTP info returned - * @return ApiResponse<GetEmailTemplateRenderErrorsResponse> + * Execute getPageReacts request with HTTP info returned + * @return ApiResponse<GetPageReactsAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getEmailTemplateRenderErrorsWithHttpInfo(tenantId, id, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPageReactsWithHttpInfo(tenantId, urlId, includeUserInfo); } /** - * Execute getEmailTemplateRenderErrors request (asynchronously) + * Execute getPageReacts request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -10077,32 +13803,30 @@ public ApiResponse executeWithHttpInfo() t Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getEmailTemplateRenderErrorsAsync(tenantId, id, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPageReactsAsync(tenantId, urlId, includeUserInfo, _callback); } } /** * - * + * Custom react counts for a page, optionally with the users who reacted. * @param tenantId (required) - * @param id (required) - * @return APIgetEmailTemplateRenderErrorsRequest + * @param urlId (required) + * @return APIgetPageReactsRequest * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetEmailTemplateRenderErrorsRequest getEmailTemplateRenderErrors(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetEmailTemplateRenderErrorsRequest(tenantId, id); + public APIgetPageReactsRequest getPageReacts(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + return new APIgetPageReactsRequest(tenantId, urlId); } - private okhttp3.Call getEmailTemplatesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPagesCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -10119,7 +13843,7 @@ private okhttp3.Call getEmailTemplatesCall(@javax.annotation.Nonnull String tena Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/email-templates"; + String localVarPath = "/api/v1/pages"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -10131,10 +13855,6 @@ private okhttp3.Call getEmailTemplatesCall(@javax.annotation.Nonnull String tena localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (skip != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); - } - final String[] localVarAccepts = { "application/json" }; @@ -10155,53 +13875,41 @@ private okhttp3.Call getEmailTemplatesCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call getEmailTemplatesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPagesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getEmailTemplates(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getPages(Async)"); } - return getEmailTemplatesCall(tenantId, skip, _callback); + return getPagesCall(tenantId, _callback); } - private ApiResponse getEmailTemplatesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getEmailTemplatesValidateBeforeCall(tenantId, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getPagesWithHttpInfo(@javax.annotation.Nonnull String tenantId) throws ApiException { + okhttp3.Call localVarCall = getPagesValidateBeforeCall(tenantId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getEmailTemplatesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPagesAsync(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getEmailTemplatesValidateBeforeCall(tenantId, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getPagesValidateBeforeCall(tenantId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetEmailTemplatesRequest { + public class APIgetPagesRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nullable - private Double skip; - private APIgetEmailTemplatesRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetPagesRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } /** - * Set skip - * @param skip (optional) - * @return APIgetEmailTemplatesRequest - */ - public APIgetEmailTemplatesRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; - return this; - } - - /** - * Build call for getEmailTemplates + * Build call for getPages * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10210,48 +13918,45 @@ public APIgetEmailTemplatesRequest skip(@javax.annotation.Nullable Double skip) Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getEmailTemplatesCall(tenantId, skip, _callback); + return getPagesCall(tenantId, _callback); } /** - * Execute getEmailTemplates request - * @return GetEmailTemplatesResponse + * Execute getPages request + * @return GetPagesAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetEmailTemplatesResponse execute() throws ApiException { - ApiResponse localVarResp = getEmailTemplatesWithHttpInfo(tenantId, skip); + public GetPagesAPIResponse execute() throws ApiException { + ApiResponse localVarResp = getPagesWithHttpInfo(tenantId); return localVarResp.getData(); } /** - * Execute getEmailTemplates request with HTTP info returned - * @return ApiResponse<GetEmailTemplatesResponse> + * Execute getPages request with HTTP info returned + * @return ApiResponse<GetPagesAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getEmailTemplatesWithHttpInfo(tenantId, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPagesWithHttpInfo(tenantId); } /** - * Execute getEmailTemplates request (asynchronously) + * Execute getPages request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -10260,11 +13965,10 @@ public ApiResponse executeWithHttpInfo() throws ApiEx Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getEmailTemplatesAsync(tenantId, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPagesAsync(tenantId, _callback); } } @@ -10272,19 +13976,18 @@ public okhttp3.Call executeAsync(final ApiCallback _c * * * @param tenantId (required) - * @return APIgetEmailTemplatesRequest + * @return APIgetPagesRequest * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetEmailTemplatesRequest getEmailTemplates(@javax.annotation.Nonnull String tenantId) { - return new APIgetEmailTemplatesRequest(tenantId); + public APIgetPagesRequest getPages(@javax.annotation.Nonnull String tenantId) { + return new APIgetPagesRequest(tenantId); } - private okhttp3.Call getFeedPostsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String afterId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List tags, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPendingWebhookEventCountCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -10301,7 +14004,7 @@ private okhttp3.Call getFeedPostsCall(@javax.annotation.Nonnull String tenantId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/feed-posts"; + String localVarPath = "/api/v1/pending-webhook-events/count"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -10313,16 +14016,28 @@ private okhttp3.Call getFeedPostsCall(@javax.annotation.Nonnull String tenantId, localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (afterId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("afterId", afterId)); + if (commentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("commentId", commentId)); } - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + if (externalId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("externalId", externalId)); } - if (tags != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "tags", tags)); + if (eventType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("eventType", eventType)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (domain != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("domain", domain)); + } + + if (attemptCountGT != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("attemptCountGT", attemptCountGT)); } final String[] localVarAccepts = { @@ -10345,77 +14060,113 @@ private okhttp3.Call getFeedPostsCall(@javax.annotation.Nonnull String tenantId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getFeedPostsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String afterId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List tags, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPendingWebhookEventCountValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getFeedPosts(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getPendingWebhookEventCount(Async)"); } - return getFeedPostsCall(tenantId, afterId, limit, tags, _callback); + return getPendingWebhookEventCountCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, _callback); } - private ApiResponse getFeedPostsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String afterId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List tags) throws ApiException { - okhttp3.Call localVarCall = getFeedPostsValidateBeforeCall(tenantId, afterId, limit, tags, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getPendingWebhookEventCountWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT) throws ApiException { + okhttp3.Call localVarCall = getPendingWebhookEventCountValidateBeforeCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getFeedPostsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String afterId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List tags, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPendingWebhookEventCountAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getFeedPostsValidateBeforeCall(tenantId, afterId, limit, tags, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getPendingWebhookEventCountValidateBeforeCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetFeedPostsRequest { + public class APIgetPendingWebhookEventCountRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nullable - private String afterId; + private String commentId; @javax.annotation.Nullable - private Integer limit; + private String externalId; @javax.annotation.Nullable - private List tags; + private String eventType; + @javax.annotation.Nullable + private String type; + @javax.annotation.Nullable + private String domain; + @javax.annotation.Nullable + private Double attemptCountGT; - private APIgetFeedPostsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetPendingWebhookEventCountRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } /** - * Set afterId - * @param afterId (optional) - * @return APIgetFeedPostsRequest + * Set commentId + * @param commentId (optional) + * @return APIgetPendingWebhookEventCountRequest */ - public APIgetFeedPostsRequest afterId(@javax.annotation.Nullable String afterId) { - this.afterId = afterId; + public APIgetPendingWebhookEventCountRequest commentId(@javax.annotation.Nullable String commentId) { + this.commentId = commentId; return this; } /** - * Set limit - * @param limit (optional) - * @return APIgetFeedPostsRequest + * Set externalId + * @param externalId (optional) + * @return APIgetPendingWebhookEventCountRequest */ - public APIgetFeedPostsRequest limit(@javax.annotation.Nullable Integer limit) { - this.limit = limit; + public APIgetPendingWebhookEventCountRequest externalId(@javax.annotation.Nullable String externalId) { + this.externalId = externalId; + return this; + } + + /** + * Set eventType + * @param eventType (optional) + * @return APIgetPendingWebhookEventCountRequest + */ + public APIgetPendingWebhookEventCountRequest eventType(@javax.annotation.Nullable String eventType) { + this.eventType = eventType; + return this; + } + + /** + * Set type + * @param type (optional) + * @return APIgetPendingWebhookEventCountRequest + */ + public APIgetPendingWebhookEventCountRequest type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Set domain + * @param domain (optional) + * @return APIgetPendingWebhookEventCountRequest + */ + public APIgetPendingWebhookEventCountRequest domain(@javax.annotation.Nullable String domain) { + this.domain = domain; return this; } /** - * Set tags - * @param tags (optional) - * @return APIgetFeedPostsRequest + * Set attemptCountGT + * @param attemptCountGT (optional) + * @return APIgetPendingWebhookEventCountRequest */ - public APIgetFeedPostsRequest tags(@javax.annotation.Nullable List tags) { - this.tags = tags; + public APIgetPendingWebhookEventCountRequest attemptCountGT(@javax.annotation.Nullable Double attemptCountGT) { + this.attemptCountGT = attemptCountGT; return this; } /** - * Build call for getFeedPosts + * Build call for getPendingWebhookEventCount * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10428,12 +14179,12 @@ public APIgetFeedPostsRequest tags(@javax.annotation.Nullable List tags) */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getFeedPostsCall(tenantId, afterId, limit, tags, _callback); + return getPendingWebhookEventCountCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, _callback); } /** - * Execute getFeedPosts request - * @return GetFeedPostsResponse + * Execute getPendingWebhookEventCount request + * @return GetPendingWebhookEventCountResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10443,14 +14194,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetFeedPostsResponse execute() throws ApiException { - ApiResponse localVarResp = getFeedPostsWithHttpInfo(tenantId, afterId, limit, tags); + public GetPendingWebhookEventCountResponse execute() throws ApiException { + ApiResponse localVarResp = getPendingWebhookEventCountWithHttpInfo(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT); return localVarResp.getData(); } /** - * Execute getFeedPosts request with HTTP info returned - * @return ApiResponse<GetFeedPostsResponse> + * Execute getPendingWebhookEventCount request with HTTP info returned + * @return ApiResponse<GetPendingWebhookEventCountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10460,12 +14211,12 @@ public GetFeedPostsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getFeedPostsWithHttpInfo(tenantId, afterId, limit, tags); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPendingWebhookEventCountWithHttpInfo(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT); } /** - * Execute getFeedPosts request (asynchronously) + * Execute getPendingWebhookEventCount request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -10477,16 +14228,16 @@ public ApiResponse executeWithHttpInfo() throws ApiExcepti 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getFeedPostsAsync(tenantId, afterId, limit, tags, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPendingWebhookEventCountAsync(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, _callback); } } /** * - * req tenantId afterId + * * @param tenantId (required) - * @return APIgetFeedPostsRequest + * @return APIgetPendingWebhookEventCountRequest * @http.response.details @@ -10495,10 +14246,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callba
Response Details
0 Error -
*/ - public APIgetFeedPostsRequest getFeedPosts(@javax.annotation.Nonnull String tenantId) { - return new APIgetFeedPostsRequest(tenantId); + public APIgetPendingWebhookEventCountRequest getPendingWebhookEventCount(@javax.annotation.Nonnull String tenantId) { + return new APIgetPendingWebhookEventCountRequest(tenantId); } - private okhttp3.Call getHashTagsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double page, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPendingWebhookEventsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -10515,7 +14266,7 @@ private okhttp3.Call getHashTagsCall(@javax.annotation.Nonnull String tenantId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/hash-tags"; + String localVarPath = "/api/v1/pending-webhook-events"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -10527,8 +14278,32 @@ private okhttp3.Call getHashTagsCall(@javax.annotation.Nonnull String tenantId, localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + if (commentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("commentId", commentId)); + } + + if (externalId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("externalId", externalId)); + } + + if (eventType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("eventType", eventType)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (domain != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("domain", domain)); + } + + if (attemptCountGT != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("attemptCountGT", attemptCountGT)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); } final String[] localVarAccepts = { @@ -10551,53 +14326,125 @@ private okhttp3.Call getHashTagsCall(@javax.annotation.Nonnull String tenantId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getHashTagsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double page, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPendingWebhookEventsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getHashTags(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getPendingWebhookEvents(Async)"); } - return getHashTagsCall(tenantId, page, _callback); + return getPendingWebhookEventsCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, _callback); } - private ApiResponse getHashTagsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double page) throws ApiException { - okhttp3.Call localVarCall = getHashTagsValidateBeforeCall(tenantId, page, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getPendingWebhookEventsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getPendingWebhookEventsValidateBeforeCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getHashTagsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double page, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPendingWebhookEventsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getHashTagsValidateBeforeCall(tenantId, page, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getPendingWebhookEventsValidateBeforeCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetHashTagsRequest { + public class APIgetPendingWebhookEventsRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nullable - private Double page; + private String commentId; + @javax.annotation.Nullable + private String externalId; + @javax.annotation.Nullable + private String eventType; + @javax.annotation.Nullable + private String type; + @javax.annotation.Nullable + private String domain; + @javax.annotation.Nullable + private Double attemptCountGT; + @javax.annotation.Nullable + private Double skip; - private APIgetHashTagsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetPendingWebhookEventsRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } /** - * Set page - * @param page (optional) - * @return APIgetHashTagsRequest + * Set commentId + * @param commentId (optional) + * @return APIgetPendingWebhookEventsRequest */ - public APIgetHashTagsRequest page(@javax.annotation.Nullable Double page) { - this.page = page; + public APIgetPendingWebhookEventsRequest commentId(@javax.annotation.Nullable String commentId) { + this.commentId = commentId; return this; } /** - * Build call for getHashTags + * Set externalId + * @param externalId (optional) + * @return APIgetPendingWebhookEventsRequest + */ + public APIgetPendingWebhookEventsRequest externalId(@javax.annotation.Nullable String externalId) { + this.externalId = externalId; + return this; + } + + /** + * Set eventType + * @param eventType (optional) + * @return APIgetPendingWebhookEventsRequest + */ + public APIgetPendingWebhookEventsRequest eventType(@javax.annotation.Nullable String eventType) { + this.eventType = eventType; + return this; + } + + /** + * Set type + * @param type (optional) + * @return APIgetPendingWebhookEventsRequest + */ + public APIgetPendingWebhookEventsRequest type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Set domain + * @param domain (optional) + * @return APIgetPendingWebhookEventsRequest + */ + public APIgetPendingWebhookEventsRequest domain(@javax.annotation.Nullable String domain) { + this.domain = domain; + return this; + } + + /** + * Set attemptCountGT + * @param attemptCountGT (optional) + * @return APIgetPendingWebhookEventsRequest + */ + public APIgetPendingWebhookEventsRequest attemptCountGT(@javax.annotation.Nullable Double attemptCountGT) { + this.attemptCountGT = attemptCountGT; + return this; + } + + /** + * Set skip + * @param skip (optional) + * @return APIgetPendingWebhookEventsRequest + */ + public APIgetPendingWebhookEventsRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; + return this; + } + + /** + * Build call for getPendingWebhookEvents * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10610,12 +14457,12 @@ public APIgetHashTagsRequest page(@javax.annotation.Nullable Double page) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getHashTagsCall(tenantId, page, _callback); + return getPendingWebhookEventsCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, _callback); } /** - * Execute getHashTags request - * @return GetHashTagsResponse + * Execute getPendingWebhookEvents request + * @return GetPendingWebhookEventsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10625,14 +14472,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetHashTagsResponse execute() throws ApiException { - ApiResponse localVarResp = getHashTagsWithHttpInfo(tenantId, page); + public GetPendingWebhookEventsResponse execute() throws ApiException { + ApiResponse localVarResp = getPendingWebhookEventsWithHttpInfo(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip); return localVarResp.getData(); } /** - * Execute getHashTags request with HTTP info returned - * @return ApiResponse<GetHashTagsResponse> + * Execute getPendingWebhookEvents request with HTTP info returned + * @return ApiResponse<GetPendingWebhookEventsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10642,12 +14489,12 @@ public GetHashTagsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getHashTagsWithHttpInfo(tenantId, page); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPendingWebhookEventsWithHttpInfo(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip); } /** - * Execute getHashTags request (asynchronously) + * Execute getPendingWebhookEvents request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -10659,8 +14506,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExceptio 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getHashTagsAsync(tenantId, page, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPendingWebhookEventsAsync(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, _callback); } } @@ -10668,7 +14515,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac * * * @param tenantId (required) - * @return APIgetHashTagsRequest + * @return APIgetPendingWebhookEventsRequest * @http.response.details @@ -10677,10 +14524,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac
Response Details
0 Error -
*/ - public APIgetHashTagsRequest getHashTags(@javax.annotation.Nonnull String tenantId) { - return new APIgetHashTagsRequest(tenantId); + public APIgetPendingWebhookEventsRequest getPendingWebhookEvents(@javax.annotation.Nonnull String tenantId) { + return new APIgetPendingWebhookEventsRequest(tenantId); } - private okhttp3.Call getModeratorCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPollCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -10697,8 +14544,8 @@ private okhttp3.Call getModeratorCall(@javax.annotation.Nonnull String tenantId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/moderators/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/polls/{commentId}" + .replace("{" + "commentId" + "}", localVarApiClient.escapeString(commentId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -10730,49 +14577,49 @@ private okhttp3.Call getModeratorCall(@javax.annotation.Nonnull String tenantId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getModeratorValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPollValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getModerator(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getPoll(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getModerator(Async)"); + // verify the required parameter 'commentId' is set + if (commentId == null) { + throw new ApiException("Missing the required parameter 'commentId' when calling getPoll(Async)"); } - return getModeratorCall(tenantId, id, _callback); + return getPollCall(tenantId, commentId, _callback); } - private ApiResponse getModeratorWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getModeratorValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getPollWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId) throws ApiException { + okhttp3.Call localVarCall = getPollValidateBeforeCall(tenantId, commentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getModeratorAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPollAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getModeratorValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getPollValidateBeforeCall(tenantId, commentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetModeratorRequest { + public class APIgetPollRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String id; + private final String commentId; - private APIgetModeratorRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetPollRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId) { this.tenantId = tenantId; - this.id = id; + this.commentId = commentId; } /** - * Build call for getModerator + * Build call for getPoll * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10785,12 +14632,12 @@ private APIgetModeratorRequest(@javax.annotation.Nonnull String tenantId, @javax */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getModeratorCall(tenantId, id, _callback); + return getPollCall(tenantId, commentId, _callback); } /** - * Execute getModerator request - * @return GetModeratorResponse + * Execute getPoll request + * @return GetPollResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10800,14 +14647,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetModeratorResponse execute() throws ApiException { - ApiResponse localVarResp = getModeratorWithHttpInfo(tenantId, id); + public GetPollResponse execute() throws ApiException { + ApiResponse localVarResp = getPollWithHttpInfo(tenantId, commentId); return localVarResp.getData(); } /** - * Execute getModerator request with HTTP info returned - * @return ApiResponse<GetModeratorResponse> + * Execute getPoll request with HTTP info returned + * @return ApiResponse<GetPollResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10817,12 +14664,12 @@ public GetModeratorResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getModeratorWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPollWithHttpInfo(tenantId, commentId); } /** - * Execute getModerator request (asynchronously) + * Execute getPoll request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -10834,8 +14681,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExcepti 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getModeratorAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPollAsync(tenantId, commentId, _callback); } } @@ -10843,8 +14690,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callba * * * @param tenantId (required) - * @param id (required) - * @return APIgetModeratorRequest + * @param commentId (required) + * @return APIgetPollRequest * @http.response.details @@ -10853,10 +14700,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callba
Response Details
0 Error -
*/ - public APIgetModeratorRequest getModerator(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetModeratorRequest(tenantId, id); + public APIgetPollRequest getPoll(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId) { + return new APIgetPollRequest(tenantId, commentId); } - private okhttp3.Call getModeratorsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPollVoteCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -10873,7 +14720,8 @@ private okhttp3.Call getModeratorsCall(@javax.annotation.Nonnull String tenantId Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/moderators"; + String localVarPath = "/api/v1/poll-votes/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -10885,10 +14733,6 @@ private okhttp3.Call getModeratorsCall(@javax.annotation.Nonnull String tenantId localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (skip != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); - } - final String[] localVarAccepts = { "application/json" }; @@ -10909,53 +14753,49 @@ private okhttp3.Call getModeratorsCall(@javax.annotation.Nonnull String tenantId } @SuppressWarnings("rawtypes") - private okhttp3.Call getModeratorsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPollVoteValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getModerators(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getPollVote(Async)"); } - return getModeratorsCall(tenantId, skip, _callback); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getPollVote(Async)"); + } + + return getPollVoteCall(tenantId, id, _callback); } - private ApiResponse getModeratorsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getModeratorsValidateBeforeCall(tenantId, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getPollVoteWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getPollVoteValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getModeratorsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPollVoteAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getModeratorsValidateBeforeCall(tenantId, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getPollVoteValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetModeratorsRequest { + public class APIgetPollVoteRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nullable - private Double skip; + @javax.annotation.Nonnull + private final String id; - private APIgetModeratorsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetPollVoteRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; + this.id = id; } /** - * Set skip - * @param skip (optional) - * @return APIgetModeratorsRequest - */ - public APIgetModeratorsRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; - return this; - } - - /** - * Build call for getModerators + * Build call for getPollVote * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10968,12 +14808,12 @@ public APIgetModeratorsRequest skip(@javax.annotation.Nullable Double skip) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getModeratorsCall(tenantId, skip, _callback); + return getPollVoteCall(tenantId, id, _callback); } /** - * Execute getModerators request - * @return GetModeratorsResponse + * Execute getPollVote request + * @return GetPollVoteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10983,14 +14823,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetModeratorsResponse execute() throws ApiException { - ApiResponse localVarResp = getModeratorsWithHttpInfo(tenantId, skip); + public GetPollVoteResponse execute() throws ApiException { + ApiResponse localVarResp = getPollVoteWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getModerators request with HTTP info returned - * @return ApiResponse<GetModeratorsResponse> + * Execute getPollVote request with HTTP info returned + * @return ApiResponse<GetPollVoteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -11000,12 +14840,12 @@ public GetModeratorsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getModeratorsWithHttpInfo(tenantId, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPollVoteWithHttpInfo(tenantId, id); } /** - * Execute getModerators request (asynchronously) + * Execute getPollVote request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -11017,8 +14857,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExcept 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getModeratorsAsync(tenantId, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPollVoteAsync(tenantId, id, _callback); } } @@ -11026,7 +14866,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callb * * * @param tenantId (required) - * @return APIgetModeratorsRequest + * @param id (required) + * @return APIgetPollVoteRequest * @http.response.details @@ -11035,10 +14876,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callb
Response Details
0 Error -
*/ - public APIgetModeratorsRequest getModerators(@javax.annotation.Nonnull String tenantId) { - return new APIgetModeratorsRequest(tenantId); + public APIgetPollVoteRequest getPollVote(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetPollVoteRequest(tenantId, id); } - private okhttp3.Call getNotificationCountCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPollVotesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nullable String voterId, @javax.annotation.Nullable String optionId, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -11055,7 +14896,7 @@ private okhttp3.Call getNotificationCountCall(@javax.annotation.Nonnull String t Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/notifications/count"; + String localVarPath = "/api/v1/poll-votes"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -11067,24 +14908,20 @@ private okhttp3.Call getNotificationCountCall(@javax.annotation.Nonnull String t localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - if (urlId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + if (commentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("commentId", commentId)); } - if (fromCommentId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromCommentId", fromCommentId)); + if (voterId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("voterId", voterId)); } - if (viewed != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("viewed", viewed)); + if (optionId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("optionId", optionId)); } - if (type != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); } final String[] localVarAccepts = { @@ -11107,101 +14944,85 @@ private okhttp3.Call getNotificationCountCall(@javax.annotation.Nonnull String t } @SuppressWarnings("rawtypes") - private okhttp3.Call getNotificationCountValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPollVotesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nullable String voterId, @javax.annotation.Nullable String optionId, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getNotificationCount(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getPollVotes(Async)"); } - return getNotificationCountCall(tenantId, userId, urlId, fromCommentId, viewed, type, _callback); + // verify the required parameter 'commentId' is set + if (commentId == null) { + throw new ApiException("Missing the required parameter 'commentId' when calling getPollVotes(Async)"); + } + + return getPollVotesCall(tenantId, commentId, voterId, optionId, skip, _callback); } - private ApiResponse getNotificationCountWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type) throws ApiException { - okhttp3.Call localVarCall = getNotificationCountValidateBeforeCall(tenantId, userId, urlId, fromCommentId, viewed, type, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getPollVotesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nullable String voterId, @javax.annotation.Nullable String optionId, @javax.annotation.Nullable Integer skip) throws ApiException { + okhttp3.Call localVarCall = getPollVotesValidateBeforeCall(tenantId, commentId, voterId, optionId, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getNotificationCountAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPollVotesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nullable String voterId, @javax.annotation.Nullable String optionId, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getNotificationCountValidateBeforeCall(tenantId, userId, urlId, fromCommentId, viewed, type, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getPollVotesValidateBeforeCall(tenantId, commentId, voterId, optionId, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetNotificationCountRequest { + public class APIgetPollVotesRequest { @javax.annotation.Nonnull private final String tenantId; + @javax.annotation.Nonnull + private final String commentId; @javax.annotation.Nullable - private String userId; - @javax.annotation.Nullable - private String urlId; - @javax.annotation.Nullable - private String fromCommentId; + private String voterId; @javax.annotation.Nullable - private Boolean viewed; + private String optionId; @javax.annotation.Nullable - private String type; + private Integer skip; - private APIgetNotificationCountRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetPollVotesRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId) { this.tenantId = tenantId; + this.commentId = commentId; } /** - * Set userId - * @param userId (optional) - * @return APIgetNotificationCountRequest - */ - public APIgetNotificationCountRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; - return this; - } - - /** - * Set urlId - * @param urlId (optional) - * @return APIgetNotificationCountRequest - */ - public APIgetNotificationCountRequest urlId(@javax.annotation.Nullable String urlId) { - this.urlId = urlId; - return this; - } - - /** - * Set fromCommentId - * @param fromCommentId (optional) - * @return APIgetNotificationCountRequest + * Set voterId + * @param voterId (optional) + * @return APIgetPollVotesRequest */ - public APIgetNotificationCountRequest fromCommentId(@javax.annotation.Nullable String fromCommentId) { - this.fromCommentId = fromCommentId; + public APIgetPollVotesRequest voterId(@javax.annotation.Nullable String voterId) { + this.voterId = voterId; return this; } /** - * Set viewed - * @param viewed (optional) - * @return APIgetNotificationCountRequest + * Set optionId + * @param optionId (optional) + * @return APIgetPollVotesRequest */ - public APIgetNotificationCountRequest viewed(@javax.annotation.Nullable Boolean viewed) { - this.viewed = viewed; + public APIgetPollVotesRequest optionId(@javax.annotation.Nullable String optionId) { + this.optionId = optionId; return this; } /** - * Set type - * @param type (optional) - * @return APIgetNotificationCountRequest + * Set skip + * @param skip (optional) + * @return APIgetPollVotesRequest */ - public APIgetNotificationCountRequest type(@javax.annotation.Nullable String type) { - this.type = type; + public APIgetPollVotesRequest skip(@javax.annotation.Nullable Integer skip) { + this.skip = skip; return this; } /** - * Build call for getNotificationCount + * Build call for getPollVotes * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -11214,12 +15035,12 @@ public APIgetNotificationCountRequest type(@javax.annotation.Nullable String typ */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getNotificationCountCall(tenantId, userId, urlId, fromCommentId, viewed, type, _callback); + return getPollVotesCall(tenantId, commentId, voterId, optionId, skip, _callback); } /** - * Execute getNotificationCount request - * @return GetNotificationCountResponse + * Execute getPollVotes request + * @return GetPollVotesResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -11229,14 +15050,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetNotificationCountResponse execute() throws ApiException { - ApiResponse localVarResp = getNotificationCountWithHttpInfo(tenantId, userId, urlId, fromCommentId, viewed, type); + public GetPollVotesResponse execute() throws ApiException { + ApiResponse localVarResp = getPollVotesWithHttpInfo(tenantId, commentId, voterId, optionId, skip); return localVarResp.getData(); } /** - * Execute getNotificationCount request with HTTP info returned - * @return ApiResponse<GetNotificationCountResponse> + * Execute getPollVotes request with HTTP info returned + * @return ApiResponse<GetPollVotesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -11246,12 +15067,12 @@ public GetNotificationCountResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getNotificationCountWithHttpInfo(tenantId, userId, urlId, fromCommentId, viewed, type); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPollVotesWithHttpInfo(tenantId, commentId, voterId, optionId, skip); } /** - * Execute getNotificationCount request (asynchronously) + * Execute getPollVotes request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -11263,16 +15084,17 @@ public ApiResponse executeWithHttpInfo() throws Ap 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getNotificationCountAsync(tenantId, userId, urlId, fromCommentId, viewed, type, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPollVotesAsync(tenantId, commentId, voterId, optionId, skip, _callback); } } /** * - * + * The individual votes behind one poll's tallies, oldest first. A poll belongs to a comment, so votes are always read one poll at a time - commentId is required. That keeps every query on the indexes the collection already has. Obeys the poll's privacy: an anonymous poll's votes cannot be read (poll-anonymous), here or by id. * @param tenantId (required) - * @return APIgetNotificationCountRequest + * @param commentId (required) + * @return APIgetPollVotesRequest * @http.response.details @@ -11281,10 +15103,10 @@ public okhttp3.Call executeAsync(final ApiCallback
Response Details
0 Error -
*/ - public APIgetNotificationCountRequest getNotificationCount(@javax.annotation.Nonnull String tenantId) { - return new APIgetNotificationCountRequest(tenantId); + public APIgetPollVotesRequest getPollVotes(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId) { + return new APIgetPollVotesRequest(tenantId, commentId); } - private okhttp3.Call getNotificationsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -11301,7 +15123,8 @@ private okhttp3.Call getNotificationsCall(@javax.annotation.Nonnull String tenan Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/notifications"; + String localVarPath = "/api/v1/question-configs/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -11313,30 +15136,6 @@ private okhttp3.Call getNotificationsCall(@javax.annotation.Nonnull String tenan localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - if (urlId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); - } - - if (fromCommentId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromCommentId", fromCommentId)); - } - - if (viewed != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("viewed", viewed)); - } - - if (type != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); - } - - if (skip != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); - } - final String[] localVarAccepts = { "application/json" }; @@ -11357,113 +15156,49 @@ private okhttp3.Call getNotificationsCall(@javax.annotation.Nonnull String tenan } @SuppressWarnings("rawtypes") - private okhttp3.Call getNotificationsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getNotifications(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getQuestionConfig(Async)"); } - return getNotificationsCall(tenantId, userId, urlId, fromCommentId, viewed, type, skip, _callback); - - } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getQuestionConfig(Async)"); + } + return getQuestionConfigCall(tenantId, id, _callback); - private ApiResponse getNotificationsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(tenantId, userId, urlId, fromCommentId, viewed, type, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getNotificationsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String fromCommentId, @javax.annotation.Nullable Boolean viewed, @javax.annotation.Nullable String type, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(tenantId, userId, urlId, fromCommentId, viewed, type, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + private ApiResponse getQuestionConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getQuestionConfigValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } - public class APIgetNotificationsRequest { - @javax.annotation.Nonnull - private final String tenantId; - @javax.annotation.Nullable - private String userId; - @javax.annotation.Nullable - private String urlId; - @javax.annotation.Nullable - private String fromCommentId; - @javax.annotation.Nullable - private Boolean viewed; - @javax.annotation.Nullable - private String type; - @javax.annotation.Nullable - private Double skip; - - private APIgetNotificationsRequest(@javax.annotation.Nonnull String tenantId) { - this.tenantId = tenantId; - } - - /** - * Set userId - * @param userId (optional) - * @return APIgetNotificationsRequest - */ - public APIgetNotificationsRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; - return this; - } - - /** - * Set urlId - * @param urlId (optional) - * @return APIgetNotificationsRequest - */ - public APIgetNotificationsRequest urlId(@javax.annotation.Nullable String urlId) { - this.urlId = urlId; - return this; - } - - /** - * Set fromCommentId - * @param fromCommentId (optional) - * @return APIgetNotificationsRequest - */ - public APIgetNotificationsRequest fromCommentId(@javax.annotation.Nullable String fromCommentId) { - this.fromCommentId = fromCommentId; - return this; - } + private okhttp3.Call getQuestionConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - /** - * Set viewed - * @param viewed (optional) - * @return APIgetNotificationsRequest - */ - public APIgetNotificationsRequest viewed(@javax.annotation.Nullable Boolean viewed) { - this.viewed = viewed; - return this; - } + okhttp3.Call localVarCall = getQuestionConfigValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } - /** - * Set type - * @param type (optional) - * @return APIgetNotificationsRequest - */ - public APIgetNotificationsRequest type(@javax.annotation.Nullable String type) { - this.type = type; - return this; - } + public class APIgetQuestionConfigRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String id; - /** - * Set skip - * @param skip (optional) - * @return APIgetNotificationsRequest - */ - public APIgetNotificationsRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; - return this; + private APIgetQuestionConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + this.tenantId = tenantId; + this.id = id; } /** - * Build call for getNotifications + * Build call for getQuestionConfig * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -11476,12 +15211,12 @@ public APIgetNotificationsRequest skip(@javax.annotation.Nullable Double skip) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getNotificationsCall(tenantId, userId, urlId, fromCommentId, viewed, type, skip, _callback); + return getQuestionConfigCall(tenantId, id, _callback); } /** - * Execute getNotifications request - * @return GetNotificationsResponse + * Execute getQuestionConfig request + * @return GetQuestionConfigResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -11491,14 +15226,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetNotificationsResponse execute() throws ApiException { - ApiResponse localVarResp = getNotificationsWithHttpInfo(tenantId, userId, urlId, fromCommentId, viewed, type, skip); + public GetQuestionConfigResponse execute() throws ApiException { + ApiResponse localVarResp = getQuestionConfigWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getNotifications request with HTTP info returned - * @return ApiResponse<GetNotificationsResponse> + * Execute getQuestionConfig request with HTTP info returned + * @return ApiResponse<GetQuestionConfigResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -11508,12 +15243,12 @@ public GetNotificationsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getNotificationsWithHttpInfo(tenantId, userId, urlId, fromCommentId, viewed, type, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getQuestionConfigWithHttpInfo(tenantId, id); } /** - * Execute getNotifications request (asynchronously) + * Execute getQuestionConfig request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -11525,8 +15260,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExc 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getNotificationsAsync(tenantId, userId, urlId, fromCommentId, viewed, type, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getQuestionConfigAsync(tenantId, id, _callback); } } @@ -11534,7 +15269,8 @@ public okhttp3.Call executeAsync(final ApiCallback _ca * * * @param tenantId (required) - * @return APIgetNotificationsRequest + * @param id (required) + * @return APIgetQuestionConfigRequest * @http.response.details @@ -11543,10 +15279,10 @@ public okhttp3.Call executeAsync(final ApiCallback _ca
Response Details
0 Error -
*/ - public APIgetNotificationsRequest getNotifications(@javax.annotation.Nonnull String tenantId) { - return new APIgetNotificationsRequest(tenantId); + public APIgetQuestionConfigRequest getQuestionConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetQuestionConfigRequest(tenantId, id); } - private okhttp3.Call getPageByURLIdCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionConfigsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -11563,7 +15299,7 @@ private okhttp3.Call getPageByURLIdCall(@javax.annotation.Nonnull String tenantI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/pages/by-url-id"; + String localVarPath = "/api/v1/question-configs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -11575,8 +15311,8 @@ private okhttp3.Call getPageByURLIdCall(@javax.annotation.Nonnull String tenantI localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (urlId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); } final String[] localVarAccepts = { @@ -11599,49 +15335,53 @@ private okhttp3.Call getPageByURLIdCall(@javax.annotation.Nonnull String tenantI } @SuppressWarnings("rawtypes") - private okhttp3.Call getPageByURLIdValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionConfigsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getPageByURLId(Async)"); - } - - // verify the required parameter 'urlId' is set - if (urlId == null) { - throw new ApiException("Missing the required parameter 'urlId' when calling getPageByURLId(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getQuestionConfigs(Async)"); } - return getPageByURLIdCall(tenantId, urlId, _callback); + return getQuestionConfigsCall(tenantId, skip, _callback); } - private ApiResponse getPageByURLIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) throws ApiException { - okhttp3.Call localVarCall = getPageByURLIdValidateBeforeCall(tenantId, urlId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getQuestionConfigsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getQuestionConfigsValidateBeforeCall(tenantId, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getPageByURLIdAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionConfigsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getPageByURLIdValidateBeforeCall(tenantId, urlId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getQuestionConfigsValidateBeforeCall(tenantId, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetPageByURLIdRequest { + public class APIgetQuestionConfigsRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nonnull - private final String urlId; + @javax.annotation.Nullable + private Double skip; - private APIgetPageByURLIdRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + private APIgetQuestionConfigsRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; - this.urlId = urlId; } /** - * Build call for getPageByURLId + * Set skip + * @param skip (optional) + * @return APIgetQuestionConfigsRequest + */ + public APIgetQuestionConfigsRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; + return this; + } + + /** + * Build call for getQuestionConfigs * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -11650,45 +15390,48 @@ private APIgetPageByURLIdRequest(@javax.annotation.Nonnull String tenantId, @jav Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getPageByURLIdCall(tenantId, urlId, _callback); + return getQuestionConfigsCall(tenantId, skip, _callback); } /** - * Execute getPageByURLId request - * @return GetPageByURLIdAPIResponse + * Execute getQuestionConfigs request + * @return GetQuestionConfigsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetPageByURLIdAPIResponse execute() throws ApiException { - ApiResponse localVarResp = getPageByURLIdWithHttpInfo(tenantId, urlId); + public GetQuestionConfigsResponse execute() throws ApiException { + ApiResponse localVarResp = getQuestionConfigsWithHttpInfo(tenantId, skip); return localVarResp.getData(); } /** - * Execute getPageByURLId request with HTTP info returned - * @return ApiResponse<GetPageByURLIdAPIResponse> + * Execute getQuestionConfigs request with HTTP info returned + * @return ApiResponse<GetQuestionConfigsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getPageByURLIdWithHttpInfo(tenantId, urlId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getQuestionConfigsWithHttpInfo(tenantId, skip); } /** - * Execute getPageByURLId request (asynchronously) + * Execute getQuestionConfigs request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -11697,10 +15440,11 @@ public ApiResponse executeWithHttpInfo() throws ApiEx Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getPageByURLIdAsync(tenantId, urlId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getQuestionConfigsAsync(tenantId, skip, _callback); } } @@ -11708,19 +15452,19 @@ public okhttp3.Call executeAsync(final ApiCallback _c * * * @param tenantId (required) - * @param urlId (required) - * @return APIgetPageByURLIdRequest + * @return APIgetQuestionConfigsRequest * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetPageByURLIdRequest getPageByURLId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { - return new APIgetPageByURLIdRequest(tenantId, urlId); + public APIgetQuestionConfigsRequest getQuestionConfigs(@javax.annotation.Nonnull String tenantId) { + return new APIgetQuestionConfigsRequest(tenantId); } - private okhttp3.Call getPagesCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionResultCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -11737,7 +15481,8 @@ private okhttp3.Call getPagesCall(@javax.annotation.Nonnull String tenantId, fin Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/pages"; + String localVarPath = "/api/v1/question-results/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -11769,41 +15514,49 @@ private okhttp3.Call getPagesCall(@javax.annotation.Nonnull String tenantId, fin } @SuppressWarnings("rawtypes") - private okhttp3.Call getPagesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionResultValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getPages(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getQuestionResult(Async)"); } - return getPagesCall(tenantId, _callback); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getQuestionResult(Async)"); + } + + return getQuestionResultCall(tenantId, id, _callback); } - private ApiResponse getPagesWithHttpInfo(@javax.annotation.Nonnull String tenantId) throws ApiException { - okhttp3.Call localVarCall = getPagesValidateBeforeCall(tenantId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getQuestionResultWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getQuestionResultValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getPagesAsync(@javax.annotation.Nonnull String tenantId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionResultAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getPagesValidateBeforeCall(tenantId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getQuestionResultValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetPagesRequest { + public class APIgetQuestionResultRequest { @javax.annotation.Nonnull private final String tenantId; + @javax.annotation.Nonnull + private final String id; - private APIgetPagesRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetQuestionResultRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; + this.id = id; } /** - * Build call for getPages + * Build call for getQuestionResult * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -11812,45 +15565,48 @@ private APIgetPagesRequest(@javax.annotation.Nonnull String tenantId) { Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getPagesCall(tenantId, _callback); + return getQuestionResultCall(tenantId, id, _callback); } /** - * Execute getPages request - * @return GetPagesAPIResponse + * Execute getQuestionResult request + * @return GetQuestionResultResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetPagesAPIResponse execute() throws ApiException { - ApiResponse localVarResp = getPagesWithHttpInfo(tenantId); + public GetQuestionResultResponse execute() throws ApiException { + ApiResponse localVarResp = getQuestionResultWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getPages request with HTTP info returned - * @return ApiResponse<GetPagesAPIResponse> + * Execute getQuestionResult request with HTTP info returned + * @return ApiResponse<GetQuestionResultResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getPagesWithHttpInfo(tenantId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getQuestionResultWithHttpInfo(tenantId, id); } /** - * Execute getPages request (asynchronously) + * Execute getQuestionResult request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -11859,10 +15615,11 @@ public ApiResponse executeWithHttpInfo() throws ApiExceptio Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getPagesAsync(tenantId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getQuestionResultAsync(tenantId, id, _callback); } } @@ -11870,18 +15627,20 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac * * * @param tenantId (required) - * @return APIgetPagesRequest + * @param id (required) + * @return APIgetQuestionResultRequest * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetPagesRequest getPages(@javax.annotation.Nonnull String tenantId) { - return new APIgetPagesRequest(tenantId); + public APIgetQuestionResultRequest getQuestionResult(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetQuestionResultRequest(tenantId, id); } - private okhttp3.Call getPendingWebhookEventCountCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionResultsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String startDate, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable String questionIds, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -11898,7 +15657,7 @@ private okhttp3.Call getPendingWebhookEventCountCall(@javax.annotation.Nonnull S Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/pending-webhook-events/count"; + String localVarPath = "/api/v1/question-results"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -11910,28 +15669,28 @@ private okhttp3.Call getPendingWebhookEventCountCall(@javax.annotation.Nonnull S localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (commentId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("commentId", commentId)); + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); } - if (externalId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("externalId", externalId)); + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); } - if (eventType != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("eventType", eventType)); + if (startDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); } - if (type != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + if (questionId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("questionId", questionId)); } - if (domain != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("domain", domain)); + if (questionIds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("questionIds", questionIds)); } - if (attemptCountGT != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("attemptCountGT", attemptCountGT)); + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); } final String[] localVarAccepts = { @@ -11954,113 +15713,113 @@ private okhttp3.Call getPendingWebhookEventCountCall(@javax.annotation.Nonnull S } @SuppressWarnings("rawtypes") - private okhttp3.Call getPendingWebhookEventCountValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionResultsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String startDate, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable String questionIds, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getPendingWebhookEventCount(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getQuestionResults(Async)"); } - return getPendingWebhookEventCountCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, _callback); + return getQuestionResultsCall(tenantId, urlId, userId, startDate, questionId, questionIds, skip, _callback); } - private ApiResponse getPendingWebhookEventCountWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT) throws ApiException { - okhttp3.Call localVarCall = getPendingWebhookEventCountValidateBeforeCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getQuestionResultsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String startDate, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable String questionIds, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getQuestionResultsValidateBeforeCall(tenantId, urlId, userId, startDate, questionId, questionIds, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getPendingWebhookEventCountAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQuestionResultsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String startDate, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable String questionIds, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getPendingWebhookEventCountValidateBeforeCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getQuestionResultsValidateBeforeCall(tenantId, urlId, userId, startDate, questionId, questionIds, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetPendingWebhookEventCountRequest { + public class APIgetQuestionResultsRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nullable - private String commentId; + private String urlId; @javax.annotation.Nullable - private String externalId; + private String userId; @javax.annotation.Nullable - private String eventType; + private String startDate; @javax.annotation.Nullable - private String type; + private String questionId; @javax.annotation.Nullable - private String domain; + private String questionIds; @javax.annotation.Nullable - private Double attemptCountGT; + private Double skip; - private APIgetPendingWebhookEventCountRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetQuestionResultsRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } /** - * Set commentId - * @param commentId (optional) - * @return APIgetPendingWebhookEventCountRequest + * Set urlId + * @param urlId (optional) + * @return APIgetQuestionResultsRequest */ - public APIgetPendingWebhookEventCountRequest commentId(@javax.annotation.Nullable String commentId) { - this.commentId = commentId; + public APIgetQuestionResultsRequest urlId(@javax.annotation.Nullable String urlId) { + this.urlId = urlId; return this; } /** - * Set externalId - * @param externalId (optional) - * @return APIgetPendingWebhookEventCountRequest + * Set userId + * @param userId (optional) + * @return APIgetQuestionResultsRequest */ - public APIgetPendingWebhookEventCountRequest externalId(@javax.annotation.Nullable String externalId) { - this.externalId = externalId; + public APIgetQuestionResultsRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; return this; } /** - * Set eventType - * @param eventType (optional) - * @return APIgetPendingWebhookEventCountRequest + * Set startDate + * @param startDate (optional) + * @return APIgetQuestionResultsRequest */ - public APIgetPendingWebhookEventCountRequest eventType(@javax.annotation.Nullable String eventType) { - this.eventType = eventType; + public APIgetQuestionResultsRequest startDate(@javax.annotation.Nullable String startDate) { + this.startDate = startDate; return this; } /** - * Set type - * @param type (optional) - * @return APIgetPendingWebhookEventCountRequest + * Set questionId + * @param questionId (optional) + * @return APIgetQuestionResultsRequest */ - public APIgetPendingWebhookEventCountRequest type(@javax.annotation.Nullable String type) { - this.type = type; + public APIgetQuestionResultsRequest questionId(@javax.annotation.Nullable String questionId) { + this.questionId = questionId; return this; } /** - * Set domain - * @param domain (optional) - * @return APIgetPendingWebhookEventCountRequest + * Set questionIds + * @param questionIds (optional) + * @return APIgetQuestionResultsRequest */ - public APIgetPendingWebhookEventCountRequest domain(@javax.annotation.Nullable String domain) { - this.domain = domain; + public APIgetQuestionResultsRequest questionIds(@javax.annotation.Nullable String questionIds) { + this.questionIds = questionIds; return this; } /** - * Set attemptCountGT - * @param attemptCountGT (optional) - * @return APIgetPendingWebhookEventCountRequest + * Set skip + * @param skip (optional) + * @return APIgetQuestionResultsRequest */ - public APIgetPendingWebhookEventCountRequest attemptCountGT(@javax.annotation.Nullable Double attemptCountGT) { - this.attemptCountGT = attemptCountGT; + public APIgetQuestionResultsRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; return this; } /** - * Build call for getPendingWebhookEventCount + * Build call for getQuestionResults * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -12073,12 +15832,12 @@ public APIgetPendingWebhookEventCountRequest attemptCountGT(@javax.annotation.Nu */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getPendingWebhookEventCountCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, _callback); + return getQuestionResultsCall(tenantId, urlId, userId, startDate, questionId, questionIds, skip, _callback); } /** - * Execute getPendingWebhookEventCount request - * @return GetPendingWebhookEventCountResponse + * Execute getQuestionResults request + * @return GetQuestionResultsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -12088,14 +15847,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetPendingWebhookEventCountResponse execute() throws ApiException { - ApiResponse localVarResp = getPendingWebhookEventCountWithHttpInfo(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT); + public GetQuestionResultsResponse execute() throws ApiException { + ApiResponse localVarResp = getQuestionResultsWithHttpInfo(tenantId, urlId, userId, startDate, questionId, questionIds, skip); return localVarResp.getData(); } /** - * Execute getPendingWebhookEventCount request with HTTP info returned - * @return ApiResponse<GetPendingWebhookEventCountResponse> + * Execute getQuestionResults request with HTTP info returned + * @return ApiResponse<GetQuestionResultsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -12105,12 +15864,12 @@ public GetPendingWebhookEventCountResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getPendingWebhookEventCountWithHttpInfo(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getQuestionResultsWithHttpInfo(tenantId, urlId, userId, startDate, questionId, questionIds, skip); } /** - * Execute getPendingWebhookEventCount request (asynchronously) + * Execute getQuestionResults request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -12122,8 +15881,8 @@ public ApiResponse executeWithHttpInfo() th 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getPendingWebhookEventCountAsync(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getQuestionResultsAsync(tenantId, urlId, userId, startDate, questionId, questionIds, skip, _callback); } } @@ -12131,7 +15890,7 @@ public okhttp3.Call executeAsync(final ApiCallback Response Details @@ -12140,10 +15899,10 @@ public okhttp3.Call executeAsync(final ApiCallback 0 Error - */ - public APIgetPendingWebhookEventCountRequest getPendingWebhookEventCount(@javax.annotation.Nonnull String tenantId) { - return new APIgetPendingWebhookEventCountRequest(tenantId); + public APIgetQuestionResultsRequest getQuestionResults(@javax.annotation.Nonnull String tenantId) { + return new APIgetQuestionResultsRequest(tenantId); } - private okhttp3.Call getPendingWebhookEventsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSSOUserByEmailCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -12160,185 +15919,82 @@ private okhttp3.Call getPendingWebhookEventsCall(@javax.annotation.Nonnull Strin Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/pending-webhook-events"; + String localVarPath = "/api/v1/sso-users/by-email/{email}" + .replace("{" + "email" + "}", localVarApiClient.escapeString(email.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (tenantId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); - } - - if (commentId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("commentId", commentId)); - } - - if (externalId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("externalId", externalId)); - } - - if (eventType != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("eventType", eventType)); - } - - if (type != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); - } - - if (domain != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("domain", domain)); - } - - if (attemptCountGT != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("attemptCountGT", attemptCountGT)); - } - - if (skip != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPendingWebhookEventsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'tenantId' is set - if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getPendingWebhookEvents(Async)"); - } - - return getPendingWebhookEventsCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, _callback); - - } - - - private ApiResponse getPendingWebhookEventsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getPendingWebhookEventsValidateBeforeCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - private okhttp3.Call getPendingWebhookEventsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String commentId, @javax.annotation.Nullable String externalId, @javax.annotation.Nullable String eventType, @javax.annotation.Nullable String type, @javax.annotation.Nullable String domain, @javax.annotation.Nullable Double attemptCountGT, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPendingWebhookEventsValidateBeforeCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - - public class APIgetPendingWebhookEventsRequest { - @javax.annotation.Nonnull - private final String tenantId; - @javax.annotation.Nullable - private String commentId; - @javax.annotation.Nullable - private String externalId; - @javax.annotation.Nullable - private String eventType; - @javax.annotation.Nullable - private String type; - @javax.annotation.Nullable - private String domain; - @javax.annotation.Nullable - private Double attemptCountGT; - @javax.annotation.Nullable - private Double skip; - - private APIgetPendingWebhookEventsRequest(@javax.annotation.Nonnull String tenantId) { - this.tenantId = tenantId; - } - - /** - * Set commentId - * @param commentId (optional) - * @return APIgetPendingWebhookEventsRequest - */ - public APIgetPendingWebhookEventsRequest commentId(@javax.annotation.Nullable String commentId) { - this.commentId = commentId; - return this; - } - - /** - * Set externalId - * @param externalId (optional) - * @return APIgetPendingWebhookEventsRequest - */ - public APIgetPendingWebhookEventsRequest externalId(@javax.annotation.Nullable String externalId) { - this.externalId = externalId; - return this; + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - /** - * Set eventType - * @param eventType (optional) - * @return APIgetPendingWebhookEventsRequest - */ - public APIgetPendingWebhookEventsRequest eventType(@javax.annotation.Nullable String eventType) { - this.eventType = eventType; - return this; + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); } - /** - * Set type - * @param type (optional) - * @return APIgetPendingWebhookEventsRequest - */ - public APIgetPendingWebhookEventsRequest type(@javax.annotation.Nullable String type) { - this.type = type; - return this; + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); } - /** - * Set domain - * @param domain (optional) - * @return APIgetPendingWebhookEventsRequest - */ - public APIgetPendingWebhookEventsRequest domain(@javax.annotation.Nullable String domain) { - this.domain = domain; - return this; + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getSSOUserByEmailValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getSSOUserByEmail(Async)"); } - /** - * Set attemptCountGT - * @param attemptCountGT (optional) - * @return APIgetPendingWebhookEventsRequest - */ - public APIgetPendingWebhookEventsRequest attemptCountGT(@javax.annotation.Nullable Double attemptCountGT) { - this.attemptCountGT = attemptCountGT; - return this; + // verify the required parameter 'email' is set + if (email == null) { + throw new ApiException("Missing the required parameter 'email' when calling getSSOUserByEmail(Async)"); } - /** - * Set skip - * @param skip (optional) - * @return APIgetPendingWebhookEventsRequest - */ - public APIgetPendingWebhookEventsRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; - return this; + return getSSOUserByEmailCall(tenantId, email, _callback); + + } + + + private ApiResponse getSSOUserByEmailWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email) throws ApiException { + okhttp3.Call localVarCall = getSSOUserByEmailValidateBeforeCall(tenantId, email, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getSSOUserByEmailAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getSSOUserByEmailValidateBeforeCall(tenantId, email, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetSSOUserByEmailRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String email; + + private APIgetSSOUserByEmailRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email) { + this.tenantId = tenantId; + this.email = email; } /** - * Build call for getPendingWebhookEvents + * Build call for getSSOUserByEmail * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -12347,48 +16003,45 @@ public APIgetPendingWebhookEventsRequest skip(@javax.annotation.Nullable Double Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getPendingWebhookEventsCall(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, _callback); + return getSSOUserByEmailCall(tenantId, email, _callback); } /** - * Execute getPendingWebhookEvents request - * @return GetPendingWebhookEventsResponse + * Execute getSSOUserByEmail request + * @return GetSSOUserByEmailAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetPendingWebhookEventsResponse execute() throws ApiException { - ApiResponse localVarResp = getPendingWebhookEventsWithHttpInfo(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip); + public GetSSOUserByEmailAPIResponse execute() throws ApiException { + ApiResponse localVarResp = getSSOUserByEmailWithHttpInfo(tenantId, email); return localVarResp.getData(); } /** - * Execute getPendingWebhookEvents request with HTTP info returned - * @return ApiResponse<GetPendingWebhookEventsResponse> + * Execute getSSOUserByEmail request with HTTP info returned + * @return ApiResponse<GetSSOUserByEmailAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getPendingWebhookEventsWithHttpInfo(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getSSOUserByEmailWithHttpInfo(tenantId, email); } /** - * Execute getPendingWebhookEvents request (asynchronously) + * Execute getSSOUserByEmail request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -12397,11 +16050,10 @@ public ApiResponse executeWithHttpInfo() throws Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getPendingWebhookEventsAsync(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getSSOUserByEmailAsync(tenantId, email, _callback); } } @@ -12409,19 +16061,19 @@ public okhttp3.Call executeAsync(final ApiCallback Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public APIgetPendingWebhookEventsRequest getPendingWebhookEvents(@javax.annotation.Nonnull String tenantId) { - return new APIgetPendingWebhookEventsRequest(tenantId); + public APIgetSSOUserByEmailRequest getSSOUserByEmail(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email) { + return new APIgetSSOUserByEmailRequest(tenantId, email); } - private okhttp3.Call getQuestionConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSSOUserByIdCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -12438,7 +16090,7 @@ private okhttp3.Call getQuestionConfigCall(@javax.annotation.Nonnull String tena Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/question-configs/{id}" + String localVarPath = "/api/v1/sso-users/by-id/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -12471,49 +16123,49 @@ private okhttp3.Call getQuestionConfigCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call getQuestionConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSSOUserByIdValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getQuestionConfig(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getSSOUserById(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getQuestionConfig(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling getSSOUserById(Async)"); } - return getQuestionConfigCall(tenantId, id, _callback); + return getSSOUserByIdCall(tenantId, id, _callback); } - private ApiResponse getQuestionConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getQuestionConfigValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getSSOUserByIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getSSOUserByIdValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getQuestionConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSSOUserByIdAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getQuestionConfigValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getSSOUserByIdValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetQuestionConfigRequest { + public class APIgetSSOUserByIdRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - private APIgetQuestionConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetSSOUserByIdRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for getQuestionConfig + * Build call for getSSOUserById * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -12522,48 +16174,45 @@ private APIgetQuestionConfigRequest(@javax.annotation.Nonnull String tenantId, @ Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getQuestionConfigCall(tenantId, id, _callback); + return getSSOUserByIdCall(tenantId, id, _callback); } /** - * Execute getQuestionConfig request - * @return GetQuestionConfigResponse + * Execute getSSOUserById request + * @return GetSSOUserByIdAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetQuestionConfigResponse execute() throws ApiException { - ApiResponse localVarResp = getQuestionConfigWithHttpInfo(tenantId, id); + public GetSSOUserByIdAPIResponse execute() throws ApiException { + ApiResponse localVarResp = getSSOUserByIdWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getQuestionConfig request with HTTP info returned - * @return ApiResponse<GetQuestionConfigResponse> + * Execute getSSOUserById request with HTTP info returned + * @return ApiResponse<GetSSOUserByIdAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getQuestionConfigWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getSSOUserByIdWithHttpInfo(tenantId, id); } /** - * Execute getQuestionConfig request (asynchronously) + * Execute getSSOUserById request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -12572,11 +16221,10 @@ public ApiResponse executeWithHttpInfo() throws ApiEx Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getQuestionConfigAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getSSOUserByIdAsync(tenantId, id, _callback); } } @@ -12585,19 +16233,18 @@ public okhttp3.Call executeAsync(final ApiCallback _c * * @param tenantId (required) * @param id (required) - * @return APIgetQuestionConfigRequest + * @return APIgetSSOUserByIdRequest * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetQuestionConfigRequest getQuestionConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetQuestionConfigRequest(tenantId, id); + public APIgetSSOUserByIdRequest getSSOUserById(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetSSOUserByIdRequest(tenantId, id); } - private okhttp3.Call getQuestionConfigsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSSOUsersCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -12614,7 +16261,7 @@ private okhttp3.Call getQuestionConfigsCall(@javax.annotation.Nonnull String ten Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/question-configs"; + String localVarPath = "/api/v1/sso-users"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -12650,53 +16297,53 @@ private okhttp3.Call getQuestionConfigsCall(@javax.annotation.Nonnull String ten } @SuppressWarnings("rawtypes") - private okhttp3.Call getQuestionConfigsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSSOUsersValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getQuestionConfigs(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getSSOUsers(Async)"); } - return getQuestionConfigsCall(tenantId, skip, _callback); + return getSSOUsersCall(tenantId, skip, _callback); } - private ApiResponse getQuestionConfigsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getQuestionConfigsValidateBeforeCall(tenantId, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getSSOUsersWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer skip) throws ApiException { + okhttp3.Call localVarCall = getSSOUsersValidateBeforeCall(tenantId, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getQuestionConfigsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSSOUsersAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getQuestionConfigsValidateBeforeCall(tenantId, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getSSOUsersValidateBeforeCall(tenantId, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetQuestionConfigsRequest { + public class APIgetSSOUsersRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nullable - private Double skip; + private Integer skip; - private APIgetQuestionConfigsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetSSOUsersRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } /** * Set skip * @param skip (optional) - * @return APIgetQuestionConfigsRequest + * @return APIgetSSOUsersRequest */ - public APIgetQuestionConfigsRequest skip(@javax.annotation.Nullable Double skip) { + public APIgetSSOUsersRequest skip(@javax.annotation.Nullable Integer skip) { this.skip = skip; return this; } /** - * Build call for getQuestionConfigs + * Build call for getSSOUsers * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -12705,48 +16352,45 @@ public APIgetQuestionConfigsRequest skip(@javax.annotation.Nullable Double skip) Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getQuestionConfigsCall(tenantId, skip, _callback); + return getSSOUsersCall(tenantId, skip, _callback); } /** - * Execute getQuestionConfigs request - * @return GetQuestionConfigsResponse + * Execute getSSOUsers request + * @return GetSSOUsersResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetQuestionConfigsResponse execute() throws ApiException { - ApiResponse localVarResp = getQuestionConfigsWithHttpInfo(tenantId, skip); + public GetSSOUsersResponse execute() throws ApiException { + ApiResponse localVarResp = getSSOUsersWithHttpInfo(tenantId, skip); return localVarResp.getData(); } /** - * Execute getQuestionConfigs request with HTTP info returned - * @return ApiResponse<GetQuestionConfigsResponse> + * Execute getSSOUsers request with HTTP info returned + * @return ApiResponse<GetSSOUsersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getQuestionConfigsWithHttpInfo(tenantId, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getSSOUsersWithHttpInfo(tenantId, skip); } /** - * Execute getQuestionConfigs request (asynchronously) + * Execute getSSOUsers request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -12755,11 +16399,10 @@ public ApiResponse executeWithHttpInfo() throws ApiE Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getQuestionConfigsAsync(tenantId, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getSSOUsersAsync(tenantId, skip, _callback); } } @@ -12767,19 +16410,18 @@ public okhttp3.Call executeAsync(final ApiCallback _ * * * @param tenantId (required) - * @return APIgetQuestionConfigsRequest + * @return APIgetSSOUsersRequest * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetQuestionConfigsRequest getQuestionConfigs(@javax.annotation.Nonnull String tenantId) { - return new APIgetQuestionConfigsRequest(tenantId); + public APIgetSSOUsersRequest getSSOUsers(@javax.annotation.Nonnull String tenantId) { + return new APIgetSSOUsersRequest(tenantId); } - private okhttp3.Call getQuestionResultCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSubscriptionsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -12796,8 +16438,7 @@ private okhttp3.Call getQuestionResultCall(@javax.annotation.Nonnull String tena Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/question-results/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/subscriptions"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -12809,6 +16450,10 @@ private okhttp3.Call getQuestionResultCall(@javax.annotation.Nonnull String tena localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + final String[] localVarAccepts = { "application/json" }; @@ -12829,49 +16474,53 @@ private okhttp3.Call getQuestionResultCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call getQuestionResultValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSubscriptionsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getQuestionResult(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getQuestionResult(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getSubscriptions(Async)"); } - return getQuestionResultCall(tenantId, id, _callback); + return getSubscriptionsCall(tenantId, userId, _callback); } - private ApiResponse getQuestionResultWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getQuestionResultValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getSubscriptionsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId) throws ApiException { + okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(tenantId, userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getQuestionResultAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getSubscriptionsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getQuestionResultValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(tenantId, userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetQuestionResultRequest { + public class APIgetSubscriptionsRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nonnull - private final String id; + @javax.annotation.Nullable + private String userId; - private APIgetQuestionResultRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetSubscriptionsRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; - this.id = id; } /** - * Build call for getQuestionResult + * Set userId + * @param userId (optional) + * @return APIgetSubscriptionsRequest + */ + public APIgetSubscriptionsRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Build call for getSubscriptions * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -12880,48 +16529,45 @@ private APIgetQuestionResultRequest(@javax.annotation.Nonnull String tenantId, @ Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getQuestionResultCall(tenantId, id, _callback); + return getSubscriptionsCall(tenantId, userId, _callback); } /** - * Execute getQuestionResult request - * @return GetQuestionResultResponse + * Execute getSubscriptions request + * @return GetSubscriptionsAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetQuestionResultResponse execute() throws ApiException { - ApiResponse localVarResp = getQuestionResultWithHttpInfo(tenantId, id); + public GetSubscriptionsAPIResponse execute() throws ApiException { + ApiResponse localVarResp = getSubscriptionsWithHttpInfo(tenantId, userId); return localVarResp.getData(); } /** - * Execute getQuestionResult request with HTTP info returned - * @return ApiResponse<GetQuestionResultResponse> + * Execute getSubscriptions request with HTTP info returned + * @return ApiResponse<GetSubscriptionsAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getQuestionResultWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getSubscriptionsWithHttpInfo(tenantId, userId); } /** - * Execute getQuestionResult request (asynchronously) + * Execute getSubscriptions request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -12930,11 +16576,10 @@ public ApiResponse executeWithHttpInfo() throws ApiEx Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getQuestionResultAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getSubscriptionsAsync(tenantId, userId, _callback); } } @@ -12942,20 +16587,18 @@ public okhttp3.Call executeAsync(final ApiCallback _c * * * @param tenantId (required) - * @param id (required) - * @return APIgetQuestionResultRequest + * @return APIgetSubscriptionsRequest * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetQuestionResultRequest getQuestionResult(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetQuestionResultRequest(tenantId, id); + public APIgetSubscriptionsRequest getSubscriptions(@javax.annotation.Nonnull String tenantId) { + return new APIgetSubscriptionsRequest(tenantId); } - private okhttp3.Call getQuestionResultsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String startDate, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable String questionIds, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -12972,7 +16615,8 @@ private okhttp3.Call getQuestionResultsCall(@javax.annotation.Nonnull String ten Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/question-results"; + String localVarPath = "/api/v1/tenants/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -12984,30 +16628,6 @@ private okhttp3.Call getQuestionResultsCall(@javax.annotation.Nonnull String ten localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (urlId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - if (startDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); - } - - if (questionId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("questionId", questionId)); - } - - if (questionIds != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("questionIds", questionIds)); - } - - if (skip != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); - } - final String[] localVarAccepts = { "application/json" }; @@ -13028,113 +16648,49 @@ private okhttp3.Call getQuestionResultsCall(@javax.annotation.Nonnull String ten } @SuppressWarnings("rawtypes") - private okhttp3.Call getQuestionResultsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String startDate, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable String questionIds, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getQuestionResults(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getTenant(Async)"); } - return getQuestionResultsCall(tenantId, urlId, userId, startDate, questionId, questionIds, skip, _callback); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getTenant(Async)"); + } + + return getTenantCall(tenantId, id, _callback); } - private ApiResponse getQuestionResultsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String startDate, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable String questionIds, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getQuestionResultsValidateBeforeCall(tenantId, urlId, userId, startDate, questionId, questionIds, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getTenantWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getTenantValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getQuestionResultsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String startDate, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable String questionIds, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getQuestionResultsValidateBeforeCall(tenantId, urlId, userId, startDate, questionId, questionIds, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getTenantValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetQuestionResultsRequest { + public class APIgetTenantRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nullable - private String urlId; - @javax.annotation.Nullable - private String userId; - @javax.annotation.Nullable - private String startDate; - @javax.annotation.Nullable - private String questionId; - @javax.annotation.Nullable - private String questionIds; - @javax.annotation.Nullable - private Double skip; + @javax.annotation.Nonnull + private final String id; - private APIgetQuestionResultsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetTenantRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; + this.id = id; } /** - * Set urlId - * @param urlId (optional) - * @return APIgetQuestionResultsRequest - */ - public APIgetQuestionResultsRequest urlId(@javax.annotation.Nullable String urlId) { - this.urlId = urlId; - return this; - } - - /** - * Set userId - * @param userId (optional) - * @return APIgetQuestionResultsRequest - */ - public APIgetQuestionResultsRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; - return this; - } - - /** - * Set startDate - * @param startDate (optional) - * @return APIgetQuestionResultsRequest - */ - public APIgetQuestionResultsRequest startDate(@javax.annotation.Nullable String startDate) { - this.startDate = startDate; - return this; - } - - /** - * Set questionId - * @param questionId (optional) - * @return APIgetQuestionResultsRequest - */ - public APIgetQuestionResultsRequest questionId(@javax.annotation.Nullable String questionId) { - this.questionId = questionId; - return this; - } - - /** - * Set questionIds - * @param questionIds (optional) - * @return APIgetQuestionResultsRequest - */ - public APIgetQuestionResultsRequest questionIds(@javax.annotation.Nullable String questionIds) { - this.questionIds = questionIds; - return this; - } - - /** - * Set skip - * @param skip (optional) - * @return APIgetQuestionResultsRequest - */ - public APIgetQuestionResultsRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; - return this; - } - - /** - * Build call for getQuestionResults + * Build call for getTenant * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -13147,12 +16703,12 @@ public APIgetQuestionResultsRequest skip(@javax.annotation.Nullable Double skip) */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getQuestionResultsCall(tenantId, urlId, userId, startDate, questionId, questionIds, skip, _callback); + return getTenantCall(tenantId, id, _callback); } /** - * Execute getQuestionResults request - * @return GetQuestionResultsResponse + * Execute getTenant request + * @return GetTenantResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -13162,14 +16718,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetQuestionResultsResponse execute() throws ApiException { - ApiResponse localVarResp = getQuestionResultsWithHttpInfo(tenantId, urlId, userId, startDate, questionId, questionIds, skip); + public GetTenantResponse execute() throws ApiException { + ApiResponse localVarResp = getTenantWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getQuestionResults request with HTTP info returned - * @return ApiResponse<GetQuestionResultsResponse> + * Execute getTenant request with HTTP info returned + * @return ApiResponse<GetTenantResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -13179,12 +16735,12 @@ public GetQuestionResultsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getQuestionResultsWithHttpInfo(tenantId, urlId, userId, startDate, questionId, questionIds, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTenantWithHttpInfo(tenantId, id); } /** - * Execute getQuestionResults request (asynchronously) + * Execute getTenant request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -13196,8 +16752,8 @@ public ApiResponse executeWithHttpInfo() throws ApiE 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getQuestionResultsAsync(tenantId, urlId, userId, startDate, questionId, questionIds, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTenantAsync(tenantId, id, _callback); } } @@ -13205,7 +16761,8 @@ public okhttp3.Call executeAsync(final ApiCallback _ * * * @param tenantId (required) - * @return APIgetQuestionResultsRequest + * @param id (required) + * @return APIgetTenantRequest * @http.response.details @@ -13214,10 +16771,10 @@ public okhttp3.Call executeAsync(final ApiCallback _
Response Details
0 Error -
*/ - public APIgetQuestionResultsRequest getQuestionResults(@javax.annotation.Nonnull String tenantId) { - return new APIgetQuestionResultsRequest(tenantId); + public APIgetTenantRequest getTenant(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetTenantRequest(tenantId, id); } - private okhttp3.Call getSSOUserByEmailCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantDailyUsagesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double yearNumber, @javax.annotation.Nullable Double monthNumber, @javax.annotation.Nullable Double dayNumber, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -13234,8 +16791,7 @@ private okhttp3.Call getSSOUserByEmailCall(@javax.annotation.Nonnull String tena Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/sso-users/by-email/{email}" - .replace("{" + "email" + "}", localVarApiClient.escapeString(email.toString())); + String localVarPath = "/api/v1/tenant-daily-usage"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -13247,6 +16803,22 @@ private okhttp3.Call getSSOUserByEmailCall(@javax.annotation.Nonnull String tena localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (yearNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("yearNumber", yearNumber)); + } + + if (monthNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("monthNumber", monthNumber)); + } + + if (dayNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dayNumber", dayNumber)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + final String[] localVarAccepts = { "application/json" }; @@ -13267,49 +16839,89 @@ private okhttp3.Call getSSOUserByEmailCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call getSSOUserByEmailValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantDailyUsagesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double yearNumber, @javax.annotation.Nullable Double monthNumber, @javax.annotation.Nullable Double dayNumber, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getSSOUserByEmail(Async)"); - } - - // verify the required parameter 'email' is set - if (email == null) { - throw new ApiException("Missing the required parameter 'email' when calling getSSOUserByEmail(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantDailyUsages(Async)"); } - return getSSOUserByEmailCall(tenantId, email, _callback); + return getTenantDailyUsagesCall(tenantId, yearNumber, monthNumber, dayNumber, skip, _callback); } - private ApiResponse getSSOUserByEmailWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email) throws ApiException { - okhttp3.Call localVarCall = getSSOUserByEmailValidateBeforeCall(tenantId, email, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getTenantDailyUsagesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double yearNumber, @javax.annotation.Nullable Double monthNumber, @javax.annotation.Nullable Double dayNumber, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getTenantDailyUsagesValidateBeforeCall(tenantId, yearNumber, monthNumber, dayNumber, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getSSOUserByEmailAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantDailyUsagesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double yearNumber, @javax.annotation.Nullable Double monthNumber, @javax.annotation.Nullable Double dayNumber, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getSSOUserByEmailValidateBeforeCall(tenantId, email, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getTenantDailyUsagesValidateBeforeCall(tenantId, yearNumber, monthNumber, dayNumber, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetSSOUserByEmailRequest { + public class APIgetTenantDailyUsagesRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nonnull - private final String email; + @javax.annotation.Nullable + private Double yearNumber; + @javax.annotation.Nullable + private Double monthNumber; + @javax.annotation.Nullable + private Double dayNumber; + @javax.annotation.Nullable + private Double skip; - private APIgetSSOUserByEmailRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email) { + private APIgetTenantDailyUsagesRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; - this.email = email; } /** - * Build call for getSSOUserByEmail + * Set yearNumber + * @param yearNumber (optional) + * @return APIgetTenantDailyUsagesRequest + */ + public APIgetTenantDailyUsagesRequest yearNumber(@javax.annotation.Nullable Double yearNumber) { + this.yearNumber = yearNumber; + return this; + } + + /** + * Set monthNumber + * @param monthNumber (optional) + * @return APIgetTenantDailyUsagesRequest + */ + public APIgetTenantDailyUsagesRequest monthNumber(@javax.annotation.Nullable Double monthNumber) { + this.monthNumber = monthNumber; + return this; + } + + /** + * Set dayNumber + * @param dayNumber (optional) + * @return APIgetTenantDailyUsagesRequest + */ + public APIgetTenantDailyUsagesRequest dayNumber(@javax.annotation.Nullable Double dayNumber) { + this.dayNumber = dayNumber; + return this; + } + + /** + * Set skip + * @param skip (optional) + * @return APIgetTenantDailyUsagesRequest + */ + public APIgetTenantDailyUsagesRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; + return this; + } + + /** + * Build call for getTenantDailyUsages * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -13318,45 +16930,48 @@ private APIgetSSOUserByEmailRequest(@javax.annotation.Nonnull String tenantId, @ Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getSSOUserByEmailCall(tenantId, email, _callback); + return getTenantDailyUsagesCall(tenantId, yearNumber, monthNumber, dayNumber, skip, _callback); } /** - * Execute getSSOUserByEmail request - * @return GetSSOUserByEmailAPIResponse + * Execute getTenantDailyUsages request + * @return GetTenantDailyUsagesResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetSSOUserByEmailAPIResponse execute() throws ApiException { - ApiResponse localVarResp = getSSOUserByEmailWithHttpInfo(tenantId, email); + public GetTenantDailyUsagesResponse execute() throws ApiException { + ApiResponse localVarResp = getTenantDailyUsagesWithHttpInfo(tenantId, yearNumber, monthNumber, dayNumber, skip); return localVarResp.getData(); } /** - * Execute getSSOUserByEmail request with HTTP info returned - * @return ApiResponse<GetSSOUserByEmailAPIResponse> + * Execute getTenantDailyUsages request with HTTP info returned + * @return ApiResponse<GetTenantDailyUsagesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getSSOUserByEmailWithHttpInfo(tenantId, email); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTenantDailyUsagesWithHttpInfo(tenantId, yearNumber, monthNumber, dayNumber, skip); } /** - * Execute getSSOUserByEmail request (asynchronously) + * Execute getTenantDailyUsages request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -13365,10 +16980,11 @@ public ApiResponse executeWithHttpInfo() throws Ap Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getSSOUserByEmailAsync(tenantId, email, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTenantDailyUsagesAsync(tenantId, yearNumber, monthNumber, dayNumber, skip, _callback); } } @@ -13376,19 +16992,19 @@ public okhttp3.Call executeAsync(final ApiCallback * * * @param tenantId (required) - * @param email (required) - * @return APIgetSSOUserByEmailRequest + * @return APIgetTenantDailyUsagesRequest * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetSSOUserByEmailRequest getSSOUserByEmail(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String email) { - return new APIgetSSOUserByEmailRequest(tenantId, email); + public APIgetTenantDailyUsagesRequest getTenantDailyUsages(@javax.annotation.Nonnull String tenantId) { + return new APIgetTenantDailyUsagesRequest(tenantId); } - private okhttp3.Call getSSOUserByIdCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantPackageCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -13405,7 +17021,7 @@ private okhttp3.Call getSSOUserByIdCall(@javax.annotation.Nonnull String tenantI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/sso-users/by-id/{id}" + String localVarPath = "/api/v1/tenant-packages/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -13438,49 +17054,49 @@ private okhttp3.Call getSSOUserByIdCall(@javax.annotation.Nonnull String tenantI } @SuppressWarnings("rawtypes") - private okhttp3.Call getSSOUserByIdValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantPackageValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getSSOUserById(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantPackage(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getSSOUserById(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling getTenantPackage(Async)"); } - return getSSOUserByIdCall(tenantId, id, _callback); + return getTenantPackageCall(tenantId, id, _callback); } - private ApiResponse getSSOUserByIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getSSOUserByIdValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getTenantPackageWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getTenantPackageValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getSSOUserByIdAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantPackageAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getSSOUserByIdValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getTenantPackageValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetSSOUserByIdRequest { + public class APIgetTenantPackageRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - private APIgetSSOUserByIdRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetTenantPackageRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for getSSOUserById + * Build call for getTenantPackage * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -13489,45 +17105,48 @@ private APIgetSSOUserByIdRequest(@javax.annotation.Nonnull String tenantId, @jav Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getSSOUserByIdCall(tenantId, id, _callback); + return getTenantPackageCall(tenantId, id, _callback); } /** - * Execute getSSOUserById request - * @return GetSSOUserByIdAPIResponse + * Execute getTenantPackage request + * @return GetTenantPackageResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetSSOUserByIdAPIResponse execute() throws ApiException { - ApiResponse localVarResp = getSSOUserByIdWithHttpInfo(tenantId, id); + public GetTenantPackageResponse execute() throws ApiException { + ApiResponse localVarResp = getTenantPackageWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getSSOUserById request with HTTP info returned - * @return ApiResponse<GetSSOUserByIdAPIResponse> + * Execute getTenantPackage request with HTTP info returned + * @return ApiResponse<GetTenantPackageResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getSSOUserByIdWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTenantPackageWithHttpInfo(tenantId, id); } /** - * Execute getSSOUserById request (asynchronously) + * Execute getTenantPackage request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -13536,10 +17155,11 @@ public ApiResponse executeWithHttpInfo() throws ApiEx Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getSSOUserByIdAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTenantPackageAsync(tenantId, id, _callback); } } @@ -13548,18 +17168,19 @@ public okhttp3.Call executeAsync(final ApiCallback _c * * @param tenantId (required) * @param id (required) - * @return APIgetSSOUserByIdRequest + * @return APIgetTenantPackageRequest * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetSSOUserByIdRequest getSSOUserById(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetSSOUserByIdRequest(tenantId, id); + public APIgetTenantPackageRequest getTenantPackage(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetTenantPackageRequest(tenantId, id); } - private okhttp3.Call getSSOUsersCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantPackagesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -13576,7 +17197,7 @@ private okhttp3.Call getSSOUsersCall(@javax.annotation.Nonnull String tenantId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/sso-users"; + String localVarPath = "/api/v1/tenant-packages"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -13612,53 +17233,53 @@ private okhttp3.Call getSSOUsersCall(@javax.annotation.Nonnull String tenantId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getSSOUsersValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantPackagesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getSSOUsers(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantPackages(Async)"); } - return getSSOUsersCall(tenantId, skip, _callback); + return getTenantPackagesCall(tenantId, skip, _callback); } - private ApiResponse getSSOUsersWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer skip) throws ApiException { - okhttp3.Call localVarCall = getSSOUsersValidateBeforeCall(tenantId, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getTenantPackagesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getTenantPackagesValidateBeforeCall(tenantId, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getSSOUsersAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Integer skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantPackagesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getSSOUsersValidateBeforeCall(tenantId, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getTenantPackagesValidateBeforeCall(tenantId, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetSSOUsersRequest { + public class APIgetTenantPackagesRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nullable - private Integer skip; + private Double skip; - private APIgetSSOUsersRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetTenantPackagesRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } /** * Set skip * @param skip (optional) - * @return APIgetSSOUsersRequest + * @return APIgetTenantPackagesRequest */ - public APIgetSSOUsersRequest skip(@javax.annotation.Nullable Integer skip) { + public APIgetTenantPackagesRequest skip(@javax.annotation.Nullable Double skip) { this.skip = skip; return this; } /** - * Build call for getSSOUsers + * Build call for getTenantPackages * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -13667,45 +17288,48 @@ public APIgetSSOUsersRequest skip(@javax.annotation.Nullable Integer skip) { Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getSSOUsersCall(tenantId, skip, _callback); + return getTenantPackagesCall(tenantId, skip, _callback); } /** - * Execute getSSOUsers request - * @return GetSSOUsersResponse + * Execute getTenantPackages request + * @return GetTenantPackagesResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetSSOUsersResponse execute() throws ApiException { - ApiResponse localVarResp = getSSOUsersWithHttpInfo(tenantId, skip); + public GetTenantPackagesResponse execute() throws ApiException { + ApiResponse localVarResp = getTenantPackagesWithHttpInfo(tenantId, skip); return localVarResp.getData(); } /** - * Execute getSSOUsers request with HTTP info returned - * @return ApiResponse<GetSSOUsersResponse> + * Execute getTenantPackages request with HTTP info returned + * @return ApiResponse<GetTenantPackagesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getSSOUsersWithHttpInfo(tenantId, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTenantPackagesWithHttpInfo(tenantId, skip); } /** - * Execute getSSOUsers request (asynchronously) + * Execute getTenantPackages request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -13714,10 +17338,11 @@ public ApiResponse executeWithHttpInfo() throws ApiExceptio Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getSSOUsersAsync(tenantId, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTenantPackagesAsync(tenantId, skip, _callback); } } @@ -13725,18 +17350,19 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac * * * @param tenantId (required) - * @return APIgetSSOUsersRequest + * @return APIgetTenantPackagesRequest * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetSSOUsersRequest getSSOUsers(@javax.annotation.Nonnull String tenantId) { - return new APIgetSSOUsersRequest(tenantId); + public APIgetTenantPackagesRequest getTenantPackages(@javax.annotation.Nonnull String tenantId) { + return new APIgetTenantPackagesRequest(tenantId); } - private okhttp3.Call getSubscriptionsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -13753,7 +17379,8 @@ private okhttp3.Call getSubscriptionsCall(@javax.annotation.Nonnull String tenan Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/subscriptions"; + String localVarPath = "/api/v1/tenant-users/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -13765,10 +17392,6 @@ private okhttp3.Call getSubscriptionsCall(@javax.annotation.Nonnull String tenan localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - final String[] localVarAccepts = { "application/json" }; @@ -13789,53 +17412,49 @@ private okhttp3.Call getSubscriptionsCall(@javax.annotation.Nonnull String tenan } @SuppressWarnings("rawtypes") - private okhttp3.Call getSubscriptionsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getSubscriptions(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantUser(Async)"); } - return getSubscriptionsCall(tenantId, userId, _callback); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getTenantUser(Async)"); + } + + return getTenantUserCall(tenantId, id, _callback); } - private ApiResponse getSubscriptionsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId) throws ApiException { - okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(tenantId, userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getTenantUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getTenantUserValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getSubscriptionsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(tenantId, userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getTenantUserValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetSubscriptionsRequest { + public class APIgetTenantUserRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nullable - private String userId; + @javax.annotation.Nonnull + private final String id; - private APIgetSubscriptionsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetTenantUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; + this.id = id; } /** - * Set userId - * @param userId (optional) - * @return APIgetSubscriptionsRequest - */ - public APIgetSubscriptionsRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; - return this; - } - - /** - * Build call for getSubscriptions + * Build call for getTenantUser * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -13844,45 +17463,48 @@ public APIgetSubscriptionsRequest userId(@javax.annotation.Nullable String userI Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getSubscriptionsCall(tenantId, userId, _callback); + return getTenantUserCall(tenantId, id, _callback); } /** - * Execute getSubscriptions request - * @return GetSubscriptionsAPIResponse + * Execute getTenantUser request + * @return GetTenantUserResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetSubscriptionsAPIResponse execute() throws ApiException { - ApiResponse localVarResp = getSubscriptionsWithHttpInfo(tenantId, userId); + public GetTenantUserResponse execute() throws ApiException { + ApiResponse localVarResp = getTenantUserWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getSubscriptions request with HTTP info returned - * @return ApiResponse<GetSubscriptionsAPIResponse> + * Execute getTenantUser request with HTTP info returned + * @return ApiResponse<GetTenantUserResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getSubscriptionsWithHttpInfo(tenantId, userId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTenantUserWithHttpInfo(tenantId, id); } /** - * Execute getSubscriptions request (asynchronously) + * Execute getTenantUser request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -13891,10 +17513,11 @@ public ApiResponse executeWithHttpInfo() throws Api Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getSubscriptionsAsync(tenantId, userId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTenantUserAsync(tenantId, id, _callback); } } @@ -13902,18 +17525,20 @@ public okhttp3.Call executeAsync(final ApiCallback * * * @param tenantId (required) - * @return APIgetSubscriptionsRequest + * @param id (required) + * @return APIgetTenantUserRequest * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetSubscriptionsRequest getSubscriptions(@javax.annotation.Nonnull String tenantId) { - return new APIgetSubscriptionsRequest(tenantId); + public APIgetTenantUserRequest getTenantUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetTenantUserRequest(tenantId, id); } - private okhttp3.Call getTenantCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantUsersCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -13930,8 +17555,7 @@ private okhttp3.Call getTenantCall(@javax.annotation.Nonnull String tenantId, @j Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenants/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/tenant-users"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -13943,6 +17567,10 @@ private okhttp3.Call getTenantCall(@javax.annotation.Nonnull String tenantId, @j localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + final String[] localVarAccepts = { "application/json" }; @@ -13963,49 +17591,53 @@ private okhttp3.Call getTenantCall(@javax.annotation.Nonnull String tenantId, @j } @SuppressWarnings("rawtypes") - private okhttp3.Call getTenantValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantUsersValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getTenant(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getTenant(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantUsers(Async)"); } - return getTenantCall(tenantId, id, _callback); + return getTenantUsersCall(tenantId, skip, _callback); } - private ApiResponse getTenantWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getTenantValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getTenantUsersWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getTenantUsersValidateBeforeCall(tenantId, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getTenantAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantUsersAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getTenantValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getTenantUsersValidateBeforeCall(tenantId, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetTenantRequest { + public class APIgetTenantUsersRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nonnull - private final String id; + @javax.annotation.Nullable + private Double skip; - private APIgetTenantRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetTenantUsersRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; - this.id = id; } /** - * Build call for getTenant + * Set skip + * @param skip (optional) + * @return APIgetTenantUsersRequest + */ + public APIgetTenantUsersRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; + return this; + } + + /** + * Build call for getTenantUsers * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -14018,12 +17650,12 @@ private APIgetTenantRequest(@javax.annotation.Nonnull String tenantId, @javax.an */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getTenantCall(tenantId, id, _callback); + return getTenantUsersCall(tenantId, skip, _callback); } /** - * Execute getTenant request - * @return GetTenantResponse + * Execute getTenantUsers request + * @return GetTenantUsersResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14033,14 +17665,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetTenantResponse execute() throws ApiException { - ApiResponse localVarResp = getTenantWithHttpInfo(tenantId, id); + public GetTenantUsersResponse execute() throws ApiException { + ApiResponse localVarResp = getTenantUsersWithHttpInfo(tenantId, skip); return localVarResp.getData(); } /** - * Execute getTenant request with HTTP info returned - * @return ApiResponse<GetTenantResponse> + * Execute getTenantUsers request with HTTP info returned + * @return ApiResponse<GetTenantUsersResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14050,12 +17682,12 @@ public GetTenantResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getTenantWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTenantUsersWithHttpInfo(tenantId, skip); } /** - * Execute getTenant request (asynchronously) + * Execute getTenantUsers request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -14067,8 +17699,8 @@ public ApiResponse executeWithHttpInfo() throws ApiException 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getTenantAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTenantUsersAsync(tenantId, skip, _callback); } } @@ -14076,8 +17708,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) * * * @param tenantId (required) - * @param id (required) - * @return APIgetTenantRequest + * @return APIgetTenantUsersRequest * @http.response.details @@ -14086,10 +17717,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callback)
Response Details
0 Error -
*/ - public APIgetTenantRequest getTenant(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetTenantRequest(tenantId, id); + public APIgetTenantUsersRequest getTenantUsers(@javax.annotation.Nonnull String tenantId) { + return new APIgetTenantUsersRequest(tenantId); } - private okhttp3.Call getTenantDailyUsagesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double yearNumber, @javax.annotation.Nullable Double monthNumber, @javax.annotation.Nullable Double dayNumber, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String meta, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -14106,7 +17737,7 @@ private okhttp3.Call getTenantDailyUsagesCall(@javax.annotation.Nonnull String t Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenant-daily-usage"; + String localVarPath = "/api/v1/tenants"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -14118,16 +17749,8 @@ private okhttp3.Call getTenantDailyUsagesCall(@javax.annotation.Nonnull String t localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (yearNumber != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("yearNumber", yearNumber)); - } - - if (monthNumber != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("monthNumber", monthNumber)); - } - - if (dayNumber != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("dayNumber", dayNumber)); + if (meta != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("meta", meta)); } if (skip != null) { @@ -14154,89 +17777,65 @@ private okhttp3.Call getTenantDailyUsagesCall(@javax.annotation.Nonnull String t } @SuppressWarnings("rawtypes") - private okhttp3.Call getTenantDailyUsagesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double yearNumber, @javax.annotation.Nullable Double monthNumber, @javax.annotation.Nullable Double dayNumber, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String meta, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantDailyUsages(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getTenants(Async)"); } - return getTenantDailyUsagesCall(tenantId, yearNumber, monthNumber, dayNumber, skip, _callback); + return getTenantsCall(tenantId, meta, skip, _callback); } - private ApiResponse getTenantDailyUsagesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double yearNumber, @javax.annotation.Nullable Double monthNumber, @javax.annotation.Nullable Double dayNumber, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getTenantDailyUsagesValidateBeforeCall(tenantId, yearNumber, monthNumber, dayNumber, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getTenantsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String meta, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getTenantsValidateBeforeCall(tenantId, meta, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getTenantDailyUsagesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double yearNumber, @javax.annotation.Nullable Double monthNumber, @javax.annotation.Nullable Double dayNumber, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTenantsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String meta, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getTenantDailyUsagesValidateBeforeCall(tenantId, yearNumber, monthNumber, dayNumber, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getTenantsValidateBeforeCall(tenantId, meta, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetTenantDailyUsagesRequest { - @javax.annotation.Nonnull - private final String tenantId; - @javax.annotation.Nullable - private Double yearNumber; - @javax.annotation.Nullable - private Double monthNumber; - @javax.annotation.Nullable - private Double dayNumber; - @javax.annotation.Nullable - private Double skip; - - private APIgetTenantDailyUsagesRequest(@javax.annotation.Nonnull String tenantId) { - this.tenantId = tenantId; - } - - /** - * Set yearNumber - * @param yearNumber (optional) - * @return APIgetTenantDailyUsagesRequest - */ - public APIgetTenantDailyUsagesRequest yearNumber(@javax.annotation.Nullable Double yearNumber) { - this.yearNumber = yearNumber; - return this; - } - - /** - * Set monthNumber - * @param monthNumber (optional) - * @return APIgetTenantDailyUsagesRequest - */ - public APIgetTenantDailyUsagesRequest monthNumber(@javax.annotation.Nullable Double monthNumber) { - this.monthNumber = monthNumber; - return this; + public class APIgetTenantsRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nullable + private String meta; + @javax.annotation.Nullable + private Double skip; + + private APIgetTenantsRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; } /** - * Set dayNumber - * @param dayNumber (optional) - * @return APIgetTenantDailyUsagesRequest + * Set meta + * @param meta (optional) + * @return APIgetTenantsRequest */ - public APIgetTenantDailyUsagesRequest dayNumber(@javax.annotation.Nullable Double dayNumber) { - this.dayNumber = dayNumber; + public APIgetTenantsRequest meta(@javax.annotation.Nullable String meta) { + this.meta = meta; return this; } /** * Set skip * @param skip (optional) - * @return APIgetTenantDailyUsagesRequest + * @return APIgetTenantsRequest */ - public APIgetTenantDailyUsagesRequest skip(@javax.annotation.Nullable Double skip) { + public APIgetTenantsRequest skip(@javax.annotation.Nullable Double skip) { this.skip = skip; return this; } /** - * Build call for getTenantDailyUsages + * Build call for getTenants * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -14249,12 +17848,12 @@ public APIgetTenantDailyUsagesRequest skip(@javax.annotation.Nullable Double ski */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getTenantDailyUsagesCall(tenantId, yearNumber, monthNumber, dayNumber, skip, _callback); + return getTenantsCall(tenantId, meta, skip, _callback); } /** - * Execute getTenantDailyUsages request - * @return GetTenantDailyUsagesResponse + * Execute getTenants request + * @return GetTenantsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14264,14 +17863,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetTenantDailyUsagesResponse execute() throws ApiException { - ApiResponse localVarResp = getTenantDailyUsagesWithHttpInfo(tenantId, yearNumber, monthNumber, dayNumber, skip); + public GetTenantsResponse execute() throws ApiException { + ApiResponse localVarResp = getTenantsWithHttpInfo(tenantId, meta, skip); return localVarResp.getData(); } /** - * Execute getTenantDailyUsages request with HTTP info returned - * @return ApiResponse<GetTenantDailyUsagesResponse> + * Execute getTenants request with HTTP info returned + * @return ApiResponse<GetTenantsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14281,12 +17880,12 @@ public GetTenantDailyUsagesResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getTenantDailyUsagesWithHttpInfo(tenantId, yearNumber, monthNumber, dayNumber, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTenantsWithHttpInfo(tenantId, meta, skip); } /** - * Execute getTenantDailyUsages request (asynchronously) + * Execute getTenants request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -14298,8 +17897,8 @@ public ApiResponse executeWithHttpInfo() throws Ap 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getTenantDailyUsagesAsync(tenantId, yearNumber, monthNumber, dayNumber, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTenantsAsync(tenantId, meta, skip, _callback); } } @@ -14307,7 +17906,7 @@ public okhttp3.Call executeAsync(final ApiCallback * * * @param tenantId (required) - * @return APIgetTenantDailyUsagesRequest + * @return APIgetTenantsRequest * @http.response.details @@ -14316,10 +17915,10 @@ public okhttp3.Call executeAsync(final ApiCallback
Response Details
0 Error -
*/ - public APIgetTenantDailyUsagesRequest getTenantDailyUsages(@javax.annotation.Nonnull String tenantId) { - return new APIgetTenantDailyUsagesRequest(tenantId); + public APIgetTenantsRequest getTenants(@javax.annotation.Nonnull String tenantId) { + return new APIgetTenantsRequest(tenantId); } - private okhttp3.Call getTenantPackageCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTicketCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -14336,7 +17935,7 @@ private okhttp3.Call getTenantPackageCall(@javax.annotation.Nonnull String tenan Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenant-packages/{id}" + String localVarPath = "/api/v1/tickets/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -14349,6 +17948,10 @@ private okhttp3.Call getTenantPackageCall(@javax.annotation.Nonnull String tenan localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + final String[] localVarAccepts = { "application/json" }; @@ -14369,49 +17972,61 @@ private okhttp3.Call getTenantPackageCall(@javax.annotation.Nonnull String tenan } @SuppressWarnings("rawtypes") - private okhttp3.Call getTenantPackageValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTicketValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantPackage(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getTicket(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getTenantPackage(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling getTicket(Async)"); } - return getTenantPackageCall(tenantId, id, _callback); + return getTicketCall(tenantId, id, userId, _callback); } - private ApiResponse getTenantPackageWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getTenantPackageValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getTicketWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId) throws ApiException { + okhttp3.Call localVarCall = getTicketValidateBeforeCall(tenantId, id, userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getTenantPackageAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTicketAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getTenantPackageValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getTicketValidateBeforeCall(tenantId, id, userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetTenantPackageRequest { + public class APIgetTicketRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; + @javax.annotation.Nullable + private String userId; - private APIgetTenantPackageRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetTicketRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for getTenantPackage + * Set userId + * @param userId (optional) + * @return APIgetTicketRequest + */ + public APIgetTicketRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Build call for getTicket * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -14424,12 +18039,12 @@ private APIgetTenantPackageRequest(@javax.annotation.Nonnull String tenantId, @j */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getTenantPackageCall(tenantId, id, _callback); + return getTicketCall(tenantId, id, userId, _callback); } /** - * Execute getTenantPackage request - * @return GetTenantPackageResponse + * Execute getTicket request + * @return GetTicketResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14439,14 +18054,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetTenantPackageResponse execute() throws ApiException { - ApiResponse localVarResp = getTenantPackageWithHttpInfo(tenantId, id); + public GetTicketResponse execute() throws ApiException { + ApiResponse localVarResp = getTicketWithHttpInfo(tenantId, id, userId); return localVarResp.getData(); } /** - * Execute getTenantPackage request with HTTP info returned - * @return ApiResponse<GetTenantPackageResponse> + * Execute getTicket request with HTTP info returned + * @return ApiResponse<GetTicketResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14456,12 +18071,12 @@ public GetTenantPackageResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getTenantPackageWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTicketWithHttpInfo(tenantId, id, userId); } /** - * Execute getTenantPackage request (asynchronously) + * Execute getTicket request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -14473,8 +18088,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExc 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getTenantPackageAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTicketAsync(tenantId, id, userId, _callback); } } @@ -14483,7 +18098,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ca * * @param tenantId (required) * @param id (required) - * @return APIgetTenantPackageRequest + * @return APIgetTicketRequest * @http.response.details @@ -14492,10 +18107,10 @@ public okhttp3.Call executeAsync(final ApiCallback _ca
Response Details
0 Error -
*/ - public APIgetTenantPackageRequest getTenantPackage(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetTenantPackageRequest(tenantId, id); + public APIgetTicketRequest getTicket(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetTicketRequest(tenantId, id); } - private okhttp3.Call getTenantPackagesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTicketsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double state, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable Double limit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -14512,7 +18127,7 @@ private okhttp3.Call getTenantPackagesCall(@javax.annotation.Nonnull String tena Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenant-packages"; + String localVarPath = "/api/v1/tickets"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -14524,10 +18139,22 @@ private okhttp3.Call getTenantPackagesCall(@javax.annotation.Nonnull String tena localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + + if (state != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("state", state)); + } + if (skip != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); } + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + final String[] localVarAccepts = { "application/json" }; @@ -14548,53 +18175,89 @@ private okhttp3.Call getTenantPackagesCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call getTenantPackagesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTicketsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double state, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable Double limit, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantPackages(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getTickets(Async)"); } - return getTenantPackagesCall(tenantId, skip, _callback); + return getTicketsCall(tenantId, userId, state, skip, limit, _callback); } - private ApiResponse getTenantPackagesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getTenantPackagesValidateBeforeCall(tenantId, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getTicketsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double state, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable Double limit) throws ApiException { + okhttp3.Call localVarCall = getTicketsValidateBeforeCall(tenantId, userId, state, skip, limit, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getTenantPackagesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTicketsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double state, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable Double limit, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getTenantPackagesValidateBeforeCall(tenantId, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getTicketsValidateBeforeCall(tenantId, userId, state, skip, limit, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetTenantPackagesRequest { + public class APIgetTicketsRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nullable + private String userId; + @javax.annotation.Nullable + private Double state; + @javax.annotation.Nullable private Double skip; + @javax.annotation.Nullable + private Double limit; - private APIgetTenantPackagesRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetTicketsRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } + /** + * Set userId + * @param userId (optional) + * @return APIgetTicketsRequest + */ + public APIgetTicketsRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Set state + * @param state (optional) + * @return APIgetTicketsRequest + */ + public APIgetTicketsRequest state(@javax.annotation.Nullable Double state) { + this.state = state; + return this; + } + /** * Set skip * @param skip (optional) - * @return APIgetTenantPackagesRequest + * @return APIgetTicketsRequest */ - public APIgetTenantPackagesRequest skip(@javax.annotation.Nullable Double skip) { + public APIgetTicketsRequest skip(@javax.annotation.Nullable Double skip) { this.skip = skip; return this; } /** - * Build call for getTenantPackages + * Set limit + * @param limit (optional) + * @return APIgetTicketsRequest + */ + public APIgetTicketsRequest limit(@javax.annotation.Nullable Double limit) { + this.limit = limit; + return this; + } + + /** + * Build call for getTickets * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -14607,12 +18270,12 @@ public APIgetTenantPackagesRequest skip(@javax.annotation.Nullable Double skip) */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getTenantPackagesCall(tenantId, skip, _callback); + return getTicketsCall(tenantId, userId, state, skip, limit, _callback); } /** - * Execute getTenantPackages request - * @return GetTenantPackagesResponse + * Execute getTickets request + * @return GetTicketsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14622,14 +18285,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetTenantPackagesResponse execute() throws ApiException { - ApiResponse localVarResp = getTenantPackagesWithHttpInfo(tenantId, skip); + public GetTicketsResponse execute() throws ApiException { + ApiResponse localVarResp = getTicketsWithHttpInfo(tenantId, userId, state, skip, limit); return localVarResp.getData(); } /** - * Execute getTenantPackages request with HTTP info returned - * @return ApiResponse<GetTenantPackagesResponse> + * Execute getTickets request with HTTP info returned + * @return ApiResponse<GetTicketsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14639,12 +18302,12 @@ public GetTenantPackagesResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getTenantPackagesWithHttpInfo(tenantId, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTicketsWithHttpInfo(tenantId, userId, state, skip, limit); } /** - * Execute getTenantPackages request (asynchronously) + * Execute getTickets request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -14656,8 +18319,8 @@ public ApiResponse executeWithHttpInfo() throws ApiEx 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getTenantPackagesAsync(tenantId, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTicketsAsync(tenantId, userId, state, skip, limit, _callback); } } @@ -14665,7 +18328,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c * * * @param tenantId (required) - * @return APIgetTenantPackagesRequest + * @return APIgetTicketsRequest * @http.response.details @@ -14674,10 +18337,10 @@ public okhttp3.Call executeAsync(final ApiCallback _c
Response Details
0 Error -
*/ - public APIgetTenantPackagesRequest getTenantPackages(@javax.annotation.Nonnull String tenantId) { - return new APIgetTenantPackagesRequest(tenantId); + public APIgetTicketsRequest getTickets(@javax.annotation.Nonnull String tenantId) { + return new APIgetTicketsRequest(tenantId); } - private okhttp3.Call getTenantUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -14694,7 +18357,7 @@ private okhttp3.Call getTenantUserCall(@javax.annotation.Nonnull String tenantId Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenant-users/{id}" + String localVarPath = "/api/v1/users/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -14727,49 +18390,49 @@ private okhttp3.Call getTenantUserCall(@javax.annotation.Nonnull String tenantId } @SuppressWarnings("rawtypes") - private okhttp3.Call getTenantUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantUser(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getUser(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getTenantUser(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling getUser(Async)"); } - return getTenantUserCall(tenantId, id, _callback); + return getUserCall(tenantId, id, _callback); } - private ApiResponse getTenantUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getTenantUserValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getUserValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getTenantUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getTenantUserValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getUserValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetTenantUserRequest { + public class APIgetUserRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; - private APIgetTenantUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; this.id = id; } /** - * Build call for getTenantUser + * Build call for getUser * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -14782,12 +18445,12 @@ private APIgetTenantUserRequest(@javax.annotation.Nonnull String tenantId, @java */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getTenantUserCall(tenantId, id, _callback); + return getUserCall(tenantId, id, _callback); } /** - * Execute getTenantUser request - * @return GetTenantUserResponse + * Execute getUser request + * @return GetUserResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14797,14 +18460,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetTenantUserResponse execute() throws ApiException { - ApiResponse localVarResp = getTenantUserWithHttpInfo(tenantId, id); + public GetUserResponse execute() throws ApiException { + ApiResponse localVarResp = getUserWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getTenantUser request with HTTP info returned - * @return ApiResponse<GetTenantUserResponse> + * Execute getUser request with HTTP info returned + * @return ApiResponse<GetUserResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14814,12 +18477,12 @@ public GetTenantUserResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getTenantUserWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getUserWithHttpInfo(tenantId, id); } /** - * Execute getTenantUser request (asynchronously) + * Execute getUser request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -14831,8 +18494,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExcept 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getTenantUserAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getUserAsync(tenantId, id, _callback); } } @@ -14841,7 +18504,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb * * @param tenantId (required) * @param id (required) - * @return APIgetTenantUserRequest + * @return APIgetUserRequest * @http.response.details @@ -14850,10 +18513,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callb
Response Details
0 Error -
*/ - public APIgetTenantUserRequest getTenantUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetTenantUserRequest(tenantId, id); + public APIgetUserRequest getUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetUserRequest(tenantId, id); } - private okhttp3.Call getTenantUsersCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -14870,7 +18533,8 @@ private okhttp3.Call getTenantUsersCall(@javax.annotation.Nonnull String tenantI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenant-users"; + String localVarPath = "/api/v1/user-badges/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -14882,10 +18546,6 @@ private okhttp3.Call getTenantUsersCall(@javax.annotation.Nonnull String tenantI localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (skip != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); - } - final String[] localVarAccepts = { "application/json" }; @@ -14906,53 +18566,49 @@ private okhttp3.Call getTenantUsersCall(@javax.annotation.Nonnull String tenantI } @SuppressWarnings("rawtypes") - private okhttp3.Call getTenantUsersValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getTenantUsers(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadge(Async)"); } - return getTenantUsersCall(tenantId, skip, _callback); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getUserBadge(Async)"); + } + + return getUserBadgeCall(tenantId, id, _callback); } - private ApiResponse getTenantUsersWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getTenantUsersValidateBeforeCall(tenantId, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getUserBadgeWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getUserBadgeValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getTenantUsersAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getTenantUsersValidateBeforeCall(tenantId, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getUserBadgeValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetTenantUsersRequest { + public class APIgetUserBadgeRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nullable - private Double skip; + @javax.annotation.Nonnull + private final String id; - private APIgetTenantUsersRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetUserBadgeRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; + this.id = id; } /** - * Set skip - * @param skip (optional) - * @return APIgetTenantUsersRequest - */ - public APIgetTenantUsersRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; - return this; - } - - /** - * Build call for getTenantUsers + * Build call for getUserBadge * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -14965,12 +18621,12 @@ public APIgetTenantUsersRequest skip(@javax.annotation.Nullable Double skip) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getTenantUsersCall(tenantId, skip, _callback); + return getUserBadgeCall(tenantId, id, _callback); } /** - * Execute getTenantUsers request - * @return GetTenantUsersResponse + * Execute getUserBadge request + * @return APIGetUserBadgeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14980,14 +18636,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetTenantUsersResponse execute() throws ApiException { - ApiResponse localVarResp = getTenantUsersWithHttpInfo(tenantId, skip); + public APIGetUserBadgeResponse execute() throws ApiException { + ApiResponse localVarResp = getUserBadgeWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getTenantUsers request with HTTP info returned - * @return ApiResponse<GetTenantUsersResponse> + * Execute getUserBadge request with HTTP info returned + * @return ApiResponse<APIGetUserBadgeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -14997,12 +18653,12 @@ public GetTenantUsersResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getTenantUsersWithHttpInfo(tenantId, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getUserBadgeWithHttpInfo(tenantId, id); } /** - * Execute getTenantUsers request (asynchronously) + * Execute getUserBadge request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -15014,8 +18670,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExcep 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getTenantUsersAsync(tenantId, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getUserBadgeAsync(tenantId, id, _callback); } } @@ -15023,7 +18679,8 @@ public okhttp3.Call executeAsync(final ApiCallback _call * * * @param tenantId (required) - * @return APIgetTenantUsersRequest + * @param id (required) + * @return APIgetUserBadgeRequest * @http.response.details @@ -15032,10 +18689,10 @@ public okhttp3.Call executeAsync(final ApiCallback _call
Response Details
0 Error -
*/ - public APIgetTenantUsersRequest getTenantUsers(@javax.annotation.Nonnull String tenantId) { - return new APIgetTenantUsersRequest(tenantId); + public APIgetUserBadgeRequest getUserBadge(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetUserBadgeRequest(tenantId, id); } - private okhttp3.Call getTenantsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String meta, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeProgressByIdCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -15052,7 +18709,8 @@ private okhttp3.Call getTenantsCall(@javax.annotation.Nonnull String tenantId, @ Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tenants"; + String localVarPath = "/api/v1/user-badge-progress/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -15064,14 +18722,6 @@ private okhttp3.Call getTenantsCall(@javax.annotation.Nonnull String tenantId, @ localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (meta != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("meta", meta)); - } - - if (skip != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); - } - final String[] localVarAccepts = { "application/json" }; @@ -15092,65 +18742,49 @@ private okhttp3.Call getTenantsCall(@javax.annotation.Nonnull String tenantId, @ } @SuppressWarnings("rawtypes") - private okhttp3.Call getTenantsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String meta, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeProgressByIdValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getTenants(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadgeProgressById(Async)"); } - return getTenantsCall(tenantId, meta, skip, _callback); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getUserBadgeProgressById(Async)"); + } + + return getUserBadgeProgressByIdCall(tenantId, id, _callback); } - private ApiResponse getTenantsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String meta, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getTenantsValidateBeforeCall(tenantId, meta, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getUserBadgeProgressByIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = getUserBadgeProgressByIdValidateBeforeCall(tenantId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getTenantsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String meta, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeProgressByIdAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getTenantsValidateBeforeCall(tenantId, meta, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getUserBadgeProgressByIdValidateBeforeCall(tenantId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetTenantsRequest { + public class APIgetUserBadgeProgressByIdRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nullable - private String meta; - @javax.annotation.Nullable - private Double skip; + @javax.annotation.Nonnull + private final String id; - private APIgetTenantsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetUserBadgeProgressByIdRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; + this.id = id; } /** - * Set meta - * @param meta (optional) - * @return APIgetTenantsRequest - */ - public APIgetTenantsRequest meta(@javax.annotation.Nullable String meta) { - this.meta = meta; - return this; - } - - /** - * Set skip - * @param skip (optional) - * @return APIgetTenantsRequest - */ - public APIgetTenantsRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; - return this; - } - - /** - * Build call for getTenants + * Build call for getUserBadgeProgressById * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -15163,12 +18797,12 @@ public APIgetTenantsRequest skip(@javax.annotation.Nullable Double skip) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getTenantsCall(tenantId, meta, skip, _callback); + return getUserBadgeProgressByIdCall(tenantId, id, _callback); } /** - * Execute getTenants request - * @return GetTenantsResponse + * Execute getUserBadgeProgressById request + * @return APIGetUserBadgeProgressResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15178,14 +18812,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetTenantsResponse execute() throws ApiException { - ApiResponse localVarResp = getTenantsWithHttpInfo(tenantId, meta, skip); + public APIGetUserBadgeProgressResponse execute() throws ApiException { + ApiResponse localVarResp = getUserBadgeProgressByIdWithHttpInfo(tenantId, id); return localVarResp.getData(); } /** - * Execute getTenants request with HTTP info returned - * @return ApiResponse<GetTenantsResponse> + * Execute getUserBadgeProgressById request with HTTP info returned + * @return ApiResponse<APIGetUserBadgeProgressResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15195,12 +18829,12 @@ public GetTenantsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getTenantsWithHttpInfo(tenantId, meta, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getUserBadgeProgressByIdWithHttpInfo(tenantId, id); } /** - * Execute getTenants request (asynchronously) + * Execute getUserBadgeProgressById request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -15212,8 +18846,8 @@ public ApiResponse executeWithHttpInfo() throws ApiException 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getTenantsAsync(tenantId, meta, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getUserBadgeProgressByIdAsync(tenantId, id, _callback); } } @@ -15221,7 +18855,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback * * * @param tenantId (required) - * @return APIgetTenantsRequest + * @param id (required) + * @return APIgetUserBadgeProgressByIdRequest * @http.response.details @@ -15230,10 +18865,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callback
Response Details
0 Error -
*/ - public APIgetTenantsRequest getTenants(@javax.annotation.Nonnull String tenantId) { - return new APIgetTenantsRequest(tenantId); + public APIgetUserBadgeProgressByIdRequest getUserBadgeProgressById(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + return new APIgetUserBadgeProgressByIdRequest(tenantId, id); } - private okhttp3.Call getTicketCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeProgressByUserIdCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -15250,8 +18885,8 @@ private okhttp3.Call getTicketCall(@javax.annotation.Nonnull String tenantId, @j Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tickets/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/user-badge-progress/user/{userId}" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -15263,10 +18898,6 @@ private okhttp3.Call getTicketCall(@javax.annotation.Nonnull String tenantId, @j localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - final String[] localVarAccepts = { "application/json" }; @@ -15287,61 +18918,49 @@ private okhttp3.Call getTicketCall(@javax.annotation.Nonnull String tenantId, @j } @SuppressWarnings("rawtypes") - private okhttp3.Call getTicketValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeProgressByUserIdValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getTicket(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadgeProgressByUserId(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getTicket(Async)"); + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling getUserBadgeProgressByUserId(Async)"); } - return getTicketCall(tenantId, id, userId, _callback); + return getUserBadgeProgressByUserIdCall(tenantId, userId, _callback); } - private ApiResponse getTicketWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId) throws ApiException { - okhttp3.Call localVarCall = getTicketValidateBeforeCall(tenantId, id, userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getUserBadgeProgressByUserIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getUserBadgeProgressByUserIdValidateBeforeCall(tenantId, userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getTicketAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeProgressByUserIdAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getTicketValidateBeforeCall(tenantId, id, userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getUserBadgeProgressByUserIdValidateBeforeCall(tenantId, userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetTicketRequest { + public class APIgetUserBadgeProgressByUserIdRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String id; - @javax.annotation.Nullable - private String userId; + private final String userId; - private APIgetTicketRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetUserBadgeProgressByUserIdRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId) { this.tenantId = tenantId; - this.id = id; - } - - /** - * Set userId - * @param userId (optional) - * @return APIgetTicketRequest - */ - public APIgetTicketRequest userId(@javax.annotation.Nullable String userId) { this.userId = userId; - return this; } /** - * Build call for getTicket + * Build call for getUserBadgeProgressByUserId * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -15354,12 +18973,12 @@ public APIgetTicketRequest userId(@javax.annotation.Nullable String userId) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getTicketCall(tenantId, id, userId, _callback); + return getUserBadgeProgressByUserIdCall(tenantId, userId, _callback); } /** - * Execute getTicket request - * @return GetTicketResponse + * Execute getUserBadgeProgressByUserId request + * @return APIGetUserBadgeProgressResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15369,14 +18988,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetTicketResponse execute() throws ApiException { - ApiResponse localVarResp = getTicketWithHttpInfo(tenantId, id, userId); + public APIGetUserBadgeProgressResponse execute() throws ApiException { + ApiResponse localVarResp = getUserBadgeProgressByUserIdWithHttpInfo(tenantId, userId); return localVarResp.getData(); } /** - * Execute getTicket request with HTTP info returned - * @return ApiResponse<GetTicketResponse> + * Execute getUserBadgeProgressByUserId request with HTTP info returned + * @return ApiResponse<APIGetUserBadgeProgressResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15386,12 +19005,12 @@ public GetTicketResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getTicketWithHttpInfo(tenantId, id, userId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getUserBadgeProgressByUserIdWithHttpInfo(tenantId, userId); } /** - * Execute getTicket request (asynchronously) + * Execute getUserBadgeProgressByUserId request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -15403,8 +19022,8 @@ public ApiResponse executeWithHttpInfo() throws ApiException 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getTicketAsync(tenantId, id, userId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getUserBadgeProgressByUserIdAsync(tenantId, userId, _callback); } } @@ -15412,8 +19031,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) * * * @param tenantId (required) - * @param id (required) - * @return APIgetTicketRequest + * @param userId (required) + * @return APIgetUserBadgeProgressByUserIdRequest * @http.response.details @@ -15422,10 +19041,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callback)
Response Details
0 Error -
*/ - public APIgetTicketRequest getTicket(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetTicketRequest(tenantId, id); + public APIgetUserBadgeProgressByUserIdRequest getUserBadgeProgressByUserId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId) { + return new APIgetUserBadgeProgressByUserIdRequest(tenantId, userId); } - private okhttp3.Call getTicketsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double state, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable Double limit, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeProgressListCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -15442,7 +19061,7 @@ private okhttp3.Call getTicketsCall(@javax.annotation.Nonnull String tenantId, @ Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/tickets"; + String localVarPath = "/api/v1/user-badge-progress"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -15458,18 +19077,14 @@ private okhttp3.Call getTicketsCall(@javax.annotation.Nonnull String tenantId, @ localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); } - if (state != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("state", state)); + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (skip != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); } - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - final String[] localVarAccepts = { "application/json" }; @@ -15490,89 +19105,77 @@ private okhttp3.Call getTicketsCall(@javax.annotation.Nonnull String tenantId, @ } @SuppressWarnings("rawtypes") - private okhttp3.Call getTicketsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double state, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable Double limit, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeProgressListValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getTickets(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadgeProgressList(Async)"); } - return getTicketsCall(tenantId, userId, state, skip, limit, _callback); + return getUserBadgeProgressListCall(tenantId, userId, limit, skip, _callback); } - private ApiResponse getTicketsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double state, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable Double limit) throws ApiException { - okhttp3.Call localVarCall = getTicketsValidateBeforeCall(tenantId, userId, state, skip, limit, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getUserBadgeProgressListWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getUserBadgeProgressListValidateBeforeCall(tenantId, userId, limit, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getTicketsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double state, @javax.annotation.Nullable Double skip, @javax.annotation.Nullable Double limit, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgeProgressListAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getTicketsValidateBeforeCall(tenantId, userId, state, skip, limit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getUserBadgeProgressListValidateBeforeCall(tenantId, userId, limit, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetTicketsRequest { + public class APIgetUserBadgeProgressListRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nullable private String userId; @javax.annotation.Nullable - private Double state; + private Double limit; @javax.annotation.Nullable private Double skip; - @javax.annotation.Nullable - private Double limit; - private APIgetTicketsRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetUserBadgeProgressListRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } /** * Set userId * @param userId (optional) - * @return APIgetTicketsRequest + * @return APIgetUserBadgeProgressListRequest */ - public APIgetTicketsRequest userId(@javax.annotation.Nullable String userId) { + public APIgetUserBadgeProgressListRequest userId(@javax.annotation.Nullable String userId) { this.userId = userId; return this; } /** - * Set state - * @param state (optional) - * @return APIgetTicketsRequest + * Set limit + * @param limit (optional) + * @return APIgetUserBadgeProgressListRequest */ - public APIgetTicketsRequest state(@javax.annotation.Nullable Double state) { - this.state = state; + public APIgetUserBadgeProgressListRequest limit(@javax.annotation.Nullable Double limit) { + this.limit = limit; return this; } /** * Set skip * @param skip (optional) - * @return APIgetTicketsRequest + * @return APIgetUserBadgeProgressListRequest */ - public APIgetTicketsRequest skip(@javax.annotation.Nullable Double skip) { + public APIgetUserBadgeProgressListRequest skip(@javax.annotation.Nullable Double skip) { this.skip = skip; return this; } /** - * Set limit - * @param limit (optional) - * @return APIgetTicketsRequest - */ - public APIgetTicketsRequest limit(@javax.annotation.Nullable Double limit) { - this.limit = limit; - return this; - } - - /** - * Build call for getTickets + * Build call for getUserBadgeProgressList * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -15585,12 +19188,12 @@ public APIgetTicketsRequest limit(@javax.annotation.Nullable Double limit) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getTicketsCall(tenantId, userId, state, skip, limit, _callback); + return getUserBadgeProgressListCall(tenantId, userId, limit, skip, _callback); } /** - * Execute getTickets request - * @return GetTicketsResponse + * Execute getUserBadgeProgressList request + * @return APIGetUserBadgeProgressListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15600,14 +19203,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetTicketsResponse execute() throws ApiException { - ApiResponse localVarResp = getTicketsWithHttpInfo(tenantId, userId, state, skip, limit); + public APIGetUserBadgeProgressListResponse execute() throws ApiException { + ApiResponse localVarResp = getUserBadgeProgressListWithHttpInfo(tenantId, userId, limit, skip); return localVarResp.getData(); } /** - * Execute getTickets request with HTTP info returned - * @return ApiResponse<GetTicketsResponse> + * Execute getUserBadgeProgressList request with HTTP info returned + * @return ApiResponse<APIGetUserBadgeProgressListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15617,12 +19220,12 @@ public GetTicketsResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getTicketsWithHttpInfo(tenantId, userId, state, skip, limit); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getUserBadgeProgressListWithHttpInfo(tenantId, userId, limit, skip); } /** - * Execute getTickets request (asynchronously) + * Execute getUserBadgeProgressList request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -15634,8 +19237,8 @@ public ApiResponse executeWithHttpInfo() throws ApiException 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getTicketsAsync(tenantId, userId, state, skip, limit, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getUserBadgeProgressListAsync(tenantId, userId, limit, skip, _callback); } } @@ -15643,7 +19246,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback * * * @param tenantId (required) - * @return APIgetTicketsRequest + * @return APIgetUserBadgeProgressListRequest * @http.response.details @@ -15652,10 +19255,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callback
Response Details
0 Error -
*/ - public APIgetTicketsRequest getTickets(@javax.annotation.Nonnull String tenantId) { - return new APIgetTicketsRequest(tenantId); + public APIgetUserBadgeProgressListRequest getUserBadgeProgressList(@javax.annotation.Nonnull String tenantId) { + return new APIgetUserBadgeProgressListRequest(tenantId); } - private okhttp3.Call getUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String badgeId, @javax.annotation.Nullable Double type, @javax.annotation.Nullable Boolean displayedOnComments, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -15672,8 +19275,7 @@ private okhttp3.Call getUserCall(@javax.annotation.Nonnull String tenantId, @jav Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/users/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/user-badges"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -15685,6 +19287,30 @@ private okhttp3.Call getUserCall(@javax.annotation.Nonnull String tenantId, @jav localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + + if (badgeId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("badgeId", badgeId)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (displayedOnComments != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("displayedOnComments", displayedOnComments)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + final String[] localVarAccepts = { "application/json" }; @@ -15705,49 +19331,113 @@ private okhttp3.Call getUserCall(@javax.annotation.Nonnull String tenantId, @jav } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String badgeId, @javax.annotation.Nullable Double type, @javax.annotation.Nullable Boolean displayedOnComments, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getUser(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getUser(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadges(Async)"); } - return getUserCall(tenantId, id, _callback); + return getUserBadgesCall(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, _callback); } - private ApiResponse getUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getUserValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getUserBadgesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String badgeId, @javax.annotation.Nullable Double type, @javax.annotation.Nullable Boolean displayedOnComments, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getUserBadgesValidateBeforeCall(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserBadgesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String badgeId, @javax.annotation.Nullable Double type, @javax.annotation.Nullable Boolean displayedOnComments, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserBadgesValidateBeforeCall(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetUserBadgesRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nullable + private String userId; + @javax.annotation.Nullable + private String badgeId; + @javax.annotation.Nullable + private Double type; + @javax.annotation.Nullable + private Boolean displayedOnComments; + @javax.annotation.Nullable + private Double limit; + @javax.annotation.Nullable + private Double skip; + + private APIgetUserBadgesRequest(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + /** + * Set userId + * @param userId (optional) + * @return APIgetUserBadgesRequest + */ + public APIgetUserBadgesRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Set badgeId + * @param badgeId (optional) + * @return APIgetUserBadgesRequest + */ + public APIgetUserBadgesRequest badgeId(@javax.annotation.Nullable String badgeId) { + this.badgeId = badgeId; + return this; + } + + /** + * Set type + * @param type (optional) + * @return APIgetUserBadgesRequest + */ + public APIgetUserBadgesRequest type(@javax.annotation.Nullable Double type) { + this.type = type; + return this; + } - okhttp3.Call localVarCall = getUserValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } + /** + * Set displayedOnComments + * @param displayedOnComments (optional) + * @return APIgetUserBadgesRequest + */ + public APIgetUserBadgesRequest displayedOnComments(@javax.annotation.Nullable Boolean displayedOnComments) { + this.displayedOnComments = displayedOnComments; + return this; + } - public class APIgetUserRequest { - @javax.annotation.Nonnull - private final String tenantId; - @javax.annotation.Nonnull - private final String id; + /** + * Set limit + * @param limit (optional) + * @return APIgetUserBadgesRequest + */ + public APIgetUserBadgesRequest limit(@javax.annotation.Nullable Double limit) { + this.limit = limit; + return this; + } - private APIgetUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - this.tenantId = tenantId; - this.id = id; + /** + * Set skip + * @param skip (optional) + * @return APIgetUserBadgesRequest + */ + public APIgetUserBadgesRequest skip(@javax.annotation.Nullable Double skip) { + this.skip = skip; + return this; } /** - * Build call for getUser + * Build call for getUserBadges * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -15760,12 +19450,12 @@ private APIgetUserRequest(@javax.annotation.Nonnull String tenantId, @javax.anno */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getUserCall(tenantId, id, _callback); + return getUserBadgesCall(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, _callback); } /** - * Execute getUser request - * @return GetUserResponse + * Execute getUserBadges request + * @return APIGetUserBadgesResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15775,14 +19465,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetUserResponse execute() throws ApiException { - ApiResponse localVarResp = getUserWithHttpInfo(tenantId, id); + public APIGetUserBadgesResponse execute() throws ApiException { + ApiResponse localVarResp = getUserBadgesWithHttpInfo(tenantId, userId, badgeId, type, displayedOnComments, limit, skip); return localVarResp.getData(); } /** - * Execute getUser request with HTTP info returned - * @return ApiResponse<GetUserResponse> + * Execute getUserBadges request with HTTP info returned + * @return ApiResponse<APIGetUserBadgesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15792,12 +19482,12 @@ public GetUserResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUserWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getUserBadgesWithHttpInfo(tenantId, userId, badgeId, type, displayedOnComments, limit, skip); } /** - * Execute getUser request (asynchronously) + * Execute getUserBadges request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -15809,8 +19499,8 @@ public ApiResponse executeWithHttpInfo() throws ApiException { 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getUserAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getUserBadgesAsync(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, _callback); } } @@ -15818,8 +19508,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t * * * @param tenantId (required) - * @param id (required) - * @return APIgetUserRequest + * @return APIgetUserBadgesRequest * @http.response.details @@ -15828,10 +19517,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t
Response Details
0 Error -
*/ - public APIgetUserRequest getUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetUserRequest(tenantId, id); + public APIgetUserBadgesRequest getUserBadges(@javax.annotation.Nonnull String tenantId) { + return new APIgetUserBadgesRequest(tenantId); } - private okhttp3.Call getUserBadgeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getVotesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -15848,8 +19537,7 @@ private okhttp3.Call getUserBadgeCall(@javax.annotation.Nonnull String tenantId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/user-badges/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/votes"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -15861,6 +19549,10 @@ private okhttp3.Call getUserBadgeCall(@javax.annotation.Nonnull String tenantId, localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + } + final String[] localVarAccepts = { "application/json" }; @@ -15881,49 +19573,49 @@ private okhttp3.Call getUserBadgeCall(@javax.annotation.Nonnull String tenantId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserBadgeValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getVotesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadge(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getVotes(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getUserBadge(Async)"); + // verify the required parameter 'urlId' is set + if (urlId == null) { + throw new ApiException("Missing the required parameter 'urlId' when calling getVotes(Async)"); } - return getUserBadgeCall(tenantId, id, _callback); + return getVotesCall(tenantId, urlId, _callback); } - private ApiResponse getUserBadgeWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getUserBadgeValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getVotesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) throws ApiException { + okhttp3.Call localVarCall = getVotesValidateBeforeCall(tenantId, urlId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getUserBadgeAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getVotesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getUserBadgeValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getVotesValidateBeforeCall(tenantId, urlId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetUserBadgeRequest { + public class APIgetVotesRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String id; + private final String urlId; - private APIgetUserBadgeRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetVotesRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { this.tenantId = tenantId; - this.id = id; + this.urlId = urlId; } /** - * Build call for getUserBadge + * Build call for getVotes * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -15936,12 +19628,12 @@ private APIgetUserBadgeRequest(@javax.annotation.Nonnull String tenantId, @javax */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getUserBadgeCall(tenantId, id, _callback); + return getVotesCall(tenantId, urlId, _callback); } /** - * Execute getUserBadge request - * @return APIGetUserBadgeResponse + * Execute getVotes request + * @return GetVotesResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15951,14 +19643,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public APIGetUserBadgeResponse execute() throws ApiException { - ApiResponse localVarResp = getUserBadgeWithHttpInfo(tenantId, id); + public GetVotesResponse execute() throws ApiException { + ApiResponse localVarResp = getVotesWithHttpInfo(tenantId, urlId); return localVarResp.getData(); } /** - * Execute getUserBadge request with HTTP info returned - * @return ApiResponse<APIGetUserBadgeResponse> + * Execute getVotes request with HTTP info returned + * @return ApiResponse<GetVotesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -15968,12 +19660,12 @@ public APIGetUserBadgeResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUserBadgeWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getVotesWithHttpInfo(tenantId, urlId); } /** - * Execute getUserBadge request (asynchronously) + * Execute getVotes request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -15985,8 +19677,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExce 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getUserBadgeAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getVotesAsync(tenantId, urlId, _callback); } } @@ -15994,8 +19686,8 @@ public okhttp3.Call executeAsync(final ApiCallback _cal * * * @param tenantId (required) - * @param id (required) - * @return APIgetUserBadgeRequest + * @param urlId (required) + * @return APIgetVotesRequest * @http.response.details @@ -16004,10 +19696,10 @@ public okhttp3.Call executeAsync(final ApiCallback _cal
Response Details
0 Error -
*/ - public APIgetUserBadgeRequest getUserBadge(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetUserBadgeRequest(tenantId, id); + public APIgetVotesRequest getVotes(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + return new APIgetVotesRequest(tenantId, urlId); } - private okhttp3.Call getUserBadgeProgressByIdCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getVotesForUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -16024,8 +19716,7 @@ private okhttp3.Call getUserBadgeProgressByIdCall(@javax.annotation.Nonnull Stri Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/user-badge-progress/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/votes/for-user"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -16037,6 +19728,18 @@ private okhttp3.Call getUserBadgeProgressByIdCall(@javax.annotation.Nonnull Stri localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + } + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + + if (anonUserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("anonUserId", anonUserId)); + } + final String[] localVarAccepts = { "application/json" }; @@ -16057,49 +19760,73 @@ private okhttp3.Call getUserBadgeProgressByIdCall(@javax.annotation.Nonnull Stri } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserBadgeProgressByIdValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getVotesForUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadgeProgressById(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getVotesForUser(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getUserBadgeProgressById(Async)"); + // verify the required parameter 'urlId' is set + if (urlId == null) { + throw new ApiException("Missing the required parameter 'urlId' when calling getVotesForUser(Async)"); } - return getUserBadgeProgressByIdCall(tenantId, id, _callback); + return getVotesForUserCall(tenantId, urlId, userId, anonUserId, _callback); } - private ApiResponse getUserBadgeProgressByIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getUserBadgeProgressByIdValidateBeforeCall(tenantId, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getVotesForUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId) throws ApiException { + okhttp3.Call localVarCall = getVotesForUserValidateBeforeCall(tenantId, urlId, userId, anonUserId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getUserBadgeProgressByIdAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getVotesForUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getUserBadgeProgressByIdValidateBeforeCall(tenantId, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getVotesForUserValidateBeforeCall(tenantId, urlId, userId, anonUserId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetUserBadgeProgressByIdRequest { + public class APIgetVotesForUserRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String id; + private final String urlId; + @javax.annotation.Nullable + private String userId; + @javax.annotation.Nullable + private String anonUserId; - private APIgetUserBadgeProgressByIdRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { + private APIgetVotesForUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { this.tenantId = tenantId; - this.id = id; + this.urlId = urlId; } /** - * Build call for getUserBadgeProgressById + * Set userId + * @param userId (optional) + * @return APIgetVotesForUserRequest + */ + public APIgetVotesForUserRequest userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Set anonUserId + * @param anonUserId (optional) + * @return APIgetVotesForUserRequest + */ + public APIgetVotesForUserRequest anonUserId(@javax.annotation.Nullable String anonUserId) { + this.anonUserId = anonUserId; + return this; + } + + /** + * Build call for getVotesForUser * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -16112,12 +19839,12 @@ private APIgetUserBadgeProgressByIdRequest(@javax.annotation.Nonnull String tena */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getUserBadgeProgressByIdCall(tenantId, id, _callback); + return getVotesForUserCall(tenantId, urlId, userId, anonUserId, _callback); } /** - * Execute getUserBadgeProgressById request - * @return APIGetUserBadgeProgressResponse + * Execute getVotesForUser request + * @return GetVotesForUserResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -16127,14 +19854,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public APIGetUserBadgeProgressResponse execute() throws ApiException { - ApiResponse localVarResp = getUserBadgeProgressByIdWithHttpInfo(tenantId, id); + public GetVotesForUserResponse execute() throws ApiException { + ApiResponse localVarResp = getVotesForUserWithHttpInfo(tenantId, urlId, userId, anonUserId); return localVarResp.getData(); } /** - * Execute getUserBadgeProgressById request with HTTP info returned - * @return ApiResponse<APIGetUserBadgeProgressResponse> + * Execute getVotesForUser request with HTTP info returned + * @return ApiResponse<GetVotesForUserResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -16144,12 +19871,12 @@ public APIGetUserBadgeProgressResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUserBadgeProgressByIdWithHttpInfo(tenantId, id); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getVotesForUserWithHttpInfo(tenantId, urlId, userId, anonUserId); } /** - * Execute getUserBadgeProgressById request (asynchronously) + * Execute getVotesForUser request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -16161,8 +19888,8 @@ public ApiResponse executeWithHttpInfo() throws 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getUserBadgeProgressByIdAsync(tenantId, id, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getVotesForUserAsync(tenantId, urlId, userId, anonUserId, _callback); } } @@ -16170,8 +19897,8 @@ public okhttp3.Call executeAsync(final ApiCallback Response Details @@ -16180,10 +19907,10 @@ public okhttp3.Call executeAsync(final ApiCallback 0 Error - */ - public APIgetUserBadgeProgressByIdRequest getUserBadgeProgressById(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { - return new APIgetUserBadgeProgressByIdRequest(tenantId, id); + public APIgetVotesForUserRequest getVotesForUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + return new APIgetVotesForUserRequest(tenantId, urlId); } - private okhttp3.Call getUserBadgeProgressByUserIdCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWebhookSamplePayloadsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable WebhookEventName event, @javax.annotation.Nullable Double limit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -16200,8 +19927,7 @@ private okhttp3.Call getUserBadgeProgressByUserIdCall(@javax.annotation.Nonnull Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/user-badge-progress/user/{userId}" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + String localVarPath = "/api/v1/webhooks/sample-payloads"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -16213,6 +19939,14 @@ private okhttp3.Call getUserBadgeProgressByUserIdCall(@javax.annotation.Nonnull localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (event != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("event", event)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + final String[] localVarAccepts = { "application/json" }; @@ -16233,49 +19967,65 @@ private okhttp3.Call getUserBadgeProgressByUserIdCall(@javax.annotation.Nonnull } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserBadgeProgressByUserIdValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWebhookSamplePayloadsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable WebhookEventName event, @javax.annotation.Nullable Double limit, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadgeProgressByUserId(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling getUserBadgeProgressByUserId(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getWebhookSamplePayloads(Async)"); } - return getUserBadgeProgressByUserIdCall(tenantId, userId, _callback); + return getWebhookSamplePayloadsCall(tenantId, event, limit, _callback); } - private ApiResponse getUserBadgeProgressByUserIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId) throws ApiException { - okhttp3.Call localVarCall = getUserBadgeProgressByUserIdValidateBeforeCall(tenantId, userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getWebhookSamplePayloadsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable WebhookEventName event, @javax.annotation.Nullable Double limit) throws ApiException { + okhttp3.Call localVarCall = getWebhookSamplePayloadsValidateBeforeCall(tenantId, event, limit, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getUserBadgeProgressByUserIdAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWebhookSamplePayloadsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable WebhookEventName event, @javax.annotation.Nullable Double limit, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getUserBadgeProgressByUserIdValidateBeforeCall(tenantId, userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getWebhookSamplePayloadsValidateBeforeCall(tenantId, event, limit, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetUserBadgeProgressByUserIdRequest { + public class APIgetWebhookSamplePayloadsRequest { @javax.annotation.Nonnull private final String tenantId; - @javax.annotation.Nonnull - private final String userId; + @javax.annotation.Nullable + private WebhookEventName event; + @javax.annotation.Nullable + private Double limit; - private APIgetUserBadgeProgressByUserIdRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId) { + private APIgetWebhookSamplePayloadsRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; - this.userId = userId; } /** - * Build call for getUserBadgeProgressByUserId + * Set event + * @param event (optional) + * @return APIgetWebhookSamplePayloadsRequest + */ + public APIgetWebhookSamplePayloadsRequest event(@javax.annotation.Nullable WebhookEventName event) { + this.event = event; + return this; + } + + /** + * Set limit + * @param limit (optional) + * @return APIgetWebhookSamplePayloadsRequest + */ + public APIgetWebhookSamplePayloadsRequest limit(@javax.annotation.Nullable Double limit) { + this.limit = limit; + return this; + } + + /** + * Build call for getWebhookSamplePayloads * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -16288,12 +20038,12 @@ private APIgetUserBadgeProgressByUserIdRequest(@javax.annotation.Nonnull String */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getUserBadgeProgressByUserIdCall(tenantId, userId, _callback); + return getWebhookSamplePayloadsCall(tenantId, event, limit, _callback); } /** - * Execute getUserBadgeProgressByUserId request - * @return APIGetUserBadgeProgressResponse + * Execute getWebhookSamplePayloads request + * @return GetWebhookSamplePayloadsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -16303,14 +20053,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public APIGetUserBadgeProgressResponse execute() throws ApiException { - ApiResponse localVarResp = getUserBadgeProgressByUserIdWithHttpInfo(tenantId, userId); + public GetWebhookSamplePayloadsResponse execute() throws ApiException { + ApiResponse localVarResp = getWebhookSamplePayloadsWithHttpInfo(tenantId, event, limit); return localVarResp.getData(); } /** - * Execute getUserBadgeProgressByUserId request with HTTP info returned - * @return ApiResponse<APIGetUserBadgeProgressResponse> + * Execute getWebhookSamplePayloads request with HTTP info returned + * @return ApiResponse<GetWebhookSamplePayloadsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -16320,12 +20070,12 @@ public APIGetUserBadgeProgressResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUserBadgeProgressByUserIdWithHttpInfo(tenantId, userId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getWebhookSamplePayloadsWithHttpInfo(tenantId, event, limit); } /** - * Execute getUserBadgeProgressByUserId request (asynchronously) + * Execute getWebhookSamplePayloads request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -16337,17 +20087,16 @@ public ApiResponse executeWithHttpInfo() throws 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getUserBadgeProgressByUserIdAsync(tenantId, userId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getWebhookSamplePayloadsAsync(tenantId, event, limit, _callback); } } /** * - * + * Recent comments in exactly the shape webhook deliveries use, for building integrations (for example Zapier sample data). Every event delivers the same comment object, so `event` only has to be valid. * @param tenantId (required) - * @param userId (required) - * @return APIgetUserBadgeProgressByUserIdRequest + * @return APIgetWebhookSamplePayloadsRequest * @http.response.details @@ -16356,10 +20105,10 @@ public okhttp3.Call executeAsync(final ApiCallback
Response Details
0 Error -
*/ - public APIgetUserBadgeProgressByUserIdRequest getUserBadgeProgressByUserId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String userId) { - return new APIgetUserBadgeProgressByUserIdRequest(tenantId, userId); + public APIgetWebhookSamplePayloadsRequest getWebhookSamplePayloads(@javax.annotation.Nonnull String tenantId) { + return new APIgetWebhookSamplePayloadsRequest(tenantId); } - private okhttp3.Call getUserBadgeProgressListCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWebhooksCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable WebhookEventName event, @javax.annotation.Nullable String domain, @javax.annotation.Nullable WebhookSource source, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -16376,7 +20125,7 @@ private okhttp3.Call getUserBadgeProgressListCall(@javax.annotation.Nonnull Stri Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v1/user-badge-progress"; + String localVarPath = "/api/v1/webhooks"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -16388,12 +20137,16 @@ private okhttp3.Call getUserBadgeProgressListCall(@javax.annotation.Nonnull Stri localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + if (event != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("event", event)); } - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + if (domain != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("domain", domain)); + } + + if (source != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("source", source)); } if (skip != null) { @@ -16420,77 +20173,89 @@ private okhttp3.Call getUserBadgeProgressListCall(@javax.annotation.Nonnull Stri } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserBadgeProgressListValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWebhooksValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable WebhookEventName event, @javax.annotation.Nullable String domain, @javax.annotation.Nullable WebhookSource source, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadgeProgressList(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling getWebhooks(Async)"); } - return getUserBadgeProgressListCall(tenantId, userId, limit, skip, _callback); + return getWebhooksCall(tenantId, event, domain, source, skip, _callback); } - private ApiResponse getUserBadgeProgressListWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getUserBadgeProgressListValidateBeforeCall(tenantId, userId, limit, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse getWebhooksWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable WebhookEventName event, @javax.annotation.Nullable String domain, @javax.annotation.Nullable WebhookSource source, @javax.annotation.Nullable Double skip) throws ApiException { + okhttp3.Call localVarCall = getWebhooksValidateBeforeCall(tenantId, event, domain, source, skip, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getUserBadgeProgressListAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWebhooksAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable WebhookEventName event, @javax.annotation.Nullable String domain, @javax.annotation.Nullable WebhookSource source, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getUserBadgeProgressListValidateBeforeCall(tenantId, userId, limit, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getWebhooksValidateBeforeCall(tenantId, event, domain, source, skip, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetUserBadgeProgressListRequest { + public class APIgetWebhooksRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nullable - private String userId; + private WebhookEventName event; @javax.annotation.Nullable - private Double limit; + private String domain; + @javax.annotation.Nullable + private WebhookSource source; @javax.annotation.Nullable private Double skip; - private APIgetUserBadgeProgressListRequest(@javax.annotation.Nonnull String tenantId) { + private APIgetWebhooksRequest(@javax.annotation.Nonnull String tenantId) { this.tenantId = tenantId; } /** - * Set userId - * @param userId (optional) - * @return APIgetUserBadgeProgressListRequest + * Set event + * @param event (optional) + * @return APIgetWebhooksRequest */ - public APIgetUserBadgeProgressListRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; + public APIgetWebhooksRequest event(@javax.annotation.Nullable WebhookEventName event) { + this.event = event; return this; } /** - * Set limit - * @param limit (optional) - * @return APIgetUserBadgeProgressListRequest + * Set domain + * @param domain (optional) + * @return APIgetWebhooksRequest */ - public APIgetUserBadgeProgressListRequest limit(@javax.annotation.Nullable Double limit) { - this.limit = limit; + public APIgetWebhooksRequest domain(@javax.annotation.Nullable String domain) { + this.domain = domain; + return this; + } + + /** + * Set source + * @param source (optional) + * @return APIgetWebhooksRequest + */ + public APIgetWebhooksRequest source(@javax.annotation.Nullable WebhookSource source) { + this.source = source; return this; } /** * Set skip * @param skip (optional) - * @return APIgetUserBadgeProgressListRequest + * @return APIgetWebhooksRequest */ - public APIgetUserBadgeProgressListRequest skip(@javax.annotation.Nullable Double skip) { + public APIgetWebhooksRequest skip(@javax.annotation.Nullable Double skip) { this.skip = skip; return this; } /** - * Build call for getUserBadgeProgressList + * Build call for getWebhooks * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -16503,12 +20268,12 @@ public APIgetUserBadgeProgressListRequest skip(@javax.annotation.Nullable Double */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getUserBadgeProgressListCall(tenantId, userId, limit, skip, _callback); + return getWebhooksCall(tenantId, event, domain, source, skip, _callback); } /** - * Execute getUserBadgeProgressList request - * @return APIGetUserBadgeProgressListResponse + * Execute getWebhooks request + * @return GetWebhooksResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -16518,14 +20283,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public APIGetUserBadgeProgressListResponse execute() throws ApiException { - ApiResponse localVarResp = getUserBadgeProgressListWithHttpInfo(tenantId, userId, limit, skip); + public GetWebhooksResponse execute() throws ApiException { + ApiResponse localVarResp = getWebhooksWithHttpInfo(tenantId, event, domain, source, skip); return localVarResp.getData(); } /** - * Execute getUserBadgeProgressList request with HTTP info returned - * @return ApiResponse<APIGetUserBadgeProgressListResponse> + * Execute getWebhooks request with HTTP info returned + * @return ApiResponse<GetWebhooksResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -16535,12 +20300,12 @@ public APIGetUserBadgeProgressListResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUserBadgeProgressListWithHttpInfo(tenantId, userId, limit, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getWebhooksWithHttpInfo(tenantId, event, domain, source, skip); } /** - * Execute getUserBadgeProgressList request (asynchronously) + * Execute getWebhooks request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -16552,16 +20317,16 @@ public ApiResponse executeWithHttpInfo() th 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getUserBadgeProgressListAsync(tenantId, userId, limit, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getWebhooksAsync(tenantId, event, domain, source, skip, _callback); } } /** * - * + * Lists the webhooks configured for the tenant, both dashboard-managed rows and API subscriptions. * @param tenantId (required) - * @return APIgetUserBadgeProgressListRequest + * @return APIgetWebhooksRequest * @http.response.details @@ -16570,10 +20335,10 @@ public okhttp3.Call executeAsync(final ApiCallback
Response Details
0 Error -
*/ - public APIgetUserBadgeProgressListRequest getUserBadgeProgressList(@javax.annotation.Nonnull String tenantId) { - return new APIgetUserBadgeProgressListRequest(tenantId); + public APIgetWebhooksRequest getWebhooks(@javax.annotation.Nonnull String tenantId) { + return new APIgetWebhooksRequest(tenantId); } - private okhttp3.Call getUserBadgesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String badgeId, @javax.annotation.Nullable Double type, @javax.annotation.Nullable Boolean displayedOnComments, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call migratePagesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull MigrateAPIPagesData migrateAPIPagesData, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -16587,10 +20352,10 @@ private okhttp3.Call getUserBadgesCall(@javax.annotation.Nonnull String tenantId basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = migrateAPIPagesData; // create path and map variables - String localVarPath = "/api/v1/user-badges"; + String localVarPath = "/api/v1/pages/migrations"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -16602,30 +20367,6 @@ private okhttp3.Call getUserBadgesCall(@javax.annotation.Nonnull String tenantId localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - if (badgeId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("badgeId", badgeId)); - } - - if (type != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); - } - - if (displayedOnComments != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("displayedOnComments", displayedOnComments)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (skip != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); - } - final String[] localVarAccepts = { "application/json" }; @@ -16635,6 +20376,7 @@ private okhttp3.Call getUserBadgesCall(@javax.annotation.Nonnull String tenantId } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -16642,117 +20384,53 @@ private okhttp3.Call getUserBadgesCall(@javax.annotation.Nonnull String tenantId } String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserBadgesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String badgeId, @javax.annotation.Nullable Double type, @javax.annotation.Nullable Boolean displayedOnComments, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call migratePagesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull MigrateAPIPagesData migrateAPIPagesData, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getUserBadges(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling migratePages(Async)"); } - return getUserBadgesCall(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, _callback); + // verify the required parameter 'migrateAPIPagesData' is set + if (migrateAPIPagesData == null) { + throw new ApiException("Missing the required parameter 'migrateAPIPagesData' when calling migratePages(Async)"); + } + + return migratePagesCall(tenantId, migrateAPIPagesData, _callback); } - private ApiResponse getUserBadgesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String badgeId, @javax.annotation.Nullable Double type, @javax.annotation.Nullable Boolean displayedOnComments, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip) throws ApiException { - okhttp3.Call localVarCall = getUserBadgesValidateBeforeCall(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse migratePagesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull MigrateAPIPagesData migrateAPIPagesData) throws ApiException { + okhttp3.Call localVarCall = migratePagesValidateBeforeCall(tenantId, migrateAPIPagesData, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getUserBadgesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String badgeId, @javax.annotation.Nullable Double type, @javax.annotation.Nullable Boolean displayedOnComments, @javax.annotation.Nullable Double limit, @javax.annotation.Nullable Double skip, final ApiCallback _callback) throws ApiException { + private okhttp3.Call migratePagesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull MigrateAPIPagesData migrateAPIPagesData, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getUserBadgesValidateBeforeCall(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = migratePagesValidateBeforeCall(tenantId, migrateAPIPagesData, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - - public class APIgetUserBadgesRequest { - @javax.annotation.Nonnull - private final String tenantId; - @javax.annotation.Nullable - private String userId; - @javax.annotation.Nullable - private String badgeId; - @javax.annotation.Nullable - private Double type; - @javax.annotation.Nullable - private Boolean displayedOnComments; - @javax.annotation.Nullable - private Double limit; - @javax.annotation.Nullable - private Double skip; - - private APIgetUserBadgesRequest(@javax.annotation.Nonnull String tenantId) { - this.tenantId = tenantId; - } - - /** - * Set userId - * @param userId (optional) - * @return APIgetUserBadgesRequest - */ - public APIgetUserBadgesRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; - return this; - } - - /** - * Set badgeId - * @param badgeId (optional) - * @return APIgetUserBadgesRequest - */ - public APIgetUserBadgesRequest badgeId(@javax.annotation.Nullable String badgeId) { - this.badgeId = badgeId; - return this; - } - - /** - * Set type - * @param type (optional) - * @return APIgetUserBadgesRequest - */ - public APIgetUserBadgesRequest type(@javax.annotation.Nullable Double type) { - this.type = type; - return this; - } - - /** - * Set displayedOnComments - * @param displayedOnComments (optional) - * @return APIgetUserBadgesRequest - */ - public APIgetUserBadgesRequest displayedOnComments(@javax.annotation.Nullable Boolean displayedOnComments) { - this.displayedOnComments = displayedOnComments; - return this; - } - - /** - * Set limit - * @param limit (optional) - * @return APIgetUserBadgesRequest - */ - public APIgetUserBadgesRequest limit(@javax.annotation.Nullable Double limit) { - this.limit = limit; - return this; - } - - /** - * Set skip - * @param skip (optional) - * @return APIgetUserBadgesRequest - */ - public APIgetUserBadgesRequest skip(@javax.annotation.Nullable Double skip) { - this.skip = skip; - return this; + + public class APImigratePagesRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final MigrateAPIPagesData migrateAPIPagesData; + + private APImigratePagesRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull MigrateAPIPagesData migrateAPIPagesData) { + this.tenantId = tenantId; + this.migrateAPIPagesData = migrateAPIPagesData; } /** - * Build call for getUserBadges + * Build call for migratePages * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -16761,48 +20439,45 @@ public APIgetUserBadgesRequest skip(@javax.annotation.Nullable Double skip) { Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getUserBadgesCall(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, _callback); + return migratePagesCall(tenantId, migrateAPIPagesData, _callback); } /** - * Execute getUserBadges request - * @return APIGetUserBadgesResponse + * Execute migratePages request + * @return QueuePageMigrationJobAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIGetUserBadgesResponse execute() throws ApiException { - ApiResponse localVarResp = getUserBadgesWithHttpInfo(tenantId, userId, badgeId, type, displayedOnComments, limit, skip); + public QueuePageMigrationJobAPIResponse execute() throws ApiException { + ApiResponse localVarResp = migratePagesWithHttpInfo(tenantId, migrateAPIPagesData); return localVarResp.getData(); } /** - * Execute getUserBadges request with HTTP info returned - * @return ApiResponse<APIGetUserBadgesResponse> + * Execute migratePages request with HTTP info returned + * @return ApiResponse<QueuePageMigrationJobAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUserBadgesWithHttpInfo(tenantId, userId, badgeId, type, displayedOnComments, limit, skip); + public ApiResponse executeWithHttpInfo() throws ApiException { + return migratePagesWithHttpInfo(tenantId, migrateAPIPagesData); } /** - * Execute getUserBadges request (asynchronously) + * Execute migratePages request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -16811,31 +20486,30 @@ public ApiResponse executeWithHttpInfo() throws ApiExc Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getUserBadgesAsync(tenantId, userId, badgeId, type, displayedOnComments, limit, skip, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return migratePagesAsync(tenantId, migrateAPIPagesData, _callback); } } /** * - * + * Queues a batch job that moves comments, pages and related records from one urlId or domain to another. \"urlId\" migrations only match the exact urlId. \"domain\" migrations find/replace the value inside every urlId and url. Poll GET /api/v1/batch-jobs/{batchJobId}: once it is done it carries per-migration results and an undoId. * @param tenantId (required) - * @return APIgetUserBadgesRequest + * @param migrateAPIPagesData (required) + * @return APImigratePagesRequest * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetUserBadgesRequest getUserBadges(@javax.annotation.Nonnull String tenantId) { - return new APIgetUserBadgesRequest(tenantId); + public APImigratePagesRequest migratePages(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull MigrateAPIPagesData migrateAPIPagesData) { + return new APImigratePagesRequest(tenantId, migrateAPIPagesData); } - private okhttp3.Call getVotesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchDomainConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -16849,10 +20523,11 @@ private okhttp3.Call getVotesCall(@javax.annotation.Nonnull String tenantId, @ja basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = patchDomainConfigParams; // create path and map variables - String localVarPath = "/api/v1/votes"; + String localVarPath = "/api/v1/domain-configs/{domainToUpdate}" + .replace("{" + "domainToUpdate" + "}", localVarApiClient.escapeString(domainToUpdate.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -16864,10 +20539,6 @@ private okhttp3.Call getVotesCall(@javax.annotation.Nonnull String tenantId, @ja localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (urlId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); - } - final String[] localVarAccepts = { "application/json" }; @@ -16877,6 +20548,7 @@ private okhttp3.Call getVotesCall(@javax.annotation.Nonnull String tenantId, @ja } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -16884,53 +20556,61 @@ private okhttp3.Call getVotesCall(@javax.annotation.Nonnull String tenantId, @ja } String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getVotesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchDomainConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getVotes(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling patchDomainConfig(Async)"); } - // verify the required parameter 'urlId' is set - if (urlId == null) { - throw new ApiException("Missing the required parameter 'urlId' when calling getVotes(Async)"); + // verify the required parameter 'domainToUpdate' is set + if (domainToUpdate == null) { + throw new ApiException("Missing the required parameter 'domainToUpdate' when calling patchDomainConfig(Async)"); } - return getVotesCall(tenantId, urlId, _callback); + // verify the required parameter 'patchDomainConfigParams' is set + if (patchDomainConfigParams == null) { + throw new ApiException("Missing the required parameter 'patchDomainConfigParams' when calling patchDomainConfig(Async)"); + } + + return patchDomainConfigCall(tenantId, domainToUpdate, patchDomainConfigParams, _callback); } - private ApiResponse getVotesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) throws ApiException { - okhttp3.Call localVarCall = getVotesValidateBeforeCall(tenantId, urlId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse patchDomainConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams) throws ApiException { + okhttp3.Call localVarCall = patchDomainConfigValidateBeforeCall(tenantId, domainToUpdate, patchDomainConfigParams, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getVotesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchDomainConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getVotesValidateBeforeCall(tenantId, urlId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = patchDomainConfigValidateBeforeCall(tenantId, domainToUpdate, patchDomainConfigParams, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetVotesRequest { + public class APIpatchDomainConfigRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String urlId; + private final String domainToUpdate; + @javax.annotation.Nonnull + private final PatchDomainConfigParams patchDomainConfigParams; - private APIgetVotesRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + private APIpatchDomainConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams) { this.tenantId = tenantId; - this.urlId = urlId; + this.domainToUpdate = domainToUpdate; + this.patchDomainConfigParams = patchDomainConfigParams; } /** - * Build call for getVotes + * Build call for patchDomainConfig * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -16939,48 +20619,45 @@ private APIgetVotesRequest(@javax.annotation.Nonnull String tenantId, @javax.ann Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getVotesCall(tenantId, urlId, _callback); + return patchDomainConfigCall(tenantId, domainToUpdate, patchDomainConfigParams, _callback); } /** - * Execute getVotes request - * @return GetVotesResponse + * Execute patchDomainConfig request + * @return PatchDomainConfigResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public GetVotesResponse execute() throws ApiException { - ApiResponse localVarResp = getVotesWithHttpInfo(tenantId, urlId); + public PatchDomainConfigResponse execute() throws ApiException { + ApiResponse localVarResp = patchDomainConfigWithHttpInfo(tenantId, domainToUpdate, patchDomainConfigParams); return localVarResp.getData(); } /** - * Execute getVotes request with HTTP info returned - * @return ApiResponse<GetVotesResponse> + * Execute patchDomainConfig request with HTTP info returned + * @return ApiResponse<PatchDomainConfigResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getVotesWithHttpInfo(tenantId, urlId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return patchDomainConfigWithHttpInfo(tenantId, domainToUpdate, patchDomainConfigParams); } /** - * Execute getVotes request (asynchronously) + * Execute patchDomainConfig request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -16989,11 +20666,10 @@ public ApiResponse executeWithHttpInfo() throws ApiException { Response Details Status Code Description Response Headers 200 Ok - - 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getVotesAsync(tenantId, urlId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return patchDomainConfigAsync(tenantId, domainToUpdate, patchDomainConfigParams, _callback); } } @@ -17001,20 +20677,20 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) * * * @param tenantId (required) - * @param urlId (required) - * @return APIgetVotesRequest + * @param domainToUpdate (required) + * @param patchDomainConfigParams (required) + * @return APIpatchDomainConfigRequest * @http.response.details -
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIgetVotesRequest getVotes(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { - return new APIgetVotesRequest(tenantId, urlId); + public APIpatchDomainConfigRequest patchDomainConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams) { + return new APIpatchDomainConfigRequest(tenantId, domainToUpdate, patchDomainConfigParams); } - private okhttp3.Call getVotesForUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchHashTagCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag, @javax.annotation.Nullable UpdateHashTagBody updateHashTagBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -17028,10 +20704,11 @@ private okhttp3.Call getVotesForUserCall(@javax.annotation.Nonnull String tenant basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = updateHashTagBody; // create path and map variables - String localVarPath = "/api/v1/votes/for-user"; + String localVarPath = "/api/v1/hash-tags/{tag}" + .replace("{" + "tag" + "}", localVarApiClient.escapeString(tag.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -17043,18 +20720,6 @@ private okhttp3.Call getVotesForUserCall(@javax.annotation.Nonnull String tenant localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (urlId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - if (anonUserId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("anonUserId", anonUserId)); - } - final String[] localVarAccepts = { "application/json" }; @@ -17064,6 +20729,7 @@ private okhttp3.Call getVotesForUserCall(@javax.annotation.Nonnull String tenant } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -17071,77 +20737,65 @@ private okhttp3.Call getVotesForUserCall(@javax.annotation.Nonnull String tenant } String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getVotesForUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchHashTagValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag, @javax.annotation.Nullable UpdateHashTagBody updateHashTagBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling getVotesForUser(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling patchHashTag(Async)"); } - // verify the required parameter 'urlId' is set - if (urlId == null) { - throw new ApiException("Missing the required parameter 'urlId' when calling getVotesForUser(Async)"); + // verify the required parameter 'tag' is set + if (tag == null) { + throw new ApiException("Missing the required parameter 'tag' when calling patchHashTag(Async)"); } - return getVotesForUserCall(tenantId, urlId, userId, anonUserId, _callback); + return patchHashTagCall(tenantId, tag, updateHashTagBody, _callback); } - private ApiResponse getVotesForUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId) throws ApiException { - okhttp3.Call localVarCall = getVotesForUserValidateBeforeCall(tenantId, urlId, userId, anonUserId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse patchHashTagWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag, @javax.annotation.Nullable UpdateHashTagBody updateHashTagBody) throws ApiException { + okhttp3.Call localVarCall = patchHashTagValidateBeforeCall(tenantId, tag, updateHashTagBody, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getVotesForUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String anonUserId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchHashTagAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag, @javax.annotation.Nullable UpdateHashTagBody updateHashTagBody, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getVotesForUserValidateBeforeCall(tenantId, urlId, userId, anonUserId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = patchHashTagValidateBeforeCall(tenantId, tag, updateHashTagBody, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetVotesForUserRequest { + public class APIpatchHashTagRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String urlId; - @javax.annotation.Nullable - private String userId; + private final String tag; @javax.annotation.Nullable - private String anonUserId; + private UpdateHashTagBody updateHashTagBody; - private APIgetVotesForUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { + private APIpatchHashTagRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag) { this.tenantId = tenantId; - this.urlId = urlId; - } - - /** - * Set userId - * @param userId (optional) - * @return APIgetVotesForUserRequest - */ - public APIgetVotesForUserRequest userId(@javax.annotation.Nullable String userId) { - this.userId = userId; - return this; + this.tag = tag; } /** - * Set anonUserId - * @param anonUserId (optional) - * @return APIgetVotesForUserRequest + * Set updateHashTagBody + * @param updateHashTagBody (optional) + * @return APIpatchHashTagRequest */ - public APIgetVotesForUserRequest anonUserId(@javax.annotation.Nullable String anonUserId) { - this.anonUserId = anonUserId; + public APIpatchHashTagRequest updateHashTagBody(@javax.annotation.Nullable UpdateHashTagBody updateHashTagBody) { + this.updateHashTagBody = updateHashTagBody; return this; } /** - * Build call for getVotesForUser + * Build call for patchHashTag * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -17154,12 +20808,12 @@ public APIgetVotesForUserRequest anonUserId(@javax.annotation.Nullable String an */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getVotesForUserCall(tenantId, urlId, userId, anonUserId, _callback); + return patchHashTagCall(tenantId, tag, updateHashTagBody, _callback); } /** - * Execute getVotesForUser request - * @return GetVotesForUserResponse + * Execute patchHashTag request + * @return UpdateHashTagResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17169,14 +20823,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public GetVotesForUserResponse execute() throws ApiException { - ApiResponse localVarResp = getVotesForUserWithHttpInfo(tenantId, urlId, userId, anonUserId); + public UpdateHashTagResponse execute() throws ApiException { + ApiResponse localVarResp = patchHashTagWithHttpInfo(tenantId, tag, updateHashTagBody); return localVarResp.getData(); } /** - * Execute getVotesForUser request with HTTP info returned - * @return ApiResponse<GetVotesForUserResponse> + * Execute patchHashTag request with HTTP info returned + * @return ApiResponse<UpdateHashTagResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17186,12 +20840,12 @@ public GetVotesForUserResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getVotesForUserWithHttpInfo(tenantId, urlId, userId, anonUserId); + public ApiResponse executeWithHttpInfo() throws ApiException { + return patchHashTagWithHttpInfo(tenantId, tag, updateHashTagBody); } /** - * Execute getVotesForUser request (asynchronously) + * Execute patchHashTag request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -17203,8 +20857,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExce 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getVotesForUserAsync(tenantId, urlId, userId, anonUserId, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return patchHashTagAsync(tenantId, tag, updateHashTagBody, _callback); } } @@ -17212,8 +20866,8 @@ public okhttp3.Call executeAsync(final ApiCallback _cal * * * @param tenantId (required) - * @param urlId (required) - * @return APIgetVotesForUserRequest + * @param tag (required) + * @return APIpatchHashTagRequest * @http.response.details @@ -17222,10 +20876,10 @@ public okhttp3.Call executeAsync(final ApiCallback _cal
Response Details
0 Error -
*/ - public APIgetVotesForUserRequest getVotesForUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { - return new APIgetVotesForUserRequest(tenantId, urlId); + public APIpatchHashTagRequest patchHashTag(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag) { + return new APIpatchHashTagRequest(tenantId, tag); } - private okhttp3.Call patchDomainConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchPageCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -17239,11 +20893,11 @@ private okhttp3.Call patchDomainConfigCall(@javax.annotation.Nonnull String tena basePath = null; } - Object localVarPostBody = patchDomainConfigParams; + Object localVarPostBody = updateAPIPageData; // create path and map variables - String localVarPath = "/api/v1/domain-configs/{domainToUpdate}" - .replace("{" + "domainToUpdate" + "}", localVarApiClient.escapeString(domainToUpdate.toString())); + String localVarPath = "/api/v1/pages/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -17276,57 +20930,57 @@ private okhttp3.Call patchDomainConfigCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call patchDomainConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchPageValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling patchDomainConfig(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling patchPage(Async)"); } - // verify the required parameter 'domainToUpdate' is set - if (domainToUpdate == null) { - throw new ApiException("Missing the required parameter 'domainToUpdate' when calling patchDomainConfig(Async)"); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling patchPage(Async)"); } - // verify the required parameter 'patchDomainConfigParams' is set - if (patchDomainConfigParams == null) { - throw new ApiException("Missing the required parameter 'patchDomainConfigParams' when calling patchDomainConfig(Async)"); + // verify the required parameter 'updateAPIPageData' is set + if (updateAPIPageData == null) { + throw new ApiException("Missing the required parameter 'updateAPIPageData' when calling patchPage(Async)"); } - return patchDomainConfigCall(tenantId, domainToUpdate, patchDomainConfigParams, _callback); + return patchPageCall(tenantId, id, updateAPIPageData, _callback); } - private ApiResponse patchDomainConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams) throws ApiException { - okhttp3.Call localVarCall = patchDomainConfigValidateBeforeCall(tenantId, domainToUpdate, patchDomainConfigParams, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse patchPageWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData) throws ApiException { + okhttp3.Call localVarCall = patchPageValidateBeforeCall(tenantId, id, updateAPIPageData, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call patchDomainConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchPageAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = patchDomainConfigValidateBeforeCall(tenantId, domainToUpdate, patchDomainConfigParams, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = patchPageValidateBeforeCall(tenantId, id, updateAPIPageData, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIpatchDomainConfigRequest { + public class APIpatchPageRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String domainToUpdate; + private final String id; @javax.annotation.Nonnull - private final PatchDomainConfigParams patchDomainConfigParams; + private final UpdateAPIPageData updateAPIPageData; - private APIpatchDomainConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams) { + private APIpatchPageRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData) { this.tenantId = tenantId; - this.domainToUpdate = domainToUpdate; - this.patchDomainConfigParams = patchDomainConfigParams; + this.id = id; + this.updateAPIPageData = updateAPIPageData; } /** - * Build call for patchDomainConfig + * Build call for patchPage * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -17338,12 +20992,12 @@ private APIpatchDomainConfigRequest(@javax.annotation.Nonnull String tenantId, @ */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return patchDomainConfigCall(tenantId, domainToUpdate, patchDomainConfigParams, _callback); + return patchPageCall(tenantId, id, updateAPIPageData, _callback); } /** - * Execute patchDomainConfig request - * @return PatchDomainConfigResponse + * Execute patchPage request + * @return PatchPageAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17352,14 +21006,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
200 Ok -
*/ - public PatchDomainConfigResponse execute() throws ApiException { - ApiResponse localVarResp = patchDomainConfigWithHttpInfo(tenantId, domainToUpdate, patchDomainConfigParams); + public PatchPageAPIResponse execute() throws ApiException { + ApiResponse localVarResp = patchPageWithHttpInfo(tenantId, id, updateAPIPageData); return localVarResp.getData(); } /** - * Execute patchDomainConfig request with HTTP info returned - * @return ApiResponse<PatchDomainConfigResponse> + * Execute patchPage request with HTTP info returned + * @return ApiResponse<PatchPageAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17368,12 +21022,12 @@ public PatchDomainConfigResponse execute() throws ApiException {
200 Ok -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return patchDomainConfigWithHttpInfo(tenantId, domainToUpdate, patchDomainConfigParams); + public ApiResponse executeWithHttpInfo() throws ApiException { + return patchPageWithHttpInfo(tenantId, id, updateAPIPageData); } /** - * Execute patchDomainConfig request (asynchronously) + * Execute patchPage request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -17384,8 +21038,8 @@ public ApiResponse executeWithHttpInfo() throws ApiEx 200 Ok - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return patchDomainConfigAsync(tenantId, domainToUpdate, patchDomainConfigParams, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return patchPageAsync(tenantId, id, updateAPIPageData, _callback); } } @@ -17393,9 +21047,9 @@ public okhttp3.Call executeAsync(final ApiCallback _c * * * @param tenantId (required) - * @param domainToUpdate (required) - * @param patchDomainConfigParams (required) - * @return APIpatchDomainConfigRequest + * @param id (required) + * @param updateAPIPageData (required) + * @return APIpatchPageRequest * @http.response.details @@ -17403,10 +21057,10 @@ public okhttp3.Call executeAsync(final ApiCallback _c
Response Details
200 Ok -
*/ - public APIpatchDomainConfigRequest patchDomainConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull PatchDomainConfigParams patchDomainConfigParams) { - return new APIpatchDomainConfigRequest(tenantId, domainToUpdate, patchDomainConfigParams); + public APIpatchPageRequest patchPage(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData) { + return new APIpatchPageRequest(tenantId, id, updateAPIPageData); } - private okhttp3.Call patchHashTagCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag, @javax.annotation.Nullable UpdateHashTagBody updateHashTagBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchPollCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPatch commentPollPatch, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -17420,11 +21074,11 @@ private okhttp3.Call patchHashTagCall(@javax.annotation.Nonnull String tenantId, basePath = null; } - Object localVarPostBody = updateHashTagBody; + Object localVarPostBody = commentPollPatch; // create path and map variables - String localVarPath = "/api/v1/hash-tags/{tag}" - .replace("{" + "tag" + "}", localVarApiClient.escapeString(tag.toString())); + String localVarPath = "/api/v1/polls/{commentId}" + .replace("{" + "commentId" + "}", localVarApiClient.escapeString(commentId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -17457,61 +21111,57 @@ private okhttp3.Call patchHashTagCall(@javax.annotation.Nonnull String tenantId, } @SuppressWarnings("rawtypes") - private okhttp3.Call patchHashTagValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag, @javax.annotation.Nullable UpdateHashTagBody updateHashTagBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchPollValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPatch commentPollPatch, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling patchHashTag(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling patchPoll(Async)"); } - // verify the required parameter 'tag' is set - if (tag == null) { - throw new ApiException("Missing the required parameter 'tag' when calling patchHashTag(Async)"); + // verify the required parameter 'commentId' is set + if (commentId == null) { + throw new ApiException("Missing the required parameter 'commentId' when calling patchPoll(Async)"); } - return patchHashTagCall(tenantId, tag, updateHashTagBody, _callback); + // verify the required parameter 'commentPollPatch' is set + if (commentPollPatch == null) { + throw new ApiException("Missing the required parameter 'commentPollPatch' when calling patchPoll(Async)"); + } + + return patchPollCall(tenantId, commentId, commentPollPatch, _callback); } - private ApiResponse patchHashTagWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag, @javax.annotation.Nullable UpdateHashTagBody updateHashTagBody) throws ApiException { - okhttp3.Call localVarCall = patchHashTagValidateBeforeCall(tenantId, tag, updateHashTagBody, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse patchPollWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPatch commentPollPatch) throws ApiException { + okhttp3.Call localVarCall = patchPollValidateBeforeCall(tenantId, commentId, commentPollPatch, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call patchHashTagAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag, @javax.annotation.Nullable UpdateHashTagBody updateHashTagBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchPollAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPatch commentPollPatch, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = patchHashTagValidateBeforeCall(tenantId, tag, updateHashTagBody, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = patchPollValidateBeforeCall(tenantId, commentId, commentPollPatch, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIpatchHashTagRequest { + public class APIpatchPollRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String tag; - @javax.annotation.Nullable - private UpdateHashTagBody updateHashTagBody; + private final String commentId; + @javax.annotation.Nonnull + private final CommentPollPatch commentPollPatch; - private APIpatchHashTagRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag) { + private APIpatchPollRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPatch commentPollPatch) { this.tenantId = tenantId; - this.tag = tag; - } - - /** - * Set updateHashTagBody - * @param updateHashTagBody (optional) - * @return APIpatchHashTagRequest - */ - public APIpatchHashTagRequest updateHashTagBody(@javax.annotation.Nullable UpdateHashTagBody updateHashTagBody) { - this.updateHashTagBody = updateHashTagBody; - return this; + this.commentId = commentId; + this.commentPollPatch = commentPollPatch; } /** - * Build call for patchHashTag + * Build call for patchPoll * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -17524,12 +21174,12 @@ public APIpatchHashTagRequest updateHashTagBody(@javax.annotation.Nullable Updat */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return patchHashTagCall(tenantId, tag, updateHashTagBody, _callback); + return patchPollCall(tenantId, commentId, commentPollPatch, _callback); } /** - * Execute patchHashTag request - * @return UpdateHashTagResponse + * Execute patchPoll request + * @return SavePollResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17539,14 +21189,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
0 Error -
*/ - public UpdateHashTagResponse execute() throws ApiException { - ApiResponse localVarResp = patchHashTagWithHttpInfo(tenantId, tag, updateHashTagBody); + public SavePollResponse execute() throws ApiException { + ApiResponse localVarResp = patchPollWithHttpInfo(tenantId, commentId, commentPollPatch); return localVarResp.getData(); } /** - * Execute patchHashTag request with HTTP info returned - * @return ApiResponse<UpdateHashTagResponse> + * Execute patchPoll request with HTTP info returned + * @return ApiResponse<SavePollResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17556,12 +21206,12 @@ public UpdateHashTagResponse execute() throws ApiException {
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return patchHashTagWithHttpInfo(tenantId, tag, updateHashTagBody); + public ApiResponse executeWithHttpInfo() throws ApiException { + return patchPollWithHttpInfo(tenantId, commentId, commentPollPatch); } /** - * Execute patchHashTag request (asynchronously) + * Execute patchPoll request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -17573,17 +21223,18 @@ public ApiResponse executeWithHttpInfo() throws ApiExcept 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return patchHashTagAsync(tenantId, tag, updateHashTagBody, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return patchPollAsync(tenantId, commentId, commentPollPatch, _callback); } } /** * - * + * Edit a poll in place, keeping its tallies: change the question, relabel an option, close or reopen it, or change who may see the voters. Options are addressed by id - to add, remove or reorder them, PUT the full list. * @param tenantId (required) - * @param tag (required) - * @return APIpatchHashTagRequest + * @param commentId (required) + * @param commentPollPatch (required) + * @return APIpatchPollRequest * @http.response.details @@ -17592,10 +21243,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callb
Response Details
0 Error -
*/ - public APIpatchHashTagRequest patchHashTag(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String tag) { - return new APIpatchHashTagRequest(tenantId, tag); + public APIpatchPollRequest patchPoll(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPatch commentPollPatch) { + return new APIpatchPollRequest(tenantId, commentId, commentPollPatch); } - private okhttp3.Call patchPageCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchSSOUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData, @javax.annotation.Nullable Boolean updateComments, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -17609,10 +21260,10 @@ private okhttp3.Call patchPageCall(@javax.annotation.Nonnull String tenantId, @j basePath = null; } - Object localVarPostBody = updateAPIPageData; + Object localVarPostBody = updateAPISSOUserData; // create path and map variables - String localVarPath = "/api/v1/pages/{id}" + String localVarPath = "/api/v1/sso-users/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -17625,6 +21276,10 @@ private okhttp3.Call patchPageCall(@javax.annotation.Nonnull String tenantId, @j localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (updateComments != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("updateComments", updateComments)); + } + final String[] localVarAccepts = { "application/json" }; @@ -17646,57 +21301,69 @@ private okhttp3.Call patchPageCall(@javax.annotation.Nonnull String tenantId, @j } @SuppressWarnings("rawtypes") - private okhttp3.Call patchPageValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchSSOUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData, @javax.annotation.Nullable Boolean updateComments, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling patchPage(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling patchSSOUser(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling patchPage(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling patchSSOUser(Async)"); } - // verify the required parameter 'updateAPIPageData' is set - if (updateAPIPageData == null) { - throw new ApiException("Missing the required parameter 'updateAPIPageData' when calling patchPage(Async)"); + // verify the required parameter 'updateAPISSOUserData' is set + if (updateAPISSOUserData == null) { + throw new ApiException("Missing the required parameter 'updateAPISSOUserData' when calling patchSSOUser(Async)"); } - return patchPageCall(tenantId, id, updateAPIPageData, _callback); + return patchSSOUserCall(tenantId, id, updateAPISSOUserData, updateComments, _callback); } - private ApiResponse patchPageWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData) throws ApiException { - okhttp3.Call localVarCall = patchPageValidateBeforeCall(tenantId, id, updateAPIPageData, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse patchSSOUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData, @javax.annotation.Nullable Boolean updateComments) throws ApiException { + okhttp3.Call localVarCall = patchSSOUserValidateBeforeCall(tenantId, id, updateAPISSOUserData, updateComments, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call patchPageAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData, final ApiCallback _callback) throws ApiException { + private okhttp3.Call patchSSOUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData, @javax.annotation.Nullable Boolean updateComments, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = patchPageValidateBeforeCall(tenantId, id, updateAPIPageData, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = patchSSOUserValidateBeforeCall(tenantId, id, updateAPISSOUserData, updateComments, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIpatchPageRequest { + public class APIpatchSSOUserRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull private final String id; @javax.annotation.Nonnull - private final UpdateAPIPageData updateAPIPageData; + private final UpdateAPISSOUserData updateAPISSOUserData; + @javax.annotation.Nullable + private Boolean updateComments; - private APIpatchPageRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData) { + private APIpatchSSOUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData) { this.tenantId = tenantId; this.id = id; - this.updateAPIPageData = updateAPIPageData; + this.updateAPISSOUserData = updateAPISSOUserData; } /** - * Build call for patchPage + * Set updateComments + * @param updateComments (optional) + * @return APIpatchSSOUserRequest + */ + public APIpatchSSOUserRequest updateComments(@javax.annotation.Nullable Boolean updateComments) { + this.updateComments = updateComments; + return this; + } + + /** + * Build call for patchSSOUser * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -17708,12 +21375,12 @@ private APIpatchPageRequest(@javax.annotation.Nonnull String tenantId, @javax.an */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return patchPageCall(tenantId, id, updateAPIPageData, _callback); + return patchSSOUserCall(tenantId, id, updateAPISSOUserData, updateComments, _callback); } /** - * Execute patchPage request - * @return PatchPageAPIResponse + * Execute patchSSOUser request + * @return PatchSSOUserAPIResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17722,14 +21389,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
200 Ok -
*/ - public PatchPageAPIResponse execute() throws ApiException { - ApiResponse localVarResp = patchPageWithHttpInfo(tenantId, id, updateAPIPageData); + public PatchSSOUserAPIResponse execute() throws ApiException { + ApiResponse localVarResp = patchSSOUserWithHttpInfo(tenantId, id, updateAPISSOUserData, updateComments); return localVarResp.getData(); } /** - * Execute patchPage request with HTTP info returned - * @return ApiResponse<PatchPageAPIResponse> + * Execute patchSSOUser request with HTTP info returned + * @return ApiResponse<PatchSSOUserAPIResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17738,12 +21405,12 @@ public PatchPageAPIResponse execute() throws ApiException {
200 Ok -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return patchPageWithHttpInfo(tenantId, id, updateAPIPageData); + public ApiResponse executeWithHttpInfo() throws ApiException { + return patchSSOUserWithHttpInfo(tenantId, id, updateAPISSOUserData, updateComments); } /** - * Execute patchPage request (asynchronously) + * Execute patchSSOUser request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -17754,8 +21421,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExcepti 200 Ok - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return patchPageAsync(tenantId, id, updateAPIPageData, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return patchSSOUserAsync(tenantId, id, updateAPISSOUserData, updateComments, _callback); } } @@ -17764,8 +21431,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callba * * @param tenantId (required) * @param id (required) - * @param updateAPIPageData (required) - * @return APIpatchPageRequest + * @param updateAPISSOUserData (required) + * @return APIpatchSSOUserRequest * @http.response.details @@ -17773,10 +21440,10 @@ public okhttp3.Call executeAsync(final ApiCallback _callba
Response Details
200 Ok -
*/ - public APIpatchPageRequest patchPage(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPIPageData updateAPIPageData) { - return new APIpatchPageRequest(tenantId, id, updateAPIPageData); + public APIpatchSSOUserRequest patchSSOUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData) { + return new APIpatchSSOUserRequest(tenantId, id, updateAPISSOUserData); } - private okhttp3.Call patchSSOUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData, @javax.annotation.Nullable Boolean updateComments, final ApiCallback _callback) throws ApiException { + private okhttp3.Call putDomainConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -17790,11 +21457,11 @@ private okhttp3.Call patchSSOUserCall(@javax.annotation.Nonnull String tenantId, basePath = null; } - Object localVarPostBody = updateAPISSOUserData; + Object localVarPostBody = updateDomainConfigParams; // create path and map variables - String localVarPath = "/api/v1/sso-users/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + String localVarPath = "/api/v1/domain-configs/{domainToUpdate}" + .replace("{" + "domainToUpdate" + "}", localVarApiClient.escapeString(domainToUpdate.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -17806,10 +21473,6 @@ private okhttp3.Call patchSSOUserCall(@javax.annotation.Nonnull String tenantId, localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } - if (updateComments != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("updateComments", updateComments)); - } - final String[] localVarAccepts = { "application/json" }; @@ -17827,73 +21490,61 @@ private okhttp3.Call patchSSOUserCall(@javax.annotation.Nonnull String tenantId, } String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call patchSSOUserValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData, @javax.annotation.Nullable Boolean updateComments, final ApiCallback _callback) throws ApiException { + private okhttp3.Call putDomainConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling patchSSOUser(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling putDomainConfig(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling patchSSOUser(Async)"); + // verify the required parameter 'domainToUpdate' is set + if (domainToUpdate == null) { + throw new ApiException("Missing the required parameter 'domainToUpdate' when calling putDomainConfig(Async)"); } - // verify the required parameter 'updateAPISSOUserData' is set - if (updateAPISSOUserData == null) { - throw new ApiException("Missing the required parameter 'updateAPISSOUserData' when calling patchSSOUser(Async)"); + // verify the required parameter 'updateDomainConfigParams' is set + if (updateDomainConfigParams == null) { + throw new ApiException("Missing the required parameter 'updateDomainConfigParams' when calling putDomainConfig(Async)"); } - return patchSSOUserCall(tenantId, id, updateAPISSOUserData, updateComments, _callback); + return putDomainConfigCall(tenantId, domainToUpdate, updateDomainConfigParams, _callback); } - private ApiResponse patchSSOUserWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData, @javax.annotation.Nullable Boolean updateComments) throws ApiException { - okhttp3.Call localVarCall = patchSSOUserValidateBeforeCall(tenantId, id, updateAPISSOUserData, updateComments, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse putDomainConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams) throws ApiException { + okhttp3.Call localVarCall = putDomainConfigValidateBeforeCall(tenantId, domainToUpdate, updateDomainConfigParams, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call patchSSOUserAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData, @javax.annotation.Nullable Boolean updateComments, final ApiCallback _callback) throws ApiException { + private okhttp3.Call putDomainConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = patchSSOUserValidateBeforeCall(tenantId, id, updateAPISSOUserData, updateComments, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = putDomainConfigValidateBeforeCall(tenantId, domainToUpdate, updateDomainConfigParams, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIpatchSSOUserRequest { + public class APIputDomainConfigRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String id; + private final String domainToUpdate; @javax.annotation.Nonnull - private final UpdateAPISSOUserData updateAPISSOUserData; - @javax.annotation.Nullable - private Boolean updateComments; + private final UpdateDomainConfigParams updateDomainConfigParams; - private APIpatchSSOUserRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData) { + private APIputDomainConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams) { this.tenantId = tenantId; - this.id = id; - this.updateAPISSOUserData = updateAPISSOUserData; - } - - /** - * Set updateComments - * @param updateComments (optional) - * @return APIpatchSSOUserRequest - */ - public APIpatchSSOUserRequest updateComments(@javax.annotation.Nullable Boolean updateComments) { - this.updateComments = updateComments; - return this; + this.domainToUpdate = domainToUpdate; + this.updateDomainConfigParams = updateDomainConfigParams; } /** - * Build call for patchSSOUser + * Build call for putDomainConfig * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -17905,12 +21556,12 @@ public APIpatchSSOUserRequest updateComments(@javax.annotation.Nullable Boolean */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return patchSSOUserCall(tenantId, id, updateAPISSOUserData, updateComments, _callback); + return putDomainConfigCall(tenantId, domainToUpdate, updateDomainConfigParams, _callback); } /** - * Execute patchSSOUser request - * @return PatchSSOUserAPIResponse + * Execute putDomainConfig request + * @return PutDomainConfigResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17919,14 +21570,14 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
200 Ok -
*/ - public PatchSSOUserAPIResponse execute() throws ApiException { - ApiResponse localVarResp = patchSSOUserWithHttpInfo(tenantId, id, updateAPISSOUserData, updateComments); + public PutDomainConfigResponse execute() throws ApiException { + ApiResponse localVarResp = putDomainConfigWithHttpInfo(tenantId, domainToUpdate, updateDomainConfigParams); return localVarResp.getData(); } /** - * Execute patchSSOUser request with HTTP info returned - * @return ApiResponse<PatchSSOUserAPIResponse> + * Execute putDomainConfig request with HTTP info returned + * @return ApiResponse<PutDomainConfigResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -17935,12 +21586,12 @@ public PatchSSOUserAPIResponse execute() throws ApiException {
200 Ok -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return patchSSOUserWithHttpInfo(tenantId, id, updateAPISSOUserData, updateComments); + public ApiResponse executeWithHttpInfo() throws ApiException { + return putDomainConfigWithHttpInfo(tenantId, domainToUpdate, updateDomainConfigParams); } /** - * Execute patchSSOUser request (asynchronously) + * Execute putDomainConfig request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -17951,8 +21602,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExce 200 Ok - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return patchSSOUserAsync(tenantId, id, updateAPISSOUserData, updateComments, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return putDomainConfigAsync(tenantId, domainToUpdate, updateDomainConfigParams, _callback); } } @@ -17960,9 +21611,9 @@ public okhttp3.Call executeAsync(final ApiCallback _cal * * * @param tenantId (required) - * @param id (required) - * @param updateAPISSOUserData (required) - * @return APIpatchSSOUserRequest + * @param domainToUpdate (required) + * @param updateDomainConfigParams (required) + * @return APIputDomainConfigRequest * @http.response.details @@ -17970,10 +21621,10 @@ public okhttp3.Call executeAsync(final ApiCallback _cal
Response Details
200 Ok -
*/ - public APIpatchSSOUserRequest patchSSOUser(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData) { - return new APIpatchSSOUserRequest(tenantId, id, updateAPISSOUserData); + public APIputDomainConfigRequest putDomainConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams) { + return new APIputDomainConfigRequest(tenantId, domainToUpdate, updateDomainConfigParams); } - private okhttp3.Call putDomainConfigCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams, final ApiCallback _callback) throws ApiException { + private okhttp3.Call putPollCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPutInput commentPollPutInput, @javax.annotation.Nullable Boolean replaceVotes, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -17987,11 +21638,11 @@ private okhttp3.Call putDomainConfigCall(@javax.annotation.Nonnull String tenant basePath = null; } - Object localVarPostBody = updateDomainConfigParams; + Object localVarPostBody = commentPollPutInput; // create path and map variables - String localVarPath = "/api/v1/domain-configs/{domainToUpdate}" - .replace("{" + "domainToUpdate" + "}", localVarApiClient.escapeString(domainToUpdate.toString())); + String localVarPath = "/api/v1/polls/{commentId}" + .replace("{" + "commentId" + "}", localVarApiClient.escapeString(commentId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -18003,6 +21654,10 @@ private okhttp3.Call putDomainConfigCall(@javax.annotation.Nonnull String tenant localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); } + if (replaceVotes != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("replaceVotes", replaceVotes)); + } + final String[] localVarAccepts = { "application/json" }; @@ -18024,57 +21679,69 @@ private okhttp3.Call putDomainConfigCall(@javax.annotation.Nonnull String tenant } @SuppressWarnings("rawtypes") - private okhttp3.Call putDomainConfigValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams, final ApiCallback _callback) throws ApiException { + private okhttp3.Call putPollValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPutInput commentPollPutInput, @javax.annotation.Nullable Boolean replaceVotes, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException("Missing the required parameter 'tenantId' when calling putDomainConfig(Async)"); + throw new ApiException("Missing the required parameter 'tenantId' when calling putPoll(Async)"); } - // verify the required parameter 'domainToUpdate' is set - if (domainToUpdate == null) { - throw new ApiException("Missing the required parameter 'domainToUpdate' when calling putDomainConfig(Async)"); + // verify the required parameter 'commentId' is set + if (commentId == null) { + throw new ApiException("Missing the required parameter 'commentId' when calling putPoll(Async)"); } - // verify the required parameter 'updateDomainConfigParams' is set - if (updateDomainConfigParams == null) { - throw new ApiException("Missing the required parameter 'updateDomainConfigParams' when calling putDomainConfig(Async)"); + // verify the required parameter 'commentPollPutInput' is set + if (commentPollPutInput == null) { + throw new ApiException("Missing the required parameter 'commentPollPutInput' when calling putPoll(Async)"); } - return putDomainConfigCall(tenantId, domainToUpdate, updateDomainConfigParams, _callback); + return putPollCall(tenantId, commentId, commentPollPutInput, replaceVotes, _callback); } - private ApiResponse putDomainConfigWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams) throws ApiException { - okhttp3.Call localVarCall = putDomainConfigValidateBeforeCall(tenantId, domainToUpdate, updateDomainConfigParams, null); - Type localVarReturnType = new TypeToken(){}.getType(); + private ApiResponse putPollWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPutInput commentPollPutInput, @javax.annotation.Nullable Boolean replaceVotes) throws ApiException { + okhttp3.Call localVarCall = putPollValidateBeforeCall(tenantId, commentId, commentPollPutInput, replaceVotes, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call putDomainConfigAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams, final ApiCallback _callback) throws ApiException { + private okhttp3.Call putPollAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPutInput commentPollPutInput, @javax.annotation.Nullable Boolean replaceVotes, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = putDomainConfigValidateBeforeCall(tenantId, domainToUpdate, updateDomainConfigParams, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = putPollValidateBeforeCall(tenantId, commentId, commentPollPutInput, replaceVotes, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIputDomainConfigRequest { + public class APIputPollRequest { @javax.annotation.Nonnull private final String tenantId; @javax.annotation.Nonnull - private final String domainToUpdate; + private final String commentId; @javax.annotation.Nonnull - private final UpdateDomainConfigParams updateDomainConfigParams; + private final CommentPollPutInput commentPollPutInput; + @javax.annotation.Nullable + private Boolean replaceVotes; - private APIputDomainConfigRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams) { + private APIputPollRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPutInput commentPollPutInput) { this.tenantId = tenantId; - this.domainToUpdate = domainToUpdate; - this.updateDomainConfigParams = updateDomainConfigParams; + this.commentId = commentId; + this.commentPollPutInput = commentPollPutInput; } /** - * Build call for putDomainConfig + * Set replaceVotes + * @param replaceVotes (optional) + * @return APIputPollRequest + */ + public APIputPollRequest replaceVotes(@javax.annotation.Nullable Boolean replaceVotes) { + this.replaceVotes = replaceVotes; + return this; + } + + /** + * Build call for putPoll * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -18083,45 +21750,48 @@ private APIputDomainConfigRequest(@javax.annotation.Nonnull String tenantId, @ja Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return putDomainConfigCall(tenantId, domainToUpdate, updateDomainConfigParams, _callback); + return putPollCall(tenantId, commentId, commentPollPutInput, replaceVotes, _callback); } /** - * Execute putDomainConfig request - * @return PutDomainConfigResponse + * Execute putPoll request + * @return SavePollResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public PutDomainConfigResponse execute() throws ApiException { - ApiResponse localVarResp = putDomainConfigWithHttpInfo(tenantId, domainToUpdate, updateDomainConfigParams); + public SavePollResponse execute() throws ApiException { + ApiResponse localVarResp = putPollWithHttpInfo(tenantId, commentId, commentPollPutInput, replaceVotes); return localVarResp.getData(); } /** - * Execute putDomainConfig request with HTTP info returned - * @return ApiResponse<PutDomainConfigResponse> + * Execute putPoll request with HTTP info returned + * @return ApiResponse<SavePollResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public ApiResponse executeWithHttpInfo() throws ApiException { - return putDomainConfigWithHttpInfo(tenantId, domainToUpdate, updateDomainConfigParams); + public ApiResponse executeWithHttpInfo() throws ApiException { + return putPollWithHttpInfo(tenantId, commentId, commentPollPutInput, replaceVotes); } /** - * Execute putDomainConfig request (asynchronously) + * Execute putPoll request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -18130,29 +21800,31 @@ public ApiResponse executeWithHttpInfo() throws ApiExce Response Details Status Code Description Response Headers 200 Ok - + 0 Error - */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return putDomainConfigAsync(tenantId, domainToUpdate, updateDomainConfigParams, _callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return putPollAsync(tenantId, commentId, commentPollPutInput, replaceVotes, _callback); } } /** * - * + * Attach a poll to a comment, or set the full state of the poll it already has. Options are matched by id: an option sent with the id of an existing option keeps its votes (and takes the new label and position), an option sent without an id is added, and existing options left out of the list are removed along with the votes cast on them. Keeping no existing option ids on a poll that has votes deletes all of them, so that needs replaceVotes=true. * @param tenantId (required) - * @param domainToUpdate (required) - * @param updateDomainConfigParams (required) - * @return APIputDomainConfigRequest + * @param commentId (required) + * @param commentPollPutInput (required) + * @return APIputPollRequest * @http.response.details +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
*/ - public APIputDomainConfigRequest putDomainConfig(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String domainToUpdate, @javax.annotation.Nonnull UpdateDomainConfigParams updateDomainConfigParams) { - return new APIputDomainConfigRequest(tenantId, domainToUpdate, updateDomainConfigParams); + public APIputPollRequest putPoll(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull CommentPollPutInput commentPollPutInput) { + return new APIputPollRequest(tenantId, commentId, commentPollPutInput); } private okhttp3.Call putSSOUserCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateAPISSOUserData updateAPISSOUserData, @javax.annotation.Nullable Boolean updateComments, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -20213,6 +23885,177 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac public APIunFlagCommentRequest unFlagComment(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id) { return new APIunFlagCommentRequest(tenantId, id); } + private okhttp3.Call undoPageMigrationsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String undoId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/v1/pages/migrations/{undoId}/undo" + .replace("{" + "undoId" + "}", localVarApiClient.escapeString(undoId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenantId", tenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call undoPageMigrationsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String undoId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling undoPageMigrations(Async)"); + } + + // verify the required parameter 'undoId' is set + if (undoId == null) { + throw new ApiException("Missing the required parameter 'undoId' when calling undoPageMigrations(Async)"); + } + + return undoPageMigrationsCall(tenantId, undoId, _callback); + + } + + + private ApiResponse undoPageMigrationsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String undoId) throws ApiException { + okhttp3.Call localVarCall = undoPageMigrationsValidateBeforeCall(tenantId, undoId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call undoPageMigrationsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String undoId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = undoPageMigrationsValidateBeforeCall(tenantId, undoId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIundoPageMigrationsRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String undoId; + + private APIundoPageMigrationsRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String undoId) { + this.tenantId = tenantId; + this.undoId = undoId; + } + + /** + * Build call for undoPageMigrations + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return undoPageMigrationsCall(tenantId, undoId, _callback); + } + + /** + * Execute undoPageMigrations request + * @return QueuePageMigrationJobAPIResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public QueuePageMigrationJobAPIResponse execute() throws ApiException { + ApiResponse localVarResp = undoPageMigrationsWithHttpInfo(tenantId, undoId); + return localVarResp.getData(); + } + + /** + * Execute undoPageMigrations request with HTTP info returned + * @return ApiResponse<QueuePageMigrationJobAPIResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return undoPageMigrationsWithHttpInfo(tenantId, undoId); + } + + /** + * Execute undoPageMigrations request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return undoPageMigrationsAsync(tenantId, undoId, _callback); + } + } + + /** + * + * Queues a batch job that reverses every migration from one migrate-pages job, newest first. Available for 90 days. Records changed since the migration are left alone, so a later edit is never overwritten. Poll GET /api/v1/batch-jobs/{batchJobId} for the restored/skipped counts. + * @param tenantId (required) + * @param undoId (required) + * @return APIundoPageMigrationsRequest + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
+ */ + public APIundoPageMigrationsRequest undoPageMigrations(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String undoId) { + return new APIundoPageMigrationsRequest(tenantId, undoId); + } private okhttp3.Call updateCommentCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdatableCommentParams updatableCommentParams, @javax.annotation.Nullable String contextUserId, @javax.annotation.Nullable Boolean doSpamCheck, @javax.annotation.Nullable Boolean isLive, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers diff --git a/client/src/main/java/com/fastcomments/api/PublicApi.java b/client/src/main/java/com/fastcomments/api/PublicApi.java index 5490c85d..8c7b8e87 100644 --- a/client/src/main/java/com/fastcomments/api/PublicApi.java +++ b/client/src/main/java/com/fastcomments/api/PublicApi.java @@ -34,6 +34,8 @@ import com.fastcomments.model.CheckBlockedCommentsResponse; import com.fastcomments.model.CommentData; import com.fastcomments.model.CommentTextUpdateRequest; +import com.fastcomments.model.CommentTranslationsRequest; +import com.fastcomments.model.CommentTranslationsResponse; import com.fastcomments.model.CreateFeedPostParams; import com.fastcomments.model.CreateFeedPostResponse; import com.fastcomments.model.CreateV1PageReact; @@ -55,6 +57,7 @@ import com.fastcomments.model.GetV2PageReactUsersResponse; import com.fastcomments.model.GetV2PageReacts; import com.fastcomments.model.GifGetLargeResponse; +import com.fastcomments.model.PageReactIncludeUserInfo; import com.fastcomments.model.PageUsersInfoResponse; import com.fastcomments.model.PageUsersOfflineResponse; import com.fastcomments.model.PageUsersOnlineResponse; @@ -522,7 +525,7 @@ public okhttp3.Call executeAsync(final ApiCallback public APIcheckedCommentsForBlockedRequest checkedCommentsForBlocked(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentIds) { return new APIcheckedCommentsForBlockedRequest(tenantId, commentIds); } - private okhttp3.Call createCommentPublicCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String broadcastId, @javax.annotation.Nonnull CommentData commentData, @javax.annotation.Nullable String sessionId, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createCommentPublicCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String broadcastId, @javax.annotation.Nonnull CommentData commentData, @javax.annotation.Nullable String sessionId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable String locale, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -564,6 +567,10 @@ private okhttp3.Call createCommentPublicCall(@javax.annotation.Nonnull String te localVarQueryParams.addAll(localVarApiClient.parameterToPair("sso", sso)); } + if (locale != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("locale", locale)); + } + final String[] localVarAccepts = { "application/json" }; @@ -585,7 +592,7 @@ private okhttp3.Call createCommentPublicCall(@javax.annotation.Nonnull String te } @SuppressWarnings("rawtypes") - private okhttp3.Call createCommentPublicValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String broadcastId, @javax.annotation.Nonnull CommentData commentData, @javax.annotation.Nullable String sessionId, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createCommentPublicValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String broadcastId, @javax.annotation.Nonnull CommentData commentData, @javax.annotation.Nullable String sessionId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable String locale, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { throw new ApiException("Missing the required parameter 'tenantId' when calling createCommentPublic(Async)"); @@ -606,20 +613,20 @@ private okhttp3.Call createCommentPublicValidateBeforeCall(@javax.annotation.Non throw new ApiException("Missing the required parameter 'commentData' when calling createCommentPublic(Async)"); } - return createCommentPublicCall(tenantId, urlId, broadcastId, commentData, sessionId, sso, _callback); + return createCommentPublicCall(tenantId, urlId, broadcastId, commentData, sessionId, sso, locale, _callback); } - private ApiResponse createCommentPublicWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String broadcastId, @javax.annotation.Nonnull CommentData commentData, @javax.annotation.Nullable String sessionId, @javax.annotation.Nullable String sso) throws ApiException { - okhttp3.Call localVarCall = createCommentPublicValidateBeforeCall(tenantId, urlId, broadcastId, commentData, sessionId, sso, null); + private ApiResponse createCommentPublicWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String broadcastId, @javax.annotation.Nonnull CommentData commentData, @javax.annotation.Nullable String sessionId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable String locale) throws ApiException { + okhttp3.Call localVarCall = createCommentPublicValidateBeforeCall(tenantId, urlId, broadcastId, commentData, sessionId, sso, locale, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call createCommentPublicAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String broadcastId, @javax.annotation.Nonnull CommentData commentData, @javax.annotation.Nullable String sessionId, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createCommentPublicAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String broadcastId, @javax.annotation.Nonnull CommentData commentData, @javax.annotation.Nullable String sessionId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable String locale, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createCommentPublicValidateBeforeCall(tenantId, urlId, broadcastId, commentData, sessionId, sso, _callback); + okhttp3.Call localVarCall = createCommentPublicValidateBeforeCall(tenantId, urlId, broadcastId, commentData, sessionId, sso, locale, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -638,6 +645,8 @@ public class APIcreateCommentPublicRequest { private String sessionId; @javax.annotation.Nullable private String sso; + @javax.annotation.Nullable + private String locale; private APIcreateCommentPublicRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String broadcastId, @javax.annotation.Nonnull CommentData commentData) { this.tenantId = tenantId; @@ -666,6 +675,16 @@ public APIcreateCommentPublicRequest sso(@javax.annotation.Nullable String sso) return this; } + /** + * Set locale + * @param locale (optional) + * @return APIcreateCommentPublicRequest + */ + public APIcreateCommentPublicRequest locale(@javax.annotation.Nullable String locale) { + this.locale = locale; + return this; + } + /** * Build call for createCommentPublic * @param _callback ApiCallback API callback @@ -680,7 +699,7 @@ public APIcreateCommentPublicRequest sso(@javax.annotation.Nullable String sso) */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return createCommentPublicCall(tenantId, urlId, broadcastId, commentData, sessionId, sso, _callback); + return createCommentPublicCall(tenantId, urlId, broadcastId, commentData, sessionId, sso, locale, _callback); } /** @@ -696,7 +715,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public SaveCommentsResponseWithPresence execute() throws ApiException { - ApiResponse localVarResp = createCommentPublicWithHttpInfo(tenantId, urlId, broadcastId, commentData, sessionId, sso); + ApiResponse localVarResp = createCommentPublicWithHttpInfo(tenantId, urlId, broadcastId, commentData, sessionId, sso, locale); return localVarResp.getData(); } @@ -713,7 +732,7 @@ public SaveCommentsResponseWithPresence execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return createCommentPublicWithHttpInfo(tenantId, urlId, broadcastId, commentData, sessionId, sso); + return createCommentPublicWithHttpInfo(tenantId, urlId, broadcastId, commentData, sessionId, sso, locale); } /** @@ -730,7 +749,7 @@ public ApiResponse executeWithHttpInfo() throw */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return createCommentPublicAsync(tenantId, urlId, broadcastId, commentData, sessionId, sso, _callback); + return createCommentPublicAsync(tenantId, urlId, broadcastId, commentData, sessionId, sso, locale, _callback); } } @@ -958,7 +977,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call public APIcreateFeedPostPublicRequest createFeedPostPublic(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull CreateFeedPostParams createFeedPostParams) { return new APIcreateFeedPostPublicRequest(tenantId, createFeedPostParams); } - private okhttp3.Call createV1PageReactCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String title, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createV1PageReactCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String title, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -992,6 +1011,10 @@ private okhttp3.Call createV1PageReactCall(@javax.annotation.Nonnull String tena localVarQueryParams.addAll(localVarApiClient.parameterToPair("title", title)); } + if (sso != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sso", sso)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1012,7 +1035,7 @@ private okhttp3.Call createV1PageReactCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call createV1PageReactValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String title, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createV1PageReactValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String title, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { throw new ApiException("Missing the required parameter 'tenantId' when calling createV1PageReact(Async)"); @@ -1023,20 +1046,20 @@ private okhttp3.Call createV1PageReactValidateBeforeCall(@javax.annotation.Nonnu throw new ApiException("Missing the required parameter 'urlId' when calling createV1PageReact(Async)"); } - return createV1PageReactCall(tenantId, urlId, title, _callback); + return createV1PageReactCall(tenantId, urlId, title, sso, _callback); } - private ApiResponse createV1PageReactWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String title) throws ApiException { - okhttp3.Call localVarCall = createV1PageReactValidateBeforeCall(tenantId, urlId, title, null); + private ApiResponse createV1PageReactWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String title, @javax.annotation.Nullable String sso) throws ApiException { + okhttp3.Call localVarCall = createV1PageReactValidateBeforeCall(tenantId, urlId, title, sso, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call createV1PageReactAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String title, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createV1PageReactAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String title, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createV1PageReactValidateBeforeCall(tenantId, urlId, title, _callback); + okhttp3.Call localVarCall = createV1PageReactValidateBeforeCall(tenantId, urlId, title, sso, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -1049,6 +1072,8 @@ public class APIcreateV1PageReactRequest { private final String urlId; @javax.annotation.Nullable private String title; + @javax.annotation.Nullable + private String sso; private APIcreateV1PageReactRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { this.tenantId = tenantId; @@ -1065,6 +1090,16 @@ public APIcreateV1PageReactRequest title(@javax.annotation.Nullable String title return this; } + /** + * Set sso + * @param sso (optional) + * @return APIcreateV1PageReactRequest + */ + public APIcreateV1PageReactRequest sso(@javax.annotation.Nullable String sso) { + this.sso = sso; + return this; + } + /** * Build call for createV1PageReact * @param _callback ApiCallback API callback @@ -1079,7 +1114,7 @@ public APIcreateV1PageReactRequest title(@javax.annotation.Nullable String title */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return createV1PageReactCall(tenantId, urlId, title, _callback); + return createV1PageReactCall(tenantId, urlId, title, sso, _callback); } /** @@ -1095,7 +1130,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public CreateV1PageReact execute() throws ApiException { - ApiResponse localVarResp = createV1PageReactWithHttpInfo(tenantId, urlId, title); + ApiResponse localVarResp = createV1PageReactWithHttpInfo(tenantId, urlId, title, sso); return localVarResp.getData(); } @@ -1112,7 +1147,7 @@ public CreateV1PageReact execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return createV1PageReactWithHttpInfo(tenantId, urlId, title); + return createV1PageReactWithHttpInfo(tenantId, urlId, title, sso); } /** @@ -1129,7 +1164,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return createV1PageReactAsync(tenantId, urlId, title, _callback); + return createV1PageReactAsync(tenantId, urlId, title, sso, _callback); } } @@ -1150,7 +1185,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) public APIcreateV1PageReactRequest createV1PageReact(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { return new APIcreateV1PageReactRequest(tenantId, urlId); } - private okhttp3.Call createV2PageReactCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String title, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createV2PageReactCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String title, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1188,6 +1223,10 @@ private okhttp3.Call createV2PageReactCall(@javax.annotation.Nonnull String tena localVarQueryParams.addAll(localVarApiClient.parameterToPair("title", title)); } + if (sso != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sso", sso)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1208,7 +1247,7 @@ private okhttp3.Call createV2PageReactCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call createV2PageReactValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String title, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createV2PageReactValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String title, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { throw new ApiException("Missing the required parameter 'tenantId' when calling createV2PageReact(Async)"); @@ -1224,20 +1263,20 @@ private okhttp3.Call createV2PageReactValidateBeforeCall(@javax.annotation.Nonnu throw new ApiException("Missing the required parameter 'id' when calling createV2PageReact(Async)"); } - return createV2PageReactCall(tenantId, urlId, id, title, _callback); + return createV2PageReactCall(tenantId, urlId, id, title, sso, _callback); } - private ApiResponse createV2PageReactWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String title) throws ApiException { - okhttp3.Call localVarCall = createV2PageReactValidateBeforeCall(tenantId, urlId, id, title, null); + private ApiResponse createV2PageReactWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String title, @javax.annotation.Nullable String sso) throws ApiException { + okhttp3.Call localVarCall = createV2PageReactValidateBeforeCall(tenantId, urlId, id, title, sso, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call createV2PageReactAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String title, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createV2PageReactAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String title, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createV2PageReactValidateBeforeCall(tenantId, urlId, id, title, _callback); + okhttp3.Call localVarCall = createV2PageReactValidateBeforeCall(tenantId, urlId, id, title, sso, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -1252,6 +1291,8 @@ public class APIcreateV2PageReactRequest { private final String id; @javax.annotation.Nullable private String title; + @javax.annotation.Nullable + private String sso; private APIcreateV2PageReactRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; @@ -1269,6 +1310,16 @@ public APIcreateV2PageReactRequest title(@javax.annotation.Nullable String title return this; } + /** + * Set sso + * @param sso (optional) + * @return APIcreateV2PageReactRequest + */ + public APIcreateV2PageReactRequest sso(@javax.annotation.Nullable String sso) { + this.sso = sso; + return this; + } + /** * Build call for createV2PageReact * @param _callback ApiCallback API callback @@ -1283,7 +1334,7 @@ public APIcreateV2PageReactRequest title(@javax.annotation.Nullable String title */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return createV2PageReactCall(tenantId, urlId, id, title, _callback); + return createV2PageReactCall(tenantId, urlId, id, title, sso, _callback); } /** @@ -1299,7 +1350,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public CreateV1PageReact execute() throws ApiException { - ApiResponse localVarResp = createV2PageReactWithHttpInfo(tenantId, urlId, id, title); + ApiResponse localVarResp = createV2PageReactWithHttpInfo(tenantId, urlId, id, title, sso); return localVarResp.getData(); } @@ -1316,7 +1367,7 @@ public CreateV1PageReact execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return createV2PageReactWithHttpInfo(tenantId, urlId, id, title); + return createV2PageReactWithHttpInfo(tenantId, urlId, id, title, sso); } /** @@ -1333,7 +1384,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return createV2PageReactAsync(tenantId, urlId, id, title, _callback); + return createV2PageReactAsync(tenantId, urlId, id, title, sso, _callback); } } @@ -2019,7 +2070,7 @@ public okhttp3.Call executeAsync(final ApiCallback public APIdeleteFeedPostPublicRequest deleteFeedPostPublic(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String postId) { return new APIdeleteFeedPostPublicRequest(tenantId, postId); } - private okhttp3.Call deleteV1PageReactCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteV1PageReactCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2049,6 +2100,10 @@ private okhttp3.Call deleteV1PageReactCall(@javax.annotation.Nonnull String tena localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); } + if (sso != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sso", sso)); + } + final String[] localVarAccepts = { "application/json" }; @@ -2069,7 +2124,7 @@ private okhttp3.Call deleteV1PageReactCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteV1PageReactValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteV1PageReactValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { throw new ApiException("Missing the required parameter 'tenantId' when calling deleteV1PageReact(Async)"); @@ -2080,20 +2135,20 @@ private okhttp3.Call deleteV1PageReactValidateBeforeCall(@javax.annotation.Nonnu throw new ApiException("Missing the required parameter 'urlId' when calling deleteV1PageReact(Async)"); } - return deleteV1PageReactCall(tenantId, urlId, _callback); + return deleteV1PageReactCall(tenantId, urlId, sso, _callback); } - private ApiResponse deleteV1PageReactWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) throws ApiException { - okhttp3.Call localVarCall = deleteV1PageReactValidateBeforeCall(tenantId, urlId, null); + private ApiResponse deleteV1PageReactWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso) throws ApiException { + okhttp3.Call localVarCall = deleteV1PageReactValidateBeforeCall(tenantId, urlId, sso, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteV1PageReactAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteV1PageReactAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteV1PageReactValidateBeforeCall(tenantId, urlId, _callback); + okhttp3.Call localVarCall = deleteV1PageReactValidateBeforeCall(tenantId, urlId, sso, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -2104,12 +2159,24 @@ public class APIdeleteV1PageReactRequest { private final String tenantId; @javax.annotation.Nonnull private final String urlId; + @javax.annotation.Nullable + private String sso; private APIdeleteV1PageReactRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { this.tenantId = tenantId; this.urlId = urlId; } + /** + * Set sso + * @param sso (optional) + * @return APIdeleteV1PageReactRequest + */ + public APIdeleteV1PageReactRequest sso(@javax.annotation.Nullable String sso) { + this.sso = sso; + return this; + } + /** * Build call for deleteV1PageReact * @param _callback ApiCallback API callback @@ -2124,7 +2191,7 @@ private APIdeleteV1PageReactRequest(@javax.annotation.Nonnull String tenantId, @ */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteV1PageReactCall(tenantId, urlId, _callback); + return deleteV1PageReactCall(tenantId, urlId, sso, _callback); } /** @@ -2140,7 +2207,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public CreateV1PageReact execute() throws ApiException { - ApiResponse localVarResp = deleteV1PageReactWithHttpInfo(tenantId, urlId); + ApiResponse localVarResp = deleteV1PageReactWithHttpInfo(tenantId, urlId, sso); return localVarResp.getData(); } @@ -2157,7 +2224,7 @@ public CreateV1PageReact execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteV1PageReactWithHttpInfo(tenantId, urlId); + return deleteV1PageReactWithHttpInfo(tenantId, urlId, sso); } /** @@ -2174,7 +2241,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteV1PageReactAsync(tenantId, urlId, _callback); + return deleteV1PageReactAsync(tenantId, urlId, sso, _callback); } } @@ -2195,7 +2262,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) public APIdeleteV1PageReactRequest deleteV1PageReact(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { return new APIdeleteV1PageReactRequest(tenantId, urlId); } - private okhttp3.Call deleteV2PageReactCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteV2PageReactCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2229,6 +2296,10 @@ private okhttp3.Call deleteV2PageReactCall(@javax.annotation.Nonnull String tena localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } + if (sso != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sso", sso)); + } + final String[] localVarAccepts = { "application/json" }; @@ -2249,7 +2320,7 @@ private okhttp3.Call deleteV2PageReactCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteV2PageReactValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteV2PageReactValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { throw new ApiException("Missing the required parameter 'tenantId' when calling deleteV2PageReact(Async)"); @@ -2265,20 +2336,20 @@ private okhttp3.Call deleteV2PageReactValidateBeforeCall(@javax.annotation.Nonnu throw new ApiException("Missing the required parameter 'id' when calling deleteV2PageReact(Async)"); } - return deleteV2PageReactCall(tenantId, urlId, id, _callback); + return deleteV2PageReactCall(tenantId, urlId, id, sso, _callback); } - private ApiResponse deleteV2PageReactWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = deleteV2PageReactValidateBeforeCall(tenantId, urlId, id, null); + private ApiResponse deleteV2PageReactWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sso) throws ApiException { + okhttp3.Call localVarCall = deleteV2PageReactValidateBeforeCall(tenantId, urlId, id, sso, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteV2PageReactAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteV2PageReactAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteV2PageReactValidateBeforeCall(tenantId, urlId, id, _callback); + okhttp3.Call localVarCall = deleteV2PageReactValidateBeforeCall(tenantId, urlId, id, sso, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -2291,6 +2362,8 @@ public class APIdeleteV2PageReactRequest { private final String urlId; @javax.annotation.Nonnull private final String id; + @javax.annotation.Nullable + private String sso; private APIdeleteV2PageReactRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; @@ -2298,6 +2371,16 @@ private APIdeleteV2PageReactRequest(@javax.annotation.Nonnull String tenantId, @ this.id = id; } + /** + * Set sso + * @param sso (optional) + * @return APIdeleteV2PageReactRequest + */ + public APIdeleteV2PageReactRequest sso(@javax.annotation.Nullable String sso) { + this.sso = sso; + return this; + } + /** * Build call for deleteV2PageReact * @param _callback ApiCallback API callback @@ -2312,7 +2395,7 @@ private APIdeleteV2PageReactRequest(@javax.annotation.Nonnull String tenantId, @ */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteV2PageReactCall(tenantId, urlId, id, _callback); + return deleteV2PageReactCall(tenantId, urlId, id, sso, _callback); } /** @@ -2328,7 +2411,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public CreateV1PageReact execute() throws ApiException { - ApiResponse localVarResp = deleteV2PageReactWithHttpInfo(tenantId, urlId, id); + ApiResponse localVarResp = deleteV2PageReactWithHttpInfo(tenantId, urlId, id, sso); return localVarResp.getData(); } @@ -2345,7 +2428,7 @@ public CreateV1PageReact execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteV2PageReactWithHttpInfo(tenantId, urlId, id); + return deleteV2PageReactWithHttpInfo(tenantId, urlId, id, sso); } /** @@ -2362,7 +2445,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteV2PageReactAsync(tenantId, urlId, id, _callback); + return deleteV2PageReactAsync(tenantId, urlId, id, sso, _callback); } } @@ -3261,7 +3344,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ public APIgetCommentsForUserRequest getCommentsForUser() { return new APIgetCommentsForUserRequest(); } - private okhttp3.Call getCommentsPublicCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable String sso, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Boolean countChildren, @javax.annotation.Nullable String fetchPageForCommentId, @javax.annotation.Nullable Boolean includeConfig, @javax.annotation.Nullable Boolean countAll, @javax.annotation.Nullable Boolean includei10n, @javax.annotation.Nullable String locale, @javax.annotation.Nullable String modules, @javax.annotation.Nullable Boolean isCrawler, @javax.annotation.Nullable Boolean includeNotificationCount, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable Boolean useFullTranslationIds, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable String searchText, @javax.annotation.Nullable List hashTags, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String customConfigStr, @javax.annotation.Nullable String afterCommentId, @javax.annotation.Nullable String beforeCommentId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommentsPublicCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable String sso, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Boolean countChildren, @javax.annotation.Nullable String fetchPageForCommentId, @javax.annotation.Nullable Boolean includeConfig, @javax.annotation.Nullable Boolean countAll, @javax.annotation.Nullable Boolean includei10n, @javax.annotation.Nullable String locale, @javax.annotation.Nullable String modules, @javax.annotation.Nullable Boolean isCrawler, @javax.annotation.Nullable Boolean includeNotificationCount, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable Boolean useFullTranslationIds, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable String searchText, @javax.annotation.Nullable List hashTags, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String customConfigStr, @javax.annotation.Nullable String afterCommentId, @javax.annotation.Nullable String beforeCommentId, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable Integer questionValue, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3395,6 +3478,14 @@ private okhttp3.Call getCommentsPublicCall(@javax.annotation.Nonnull String tena localVarQueryParams.addAll(localVarApiClient.parameterToPair("beforeCommentId", beforeCommentId)); } + if (questionId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("questionId", questionId)); + } + + if (questionValue != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("questionValue", questionValue)); + } + final String[] localVarAccepts = { "application/json" }; @@ -3415,7 +3506,7 @@ private okhttp3.Call getCommentsPublicCall(@javax.annotation.Nonnull String tena } @SuppressWarnings("rawtypes") - private okhttp3.Call getCommentsPublicValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable String sso, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Boolean countChildren, @javax.annotation.Nullable String fetchPageForCommentId, @javax.annotation.Nullable Boolean includeConfig, @javax.annotation.Nullable Boolean countAll, @javax.annotation.Nullable Boolean includei10n, @javax.annotation.Nullable String locale, @javax.annotation.Nullable String modules, @javax.annotation.Nullable Boolean isCrawler, @javax.annotation.Nullable Boolean includeNotificationCount, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable Boolean useFullTranslationIds, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable String searchText, @javax.annotation.Nullable List hashTags, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String customConfigStr, @javax.annotation.Nullable String afterCommentId, @javax.annotation.Nullable String beforeCommentId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommentsPublicValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable String sso, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Boolean countChildren, @javax.annotation.Nullable String fetchPageForCommentId, @javax.annotation.Nullable Boolean includeConfig, @javax.annotation.Nullable Boolean countAll, @javax.annotation.Nullable Boolean includei10n, @javax.annotation.Nullable String locale, @javax.annotation.Nullable String modules, @javax.annotation.Nullable Boolean isCrawler, @javax.annotation.Nullable Boolean includeNotificationCount, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable Boolean useFullTranslationIds, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable String searchText, @javax.annotation.Nullable List hashTags, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String customConfigStr, @javax.annotation.Nullable String afterCommentId, @javax.annotation.Nullable String beforeCommentId, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable Integer questionValue, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { throw new ApiException("Missing the required parameter 'tenantId' when calling getCommentsPublic(Async)"); @@ -3426,20 +3517,20 @@ private okhttp3.Call getCommentsPublicValidateBeforeCall(@javax.annotation.Nonnu throw new ApiException("Missing the required parameter 'urlId' when calling getCommentsPublic(Async)"); } - return getCommentsPublicCall(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, _callback); + return getCommentsPublicCall(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, questionId, questionValue, _callback); } - private ApiResponse getCommentsPublicWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable String sso, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Boolean countChildren, @javax.annotation.Nullable String fetchPageForCommentId, @javax.annotation.Nullable Boolean includeConfig, @javax.annotation.Nullable Boolean countAll, @javax.annotation.Nullable Boolean includei10n, @javax.annotation.Nullable String locale, @javax.annotation.Nullable String modules, @javax.annotation.Nullable Boolean isCrawler, @javax.annotation.Nullable Boolean includeNotificationCount, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable Boolean useFullTranslationIds, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable String searchText, @javax.annotation.Nullable List hashTags, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String customConfigStr, @javax.annotation.Nullable String afterCommentId, @javax.annotation.Nullable String beforeCommentId) throws ApiException { - okhttp3.Call localVarCall = getCommentsPublicValidateBeforeCall(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, null); + private ApiResponse getCommentsPublicWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable String sso, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Boolean countChildren, @javax.annotation.Nullable String fetchPageForCommentId, @javax.annotation.Nullable Boolean includeConfig, @javax.annotation.Nullable Boolean countAll, @javax.annotation.Nullable Boolean includei10n, @javax.annotation.Nullable String locale, @javax.annotation.Nullable String modules, @javax.annotation.Nullable Boolean isCrawler, @javax.annotation.Nullable Boolean includeNotificationCount, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable Boolean useFullTranslationIds, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable String searchText, @javax.annotation.Nullable List hashTags, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String customConfigStr, @javax.annotation.Nullable String afterCommentId, @javax.annotation.Nullable String beforeCommentId, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable Integer questionValue) throws ApiException { + okhttp3.Call localVarCall = getCommentsPublicValidateBeforeCall(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, questionId, questionValue, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getCommentsPublicAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable String sso, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Boolean countChildren, @javax.annotation.Nullable String fetchPageForCommentId, @javax.annotation.Nullable Boolean includeConfig, @javax.annotation.Nullable Boolean countAll, @javax.annotation.Nullable Boolean includei10n, @javax.annotation.Nullable String locale, @javax.annotation.Nullable String modules, @javax.annotation.Nullable Boolean isCrawler, @javax.annotation.Nullable Boolean includeNotificationCount, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable Boolean useFullTranslationIds, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable String searchText, @javax.annotation.Nullable List hashTags, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String customConfigStr, @javax.annotation.Nullable String afterCommentId, @javax.annotation.Nullable String beforeCommentId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommentsPublicAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable SortDirections direction, @javax.annotation.Nullable String sso, @javax.annotation.Nullable Integer skip, @javax.annotation.Nullable Integer skipChildren, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Integer limitChildren, @javax.annotation.Nullable Boolean countChildren, @javax.annotation.Nullable String fetchPageForCommentId, @javax.annotation.Nullable Boolean includeConfig, @javax.annotation.Nullable Boolean countAll, @javax.annotation.Nullable Boolean includei10n, @javax.annotation.Nullable String locale, @javax.annotation.Nullable String modules, @javax.annotation.Nullable Boolean isCrawler, @javax.annotation.Nullable Boolean includeNotificationCount, @javax.annotation.Nullable Boolean asTree, @javax.annotation.Nullable Integer maxTreeDepth, @javax.annotation.Nullable Boolean useFullTranslationIds, @javax.annotation.Nullable String parentId, @javax.annotation.Nullable String searchText, @javax.annotation.Nullable List hashTags, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String customConfigStr, @javax.annotation.Nullable String afterCommentId, @javax.annotation.Nullable String beforeCommentId, @javax.annotation.Nullable String questionId, @javax.annotation.Nullable Integer questionValue, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCommentsPublicValidateBeforeCall(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, _callback); + okhttp3.Call localVarCall = getCommentsPublicValidateBeforeCall(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, questionId, questionValue, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -3502,6 +3593,10 @@ public class APIgetCommentsPublicRequest { private String afterCommentId; @javax.annotation.Nullable private String beforeCommentId; + @javax.annotation.Nullable + private String questionId; + @javax.annotation.Nullable + private Integer questionValue; private APIgetCommentsPublicRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { this.tenantId = tenantId; @@ -3768,6 +3863,26 @@ public APIgetCommentsPublicRequest beforeCommentId(@javax.annotation.Nullable St return this; } + /** + * Set questionId + * @param questionId (optional) + * @return APIgetCommentsPublicRequest + */ + public APIgetCommentsPublicRequest questionId(@javax.annotation.Nullable String questionId) { + this.questionId = questionId; + return this; + } + + /** + * Set questionValue + * @param questionValue (optional) + * @return APIgetCommentsPublicRequest + */ + public APIgetCommentsPublicRequest questionValue(@javax.annotation.Nullable Integer questionValue) { + this.questionValue = questionValue; + return this; + } + /** * Build call for getCommentsPublic * @param _callback ApiCallback API callback @@ -3782,7 +3897,7 @@ public APIgetCommentsPublicRequest beforeCommentId(@javax.annotation.Nullable St */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getCommentsPublicCall(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, _callback); + return getCommentsPublicCall(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, questionId, questionValue, _callback); } /** @@ -3798,7 +3913,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public GetCommentsResponseWithPresencePublicComment execute() throws ApiException { - ApiResponse localVarResp = getCommentsPublicWithHttpInfo(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId); + ApiResponse localVarResp = getCommentsPublicWithHttpInfo(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, questionId, questionValue); return localVarResp.getData(); } @@ -3815,7 +3930,7 @@ public GetCommentsResponseWithPresencePublicComment execute() throws ApiExceptio */ public ApiResponse executeWithHttpInfo() throws ApiException { - return getCommentsPublicWithHttpInfo(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId); + return getCommentsPublicWithHttpInfo(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, questionId, questionValue); } /** @@ -3832,7 +3947,7 @@ public ApiResponse executeWithHttp */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getCommentsPublicAsync(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, _callback); + return getCommentsPublicAsync(tenantId, urlId, page, direction, sso, skip, skipChildren, limit, limitChildren, countChildren, fetchPageForCommentId, includeConfig, countAll, includei10n, locale, modules, isCrawler, includeNotificationCount, asTree, maxTreeDepth, useFullTranslationIds, parentId, searchText, hashTags, userId, customConfigStr, afterCommentId, beforeCommentId, questionId, questionValue, _callback); } } @@ -7347,7 +7462,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb public APIgetUsersInfoRequest getUsersInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String ids) { return new APIgetUsersInfoRequest(tenantId, ids); } - private okhttp3.Call getV1PageLikesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getV1PageLikesCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7377,6 +7492,14 @@ private okhttp3.Call getV1PageLikesCall(@javax.annotation.Nonnull String tenantI localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); } + if (sso != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sso", sso)); + } + + if (includeUserInfo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeUserInfo", includeUserInfo)); + } + final String[] localVarAccepts = { "application/json" }; @@ -7397,7 +7520,7 @@ private okhttp3.Call getV1PageLikesCall(@javax.annotation.Nonnull String tenantI } @SuppressWarnings("rawtypes") - private okhttp3.Call getV1PageLikesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getV1PageLikesValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { throw new ApiException("Missing the required parameter 'tenantId' when calling getV1PageLikes(Async)"); @@ -7408,20 +7531,20 @@ private okhttp3.Call getV1PageLikesValidateBeforeCall(@javax.annotation.Nonnull throw new ApiException("Missing the required parameter 'urlId' when calling getV1PageLikes(Async)"); } - return getV1PageLikesCall(tenantId, urlId, _callback); + return getV1PageLikesCall(tenantId, urlId, sso, includeUserInfo, _callback); } - private ApiResponse getV1PageLikesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) throws ApiException { - okhttp3.Call localVarCall = getV1PageLikesValidateBeforeCall(tenantId, urlId, null); + private ApiResponse getV1PageLikesWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo) throws ApiException { + okhttp3.Call localVarCall = getV1PageLikesValidateBeforeCall(tenantId, urlId, sso, includeUserInfo, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getV1PageLikesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getV1PageLikesAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getV1PageLikesValidateBeforeCall(tenantId, urlId, _callback); + okhttp3.Call localVarCall = getV1PageLikesValidateBeforeCall(tenantId, urlId, sso, includeUserInfo, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -7432,12 +7555,36 @@ public class APIgetV1PageLikesRequest { private final String tenantId; @javax.annotation.Nonnull private final String urlId; + @javax.annotation.Nullable + private String sso; + @javax.annotation.Nullable + private PageReactIncludeUserInfo includeUserInfo; private APIgetV1PageLikesRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { this.tenantId = tenantId; this.urlId = urlId; } + /** + * Set sso + * @param sso (optional) + * @return APIgetV1PageLikesRequest + */ + public APIgetV1PageLikesRequest sso(@javax.annotation.Nullable String sso) { + this.sso = sso; + return this; + } + + /** + * Set includeUserInfo + * @param includeUserInfo When set, returns the users who liked the page (avatars and usernames). Only \"public\" is accepted, which omits private profiles. (optional) + * @return APIgetV1PageLikesRequest + */ + public APIgetV1PageLikesRequest includeUserInfo(@javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo) { + this.includeUserInfo = includeUserInfo; + return this; + } + /** * Build call for getV1PageLikes * @param _callback ApiCallback API callback @@ -7452,7 +7599,7 @@ private APIgetV1PageLikesRequest(@javax.annotation.Nonnull String tenantId, @jav */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getV1PageLikesCall(tenantId, urlId, _callback); + return getV1PageLikesCall(tenantId, urlId, sso, includeUserInfo, _callback); } /** @@ -7468,7 +7615,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public GetV1PageLikes execute() throws ApiException { - ApiResponse localVarResp = getV1PageLikesWithHttpInfo(tenantId, urlId); + ApiResponse localVarResp = getV1PageLikesWithHttpInfo(tenantId, urlId, sso, includeUserInfo); return localVarResp.getData(); } @@ -7485,7 +7632,7 @@ public GetV1PageLikes execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return getV1PageLikesWithHttpInfo(tenantId, urlId); + return getV1PageLikesWithHttpInfo(tenantId, urlId, sso, includeUserInfo); } /** @@ -7502,7 +7649,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException { */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getV1PageLikesAsync(tenantId, urlId, _callback); + return getV1PageLikesAsync(tenantId, urlId, sso, includeUserInfo, _callback); } } @@ -7523,7 +7670,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th public APIgetV1PageLikesRequest getV1PageLikes(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { return new APIgetV1PageLikesRequest(tenantId, urlId); } - private okhttp3.Call getV2PageReactUsersCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getV2PageReactUsersCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7557,6 +7704,10 @@ private okhttp3.Call getV2PageReactUsersCall(@javax.annotation.Nonnull String te localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } + if (sso != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sso", sso)); + } + final String[] localVarAccepts = { "application/json" }; @@ -7577,7 +7728,7 @@ private okhttp3.Call getV2PageReactUsersCall(@javax.annotation.Nonnull String te } @SuppressWarnings("rawtypes") - private okhttp3.Call getV2PageReactUsersValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getV2PageReactUsersValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { throw new ApiException("Missing the required parameter 'tenantId' when calling getV2PageReactUsers(Async)"); @@ -7593,20 +7744,20 @@ private okhttp3.Call getV2PageReactUsersValidateBeforeCall(@javax.annotation.Non throw new ApiException("Missing the required parameter 'id' when calling getV2PageReactUsers(Async)"); } - return getV2PageReactUsersCall(tenantId, urlId, id, _callback); + return getV2PageReactUsersCall(tenantId, urlId, id, sso, _callback); } - private ApiResponse getV2PageReactUsersWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id) throws ApiException { - okhttp3.Call localVarCall = getV2PageReactUsersValidateBeforeCall(tenantId, urlId, id, null); + private ApiResponse getV2PageReactUsersWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sso) throws ApiException { + okhttp3.Call localVarCall = getV2PageReactUsersValidateBeforeCall(tenantId, urlId, id, sso, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getV2PageReactUsersAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getV2PageReactUsersAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getV2PageReactUsersValidateBeforeCall(tenantId, urlId, id, _callback); + okhttp3.Call localVarCall = getV2PageReactUsersValidateBeforeCall(tenantId, urlId, id, sso, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -7619,6 +7770,8 @@ public class APIgetV2PageReactUsersRequest { private final String urlId; @javax.annotation.Nonnull private final String id; + @javax.annotation.Nullable + private String sso; private APIgetV2PageReactUsersRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id) { this.tenantId = tenantId; @@ -7626,6 +7779,16 @@ private APIgetV2PageReactUsersRequest(@javax.annotation.Nonnull String tenantId, this.id = id; } + /** + * Set sso + * @param sso (optional) + * @return APIgetV2PageReactUsersRequest + */ + public APIgetV2PageReactUsersRequest sso(@javax.annotation.Nullable String sso) { + this.sso = sso; + return this; + } + /** * Build call for getV2PageReactUsers * @param _callback ApiCallback API callback @@ -7640,7 +7803,7 @@ private APIgetV2PageReactUsersRequest(@javax.annotation.Nonnull String tenantId, */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getV2PageReactUsersCall(tenantId, urlId, id, _callback); + return getV2PageReactUsersCall(tenantId, urlId, id, sso, _callback); } /** @@ -7656,7 +7819,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public GetV2PageReactUsersResponse execute() throws ApiException { - ApiResponse localVarResp = getV2PageReactUsersWithHttpInfo(tenantId, urlId, id); + ApiResponse localVarResp = getV2PageReactUsersWithHttpInfo(tenantId, urlId, id, sso); return localVarResp.getData(); } @@ -7673,7 +7836,7 @@ public GetV2PageReactUsersResponse execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return getV2PageReactUsersWithHttpInfo(tenantId, urlId, id); + return getV2PageReactUsersWithHttpInfo(tenantId, urlId, id, sso); } /** @@ -7690,7 +7853,7 @@ public ApiResponse executeWithHttpInfo() throws Api */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getV2PageReactUsersAsync(tenantId, urlId, id, _callback); + return getV2PageReactUsersAsync(tenantId, urlId, id, sso, _callback); } } @@ -7712,7 +7875,7 @@ public okhttp3.Call executeAsync(final ApiCallback public APIgetV2PageReactUsersRequest getV2PageReactUsers(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull String id) { return new APIgetV2PageReactUsersRequest(tenantId, urlId, id); } - private okhttp3.Call getV2PageReactsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getV2PageReactsCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7742,6 +7905,14 @@ private okhttp3.Call getV2PageReactsCall(@javax.annotation.Nonnull String tenant localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); } + if (sso != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sso", sso)); + } + + if (includeUserInfo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeUserInfo", includeUserInfo)); + } + final String[] localVarAccepts = { "application/json" }; @@ -7762,7 +7933,7 @@ private okhttp3.Call getV2PageReactsCall(@javax.annotation.Nonnull String tenant } @SuppressWarnings("rawtypes") - private okhttp3.Call getV2PageReactsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getV2PageReactsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tenantId' is set if (tenantId == null) { throw new ApiException("Missing the required parameter 'tenantId' when calling getV2PageReacts(Async)"); @@ -7773,20 +7944,20 @@ private okhttp3.Call getV2PageReactsValidateBeforeCall(@javax.annotation.Nonnull throw new ApiException("Missing the required parameter 'urlId' when calling getV2PageReacts(Async)"); } - return getV2PageReactsCall(tenantId, urlId, _callback); + return getV2PageReactsCall(tenantId, urlId, sso, includeUserInfo, _callback); } - private ApiResponse getV2PageReactsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) throws ApiException { - okhttp3.Call localVarCall = getV2PageReactsValidateBeforeCall(tenantId, urlId, null); + private ApiResponse getV2PageReactsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo) throws ApiException { + okhttp3.Call localVarCall = getV2PageReactsValidateBeforeCall(tenantId, urlId, sso, includeUserInfo, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getV2PageReactsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getV2PageReactsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nullable String sso, @javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getV2PageReactsValidateBeforeCall(tenantId, urlId, _callback); + okhttp3.Call localVarCall = getV2PageReactsValidateBeforeCall(tenantId, urlId, sso, includeUserInfo, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -7797,12 +7968,36 @@ public class APIgetV2PageReactsRequest { private final String tenantId; @javax.annotation.Nonnull private final String urlId; + @javax.annotation.Nullable + private String sso; + @javax.annotation.Nullable + private PageReactIncludeUserInfo includeUserInfo; private APIgetV2PageReactsRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId) { this.tenantId = tenantId; this.urlId = urlId; } + /** + * Set sso + * @param sso (optional) + * @return APIgetV2PageReactsRequest + */ + public APIgetV2PageReactsRequest sso(@javax.annotation.Nullable String sso) { + this.sso = sso; + return this; + } + + /** + * Set includeUserInfo + * @param includeUserInfo When set, returns the users for each react id (avatars and usernames). Only \"public\" is accepted, which omits private profiles. (optional) + * @return APIgetV2PageReactsRequest + */ + public APIgetV2PageReactsRequest includeUserInfo(@javax.annotation.Nullable PageReactIncludeUserInfo includeUserInfo) { + this.includeUserInfo = includeUserInfo; + return this; + } + /** * Build call for getV2PageReacts * @param _callback ApiCallback API callback @@ -7817,7 +8012,7 @@ private APIgetV2PageReactsRequest(@javax.annotation.Nonnull String tenantId, @ja */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getV2PageReactsCall(tenantId, urlId, _callback); + return getV2PageReactsCall(tenantId, urlId, sso, includeUserInfo, _callback); } /** @@ -7833,7 +8028,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public GetV2PageReacts execute() throws ApiException { - ApiResponse localVarResp = getV2PageReactsWithHttpInfo(tenantId, urlId); + ApiResponse localVarResp = getV2PageReactsWithHttpInfo(tenantId, urlId, sso, includeUserInfo); return localVarResp.getData(); } @@ -7850,7 +8045,7 @@ public GetV2PageReacts execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return getV2PageReactsWithHttpInfo(tenantId, urlId); + return getV2PageReactsWithHttpInfo(tenantId, urlId, sso, includeUserInfo); } /** @@ -7867,7 +8062,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException { */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getV2PageReactsAsync(tenantId, urlId, _callback); + return getV2PageReactsAsync(tenantId, urlId, sso, includeUserInfo, _callback); } } @@ -9583,6 +9778,224 @@ public okhttp3.Call executeAsync(final ApiCallback 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = commentTranslationsRequest; + + // create path and map variables + String localVarPath = "/comments/{tenantId}/translations" + .replace("{" + "tenantId" + "}", localVarApiClient.escapeString(tenantId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (urlId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("urlId", urlId)); + } + + if (sso != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sso", sso)); + } + + if (locale != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("locale", locale)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call translateCommentsValidateBeforeCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull CommentTranslationsRequest commentTranslationsRequest, @javax.annotation.Nullable String sso, @javax.annotation.Nullable String locale, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling translateComments(Async)"); + } + + // verify the required parameter 'urlId' is set + if (urlId == null) { + throw new ApiException("Missing the required parameter 'urlId' when calling translateComments(Async)"); + } + + // verify the required parameter 'commentTranslationsRequest' is set + if (commentTranslationsRequest == null) { + throw new ApiException("Missing the required parameter 'commentTranslationsRequest' when calling translateComments(Async)"); + } + + return translateCommentsCall(tenantId, urlId, commentTranslationsRequest, sso, locale, _callback); + + } + + + private ApiResponse translateCommentsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull CommentTranslationsRequest commentTranslationsRequest, @javax.annotation.Nullable String sso, @javax.annotation.Nullable String locale) throws ApiException { + okhttp3.Call localVarCall = translateCommentsValidateBeforeCall(tenantId, urlId, commentTranslationsRequest, sso, locale, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call translateCommentsAsync(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull CommentTranslationsRequest commentTranslationsRequest, @javax.annotation.Nullable String sso, @javax.annotation.Nullable String locale, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = translateCommentsValidateBeforeCall(tenantId, urlId, commentTranslationsRequest, sso, locale, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APItranslateCommentsRequest { + @javax.annotation.Nonnull + private final String tenantId; + @javax.annotation.Nonnull + private final String urlId; + @javax.annotation.Nonnull + private final CommentTranslationsRequest commentTranslationsRequest; + @javax.annotation.Nullable + private String sso; + @javax.annotation.Nullable + private String locale; + + private APItranslateCommentsRequest(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull CommentTranslationsRequest commentTranslationsRequest) { + this.tenantId = tenantId; + this.urlId = urlId; + this.commentTranslationsRequest = commentTranslationsRequest; + } + + /** + * Set sso + * @param sso (optional) + * @return APItranslateCommentsRequest + */ + public APItranslateCommentsRequest sso(@javax.annotation.Nullable String sso) { + this.sso = sso; + return this; + } + + /** + * Set locale + * @param locale (optional) + * @return APItranslateCommentsRequest + */ + public APItranslateCommentsRequest locale(@javax.annotation.Nullable String locale) { + this.locale = locale; + return this; + } + + /** + * Build call for translateComments + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return translateCommentsCall(tenantId, urlId, commentTranslationsRequest, sso, locale, _callback); + } + + /** + * Execute translateComments request + * @return CommentTranslationsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public CommentTranslationsResponse execute() throws ApiException { + ApiResponse localVarResp = translateCommentsWithHttpInfo(tenantId, urlId, commentTranslationsRequest, sso, locale); + return localVarResp.getData(); + } + + /** + * Execute translateComments request with HTTP info returned + * @return ApiResponse<CommentTranslationsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return translateCommentsWithHttpInfo(tenantId, urlId, commentTranslationsRequest, sso, locale); + } + + /** + * Execute translateComments request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return translateCommentsAsync(tenantId, urlId, commentTranslationsRequest, sso, locale, _callback); + } + } + + /** + * + * Translates the given comments into the widget locale. Only available when the matching widget customization rule has Comment Translation set to Automatic or Manual. + * @param tenantId (required) + * @param urlId (required) + * @param commentTranslationsRequest (required) + * @return APItranslateCommentsRequest + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Ok -
0 Error -
+ */ + public APItranslateCommentsRequest translateComments(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String urlId, @javax.annotation.Nonnull CommentTranslationsRequest commentTranslationsRequest) { + return new APItranslateCommentsRequest(tenantId, urlId, commentTranslationsRequest); + } private okhttp3.Call unBlockCommentPublicCall(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull String commentId, @javax.annotation.Nonnull PublicBlockFromCommentParams publicBlockFromCommentParams, @javax.annotation.Nullable String sso, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers diff --git a/client/src/main/java/com/fastcomments/invoker/ApiClient.java b/client/src/main/java/com/fastcomments/invoker/ApiClient.java index 79ec4da0..82f32ae4 100644 --- a/client/src/main/java/com/fastcomments/invoker/ApiClient.java +++ b/client/src/main/java/com/fastcomments/invoker/ApiClient.java @@ -147,7 +147,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/3.0.0/java"); + setUserAgent("OpenAPI-Generator/3.1.0/java"); authentications = new HashMap(); } diff --git a/client/src/main/java/com/fastcomments/invoker/Configuration.java b/client/src/main/java/com/fastcomments/invoker/Configuration.java index c4a38ce3..108e2e2c 100644 --- a/client/src/main/java/com/fastcomments/invoker/Configuration.java +++ b/client/src/main/java/com/fastcomments/invoker/Configuration.java @@ -19,7 +19,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class Configuration { - public static final String VERSION = "3.0.0"; + public static final String VERSION = "3.1.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/client/src/main/java/com/fastcomments/invoker/JSON.java b/client/src/main/java/com/fastcomments/invoker/JSON.java index 95b2cf3e..e8521c63 100644 --- a/client/src/main/java/com/fastcomments/invoker/JSON.java +++ b/client/src/main/java/com/fastcomments/invoker/JSON.java @@ -101,6 +101,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.APIBanUserChangedValues.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.APIBannedUser.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.APIBannedUserWithMultiMatchInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.APIBatchJob.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.APIBatchJobPageMigrationResultsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.APIComment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.APICommentBase.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.APICommentBaseMeta.CustomTypeAdapterFactory()); @@ -171,7 +173,18 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentLogData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentLogEntry.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentPoll.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentPollInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentPollOption.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentPollOptionInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentPollPatch.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentPollPatchOptionsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentPollPutInput.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentTextUpdateRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentTranslation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentTranslationPublic.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentTranslationsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentTranslationsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentUserBadgeInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentUserHashTagInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CommentUserMentionInfo.CustomTypeAdapterFactory()); @@ -179,6 +192,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateAPIPageData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateAPISSOUserData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateAPIUserSubscriptionData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateAgentTenantBody.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateAgentTenantResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateCommentParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateEmailTemplateBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateEmailTemplateResponse.CustomTypeAdapterFactory()); @@ -189,6 +204,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateHashTagResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateModeratorBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateModeratorResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreatePollVoteBody.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreatePollVoteResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateQuestionConfigBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateQuestionConfigResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateQuestionResultBody.CustomTypeAdapterFactory()); @@ -204,6 +221,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateTicketResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateUserBadgeParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateV1PageReact.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateWebhookParams.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CreateWebhookResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CustomConfigParameters.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.CustomEmailTemplate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.DeleteCommentResult.CustomTypeAdapterFactory()); @@ -211,6 +230,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.DeleteFeedPostPublicResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.DeleteHashTagRequestBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.DeletePageAPIResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.DeletePollVoteResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.DeleteSSOUserAPIResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.DeleteSubscriptionAPIResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.DeletedCommentResultComment.CustomTypeAdapterFactory()); @@ -231,6 +251,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetAuditLogsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetBannedUsersCountResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetBannedUsersFromCommentResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetBatchJobAPIResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetBatchJobsAPIResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetCachedNotificationCountResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetCommentBanStatusResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetCommentTextResponse.CustomTypeAdapterFactory()); @@ -251,15 +273,21 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetGifsSearchResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetGifsTrendingResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetHashTagsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetMeResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetModeratorResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetModeratorsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetMyNotificationsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetNotificationCountResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetNotificationsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPageByURLIdAPIResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPageLikesAPIResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPageReactsAPIResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPagesAPIResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPendingWebhookEventCountResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPendingWebhookEventsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPollResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPollVoteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPollVotesResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPublicFeedPostsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetPublicPagesResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetQuestionConfigResponse.CustomTypeAdapterFactory()); @@ -293,6 +321,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetV2PageReacts.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetVotesForUserResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetVotesResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetWebhookSamplePayloadsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GetWebhooksResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GifGetLargeResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GifSearchInternalError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.GifSearchResponse.CustomTypeAdapterFactory()); @@ -304,6 +334,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.LiveEventExtraInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.MediaAsset.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.MetaItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.MigrateAPIPagesData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.ModerationAPIChildCommentsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.ModerationAPIComment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.ModerationAPICommentLog.CustomTypeAdapterFactory()); @@ -325,6 +356,12 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.ModerationUserSearchResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.Moderator.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.NotificationAndCount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PageCustomReactUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PageMigration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PageMigrationFailure.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PageMigrationSuccess.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PageMigrationUndoCounts.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PageReactUser.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PageUserEntry.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PageUsersInfoResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PageUsersOfflineResponse.CustomTypeAdapterFactory()); @@ -334,6 +371,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PatchPageAPIResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PatchSSOUserAPIResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PendingCommentToSyncOutbound.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PickCommentPollOptionsOrTotalVotesOrClosesAt.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PostRemoveCommentApiResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PreBanSummary.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PubSubComment.CustomTypeAdapterFactory()); @@ -347,19 +385,24 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PublicCommentBase.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PublicFeedPostsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PublicPage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PublicPollVote.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PublicVote.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PublicWebhook.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PutDomainConfigResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.PutSSOUserAPIResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.QueryPredicate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.QueryPredicateValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.QuestionCondition.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.QuestionConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.QuestionConfigCustomOptionsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.QuestionDatum.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.QuestionResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.QuestionResultAggregationOverall.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.QueuePageMigrationJobAPIResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.ReactBodyParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.ReactFeedPostResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.RecordStringBeforeStringOrNullAfterStringOrNullValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.RecordStringStringOrNumberOrNumberArrayValue.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.RemoveCommentActionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.RemoveUserBadgeResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.RenderEmailTemplateBody.CustomTypeAdapterFactory()); @@ -371,6 +414,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SaveCommentResponseOptimized.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SaveCommentsBulkResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SaveCommentsResponseWithPresence.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SavePollResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SearchUsersResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SearchUsersResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SearchUsersSectionedResponse.CustomTypeAdapterFactory()); @@ -380,6 +424,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SetCommentTextResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SetUserTrustFactorResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SpamRule.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.SubQuestionCondition.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.TOSConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.TenantBadge.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.TenantHashTag.CustomTypeAdapterFactory()); @@ -423,6 +468,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.VoteDeleteResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.VoteResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.VoteResponseUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.fastcomments.model.WebhookComment.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/client/src/main/java/com/fastcomments/model/APIAuditLog.java b/client/src/main/java/com/fastcomments/model/APIAuditLog.java index f40c2fd9..769e272e 100644 --- a/client/src/main/java/com/fastcomments/model/APIAuditLog.java +++ b/client/src/main/java/com/fastcomments/model/APIAuditLog.java @@ -225,6 +225,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private Map objectDetails; + public static final String SERIALIZED_NAME_TARGET_ID = "targetId"; + @SerializedName(SERIALIZED_NAME_TARGET_ID) + @javax.annotation.Nullable + private String targetId; + + public static final String SERIALIZED_NAME_TARGET_LABEL = "targetLabel"; + @SerializedName(SERIALIZED_NAME_TARGET_LABEL) + @javax.annotation.Nullable + private String targetLabel; + + public static final String SERIALIZED_NAME_UA = "ua"; + @SerializedName(SERIALIZED_NAME_UA) + @javax.annotation.Nullable + private String ua; + + public static final String SERIALIZED_NAME_S_ID_HASHED = "sIdHashed"; + @SerializedName(SERIALIZED_NAME_S_ID_HASHED) + @javax.annotation.Nullable + private String sIdHashed; + public APIAuditLog() { } @@ -464,6 +484,82 @@ public void setObjectDetails(@javax.annotation.Nullable Map obje } + public APIAuditLog targetId(@javax.annotation.Nullable String targetId) { + this.targetId = targetId; + return this; + } + + /** + * Get targetId + * @return targetId + */ + @javax.annotation.Nullable + public String getTargetId() { + return targetId; + } + + public void setTargetId(@javax.annotation.Nullable String targetId) { + this.targetId = targetId; + } + + + public APIAuditLog targetLabel(@javax.annotation.Nullable String targetLabel) { + this.targetLabel = targetLabel; + return this; + } + + /** + * Get targetLabel + * @return targetLabel + */ + @javax.annotation.Nullable + public String getTargetLabel() { + return targetLabel; + } + + public void setTargetLabel(@javax.annotation.Nullable String targetLabel) { + this.targetLabel = targetLabel; + } + + + public APIAuditLog ua(@javax.annotation.Nullable String ua) { + this.ua = ua; + return this; + } + + /** + * Get ua + * @return ua + */ + @javax.annotation.Nullable + public String getUa() { + return ua; + } + + public void setUa(@javax.annotation.Nullable String ua) { + this.ua = ua; + } + + + public APIAuditLog sIdHashed(@javax.annotation.Nullable String sIdHashed) { + this.sIdHashed = sIdHashed; + return this; + } + + /** + * Get sIdHashed + * @return sIdHashed + */ + @javax.annotation.Nullable + public String getsIdHashed() { + return sIdHashed; + } + + public void setsIdHashed(@javax.annotation.Nullable String sIdHashed) { + this.sIdHashed = sIdHashed; + } + + @Override public boolean equals(Object o) { @@ -485,12 +581,16 @@ public boolean equals(Object o) { Objects.equals(this.when, apIAuditLog.when) && Objects.equals(this.description, apIAuditLog.description) && Objects.equals(this.serverStartDate, apIAuditLog.serverStartDate) && - Objects.equals(this.objectDetails, apIAuditLog.objectDetails); + Objects.equals(this.objectDetails, apIAuditLog.objectDetails) && + Objects.equals(this.targetId, apIAuditLog.targetId) && + Objects.equals(this.targetLabel, apIAuditLog.targetLabel) && + Objects.equals(this.ua, apIAuditLog.ua) && + Objects.equals(this.sIdHashed, apIAuditLog.sIdHashed); } @Override public int hashCode() { - return Objects.hash(id, userId, username, resourceName, crudType, from, url, ip, when, description, serverStartDate, objectDetails); + return Objects.hash(id, userId, username, resourceName, crudType, from, url, ip, when, description, serverStartDate, objectDetails, targetId, targetLabel, ua, sIdHashed); } @Override @@ -509,6 +609,10 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" serverStartDate: ").append(toIndentedString(serverStartDate)).append("\n"); sb.append(" objectDetails: ").append(toIndentedString(objectDetails)).append("\n"); + sb.append(" targetId: ").append(toIndentedString(targetId)).append("\n"); + sb.append(" targetLabel: ").append(toIndentedString(targetLabel)).append("\n"); + sb.append(" ua: ").append(toIndentedString(ua)).append("\n"); + sb.append(" sIdHashed: ").append(toIndentedString(sIdHashed)).append("\n"); sb.append("}"); return sb.toString(); } @@ -527,7 +631,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("_id", "userId", "username", "resourceName", "crudType", "from", "url", "ip", "when", "description", "serverStartDate", "objectDetails")); + openapiFields = new HashSet(Arrays.asList("_id", "userId", "username", "resourceName", "crudType", "from", "url", "ip", "when", "description", "serverStartDate", "objectDetails", "targetId", "targetLabel", "ua", "sIdHashed")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("_id", "resourceName", "crudType")); @@ -594,6 +698,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } + if ((jsonObj.get("targetId") != null && !jsonObj.get("targetId").isJsonNull()) && !jsonObj.get("targetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetId").toString())); + } + if ((jsonObj.get("targetLabel") != null && !jsonObj.get("targetLabel").isJsonNull()) && !jsonObj.get("targetLabel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetLabel").toString())); + } + if ((jsonObj.get("ua") != null && !jsonObj.get("ua").isJsonNull()) && !jsonObj.get("ua").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ua` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ua").toString())); + } + if ((jsonObj.get("sIdHashed") != null && !jsonObj.get("sIdHashed").isJsonNull()) && !jsonObj.get("sIdHashed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sIdHashed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sIdHashed").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/java/com/fastcomments/model/APIBatchJob.java b/client/src/main/java/com/fastcomments/model/APIBatchJob.java new file mode 100644 index 00000000..f351f57a --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/APIBatchJob.java @@ -0,0 +1,564 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIBatchJobPageMigrationResultsInner; +import com.fastcomments.model.PageMigrationUndoCounts; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * APIBatchJob + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class APIBatchJob { + public static final String SERIALIZED_NAME_PAGE_MIGRATION_UNDO_RESULT = "pageMigrationUndoResult"; + @SerializedName(SERIALIZED_NAME_PAGE_MIGRATION_UNDO_RESULT) + @javax.annotation.Nullable + private PageMigrationUndoCounts pageMigrationUndoResult; + + public static final String SERIALIZED_NAME_UNDO_ID = "undoId"; + @SerializedName(SERIALIZED_NAME_UNDO_ID) + @javax.annotation.Nullable + private String undoId; + + public static final String SERIALIZED_NAME_PAGE_MIGRATION_RESULTS = "pageMigrationResults"; + @SerializedName(SERIALIZED_NAME_PAGE_MIGRATION_RESULTS) + @javax.annotation.Nullable + private List pageMigrationResults = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; + @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) + @javax.annotation.Nullable + private Integer totalCount; + + public static final String SERIALIZED_NAME_PROCESSED_COUNT = "processedCount"; + @SerializedName(SERIALIZED_NAME_PROCESSED_COUNT) + @javax.annotation.Nonnull + private Integer processedCount; + + public static final String SERIALIZED_NAME_COMPLETED_AT = "completedAt"; + @SerializedName(SERIALIZED_NAME_COMPLETED_AT) + @javax.annotation.Nullable + private OffsetDateTime completedAt; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private String status; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public APIBatchJob() { + } + + public APIBatchJob pageMigrationUndoResult(@javax.annotation.Nullable PageMigrationUndoCounts pageMigrationUndoResult) { + this.pageMigrationUndoResult = pageMigrationUndoResult; + return this; + } + + /** + * Get pageMigrationUndoResult + * @return pageMigrationUndoResult + */ + @javax.annotation.Nullable + public PageMigrationUndoCounts getPageMigrationUndoResult() { + return pageMigrationUndoResult; + } + + public void setPageMigrationUndoResult(@javax.annotation.Nullable PageMigrationUndoCounts pageMigrationUndoResult) { + this.pageMigrationUndoResult = pageMigrationUndoResult; + } + + + public APIBatchJob undoId(@javax.annotation.Nullable String undoId) { + this.undoId = undoId; + return this; + } + + /** + * migrate-pages: set once the job has finished. Pass to POST /api/v1/pages/migrations/{undoId}/undo within 90 days. undo-page-migration: the migration being undone. + * @return undoId + */ + @javax.annotation.Nullable + public String getUndoId() { + return undoId; + } + + public void setUndoId(@javax.annotation.Nullable String undoId) { + this.undoId = undoId; + } + + + public APIBatchJob pageMigrationResults(@javax.annotation.Nullable List pageMigrationResults) { + this.pageMigrationResults = pageMigrationResults; + return this; + } + + public APIBatchJob addPageMigrationResultsItem(APIBatchJobPageMigrationResultsInner pageMigrationResultsItem) { + if (this.pageMigrationResults == null) { + this.pageMigrationResults = new ArrayList<>(); + } + this.pageMigrationResults.add(pageMigrationResultsItem); + return this; + } + + /** + * migrate-pages: one entry per finished migration, in request order. + * @return pageMigrationResults + */ + @javax.annotation.Nullable + public List getPageMigrationResults() { + return pageMigrationResults; + } + + public void setPageMigrationResults(@javax.annotation.Nullable List pageMigrationResults) { + this.pageMigrationResults = pageMigrationResults; + } + + + public APIBatchJob totalCount(@javax.annotation.Nullable Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Total work, when known up front. + * @return totalCount + */ + @javax.annotation.Nullable + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(@javax.annotation.Nullable Integer totalCount) { + this.totalCount = totalCount; + } + + + public APIBatchJob processedCount(@javax.annotation.Nonnull Integer processedCount) { + this.processedCount = processedCount; + return this; + } + + /** + * Work done so far. The unit depends on the type: migrations finished for migrate-pages, records restored for undo-page-migration, rows for imports and exports. + * @return processedCount + */ + @javax.annotation.Nonnull + public Integer getProcessedCount() { + return processedCount; + } + + public void setProcessedCount(@javax.annotation.Nonnull Integer processedCount) { + this.processedCount = processedCount; + } + + + public APIBatchJob completedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = completedAt; + return this; + } + + /** + * Get completedAt + * @return completedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCompletedAt() { + return completedAt; + } + + public void setCompletedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = completedAt; + } + + + public APIBatchJob createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public APIBatchJob status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * requested, running, success or failed. + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public APIBatchJob type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * For example migrate-pages, undo-page-migration, export, import. + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public APIBatchJob id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the APIBatchJob instance itself + */ + public APIBatchJob putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIBatchJob apIBatchJob = (APIBatchJob) o; + return Objects.equals(this.pageMigrationUndoResult, apIBatchJob.pageMigrationUndoResult) && + Objects.equals(this.undoId, apIBatchJob.undoId) && + Objects.equals(this.pageMigrationResults, apIBatchJob.pageMigrationResults) && + Objects.equals(this.totalCount, apIBatchJob.totalCount) && + Objects.equals(this.processedCount, apIBatchJob.processedCount) && + Objects.equals(this.completedAt, apIBatchJob.completedAt) && + Objects.equals(this.createdAt, apIBatchJob.createdAt) && + Objects.equals(this.status, apIBatchJob.status) && + Objects.equals(this.type, apIBatchJob.type) && + Objects.equals(this.id, apIBatchJob.id)&& + Objects.equals(this.additionalProperties, apIBatchJob.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pageMigrationUndoResult, undoId, pageMigrationResults, totalCount, processedCount, completedAt, createdAt, status, type, id, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIBatchJob {\n"); + sb.append(" pageMigrationUndoResult: ").append(toIndentedString(pageMigrationUndoResult)).append("\n"); + sb.append(" undoId: ").append(toIndentedString(undoId)).append("\n"); + sb.append(" pageMigrationResults: ").append(toIndentedString(pageMigrationResults)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" processedCount: ").append(toIndentedString(processedCount)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pageMigrationUndoResult", "undoId", "pageMigrationResults", "totalCount", "processedCount", "completedAt", "createdAt", "status", "type", "id")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("processedCount", "createdAt", "status", "type", "id")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIBatchJob + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIBatchJob.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIBatchJob is not found in the empty JSON string", APIBatchJob.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : APIBatchJob.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pageMigrationUndoResult` + if (jsonObj.get("pageMigrationUndoResult") != null && !jsonObj.get("pageMigrationUndoResult").isJsonNull()) { + PageMigrationUndoCounts.validateJsonElement(jsonObj.get("pageMigrationUndoResult")); + } + if ((jsonObj.get("undoId") != null && !jsonObj.get("undoId").isJsonNull()) && !jsonObj.get("undoId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `undoId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("undoId").toString())); + } + if (jsonObj.get("pageMigrationResults") != null && !jsonObj.get("pageMigrationResults").isJsonNull()) { + JsonArray jsonArraypageMigrationResults = jsonObj.getAsJsonArray("pageMigrationResults"); + if (jsonArraypageMigrationResults != null) { + // ensure the json data is an array + if (!jsonObj.get("pageMigrationResults").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pageMigrationResults` to be an array in the JSON string but got `%s`", jsonObj.get("pageMigrationResults").toString())); + } + + // validate the optional field `pageMigrationResults` (array) + for (int i = 0; i < jsonArraypageMigrationResults.size(); i++) { + APIBatchJobPageMigrationResultsInner.validateJsonElement(jsonArraypageMigrationResults.get(i)); + }; + } + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIBatchJob.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIBatchJob' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIBatchJob.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIBatchJob value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public APIBatchJob read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + APIBatchJob instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of APIBatchJob given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIBatchJob + * @throws IOException if the JSON string is invalid with respect to APIBatchJob + */ + public static APIBatchJob fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, APIBatchJob.class); + } + + /** + * Convert an instance of APIBatchJob to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInner.java b/client/src/main/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInner.java new file mode 100644 index 00000000..e0c603b8 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInner.java @@ -0,0 +1,269 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageMigrationFailure; +import com.fastcomments.model.PageMigrationSuccess; +import com.fastcomments.model.PageMigrationType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.fastcomments.invoker.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class APIBatchJobPageMigrationResultsInner extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(APIBatchJobPageMigrationResultsInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIBatchJobPageMigrationResultsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIBatchJobPageMigrationResultsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterPageMigrationSuccess = gson.getDelegateAdapter(this, TypeToken.get(PageMigrationSuccess.class)); + final TypeAdapter adapterPageMigrationFailure = gson.getDelegateAdapter(this, TypeToken.get(PageMigrationFailure.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIBatchJobPageMigrationResultsInner value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `PageMigrationSuccess` + if (value.getActualInstance() instanceof PageMigrationSuccess) { + JsonElement element = adapterPageMigrationSuccess.toJsonTree((PageMigrationSuccess)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `PageMigrationFailure` + if (value.getActualInstance() instanceof PageMigrationFailure) { + JsonElement element = adapterPageMigrationFailure.toJsonTree((PageMigrationFailure)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: PageMigrationFailure, PageMigrationSuccess"); + } + + @Override + public APIBatchJobPageMigrationResultsInner read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize PageMigrationSuccess + try { + // validate the JSON object to see if any exception is thrown + PageMigrationSuccess.validateJsonElement(jsonElement); + actualAdapter = adapterPageMigrationSuccess; + APIBatchJobPageMigrationResultsInner ret = new APIBatchJobPageMigrationResultsInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for PageMigrationSuccess failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'PageMigrationSuccess'", e); + } + // deserialize PageMigrationFailure + try { + // validate the JSON object to see if any exception is thrown + PageMigrationFailure.validateJsonElement(jsonElement); + actualAdapter = adapterPageMigrationFailure; + APIBatchJobPageMigrationResultsInner ret = new APIBatchJobPageMigrationResultsInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for PageMigrationFailure failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'PageMigrationFailure'", e); + } + + throw new IOException(String.format(java.util.Locale.ROOT, "Failed deserialization for APIBatchJobPageMigrationResultsInner: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public APIBatchJobPageMigrationResultsInner() { + super("anyOf", Boolean.FALSE); + } + + public APIBatchJobPageMigrationResultsInner(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("PageMigrationSuccess", PageMigrationSuccess.class); + schemas.put("PageMigrationFailure", PageMigrationFailure.class); + } + + @Override + public Map> getSchemas() { + return APIBatchJobPageMigrationResultsInner.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * PageMigrationFailure, PageMigrationSuccess + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof PageMigrationSuccess) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof PageMigrationFailure) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be PageMigrationFailure, PageMigrationSuccess"); + } + + /** + * Get the actual instance, which can be the following: + * PageMigrationFailure, PageMigrationSuccess + * + * @return The actual instance (PageMigrationFailure, PageMigrationSuccess) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `PageMigrationSuccess`. If the actual instance is not `PageMigrationSuccess`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PageMigrationSuccess` + * @throws ClassCastException if the instance is not `PageMigrationSuccess` + */ + public PageMigrationSuccess getPageMigrationSuccess() throws ClassCastException { + return (PageMigrationSuccess)super.getActualInstance(); + } + + /** + * Get the actual instance of `PageMigrationFailure`. If the actual instance is not `PageMigrationFailure`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PageMigrationFailure` + * @throws ClassCastException if the instance is not `PageMigrationFailure` + */ + public PageMigrationFailure getPageMigrationFailure() throws ClassCastException { + return (PageMigrationFailure)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIBatchJobPageMigrationResultsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with PageMigrationSuccess + try { + PageMigrationSuccess.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for PageMigrationSuccess failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with PageMigrationFailure + try { + PageMigrationFailure.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for PageMigrationFailure failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(java.util.Locale.ROOT, "The JSON string is invalid for APIBatchJobPageMigrationResultsInner with anyOf schemas: PageMigrationFailure, PageMigrationSuccess. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of APIBatchJobPageMigrationResultsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIBatchJobPageMigrationResultsInner + * @throws IOException if the JSON string is invalid with respect to APIBatchJobPageMigrationResultsInner + */ + public static APIBatchJobPageMigrationResultsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, APIBatchJobPageMigrationResultsInner.class); + } + + /** + * Convert an instance of APIBatchJobPageMigrationResultsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/APITenant.java b/client/src/main/java/com/fastcomments/model/APITenant.java index 49726de6..f609f6c0 100644 --- a/client/src/main/java/com/fastcomments/model/APITenant.java +++ b/client/src/main/java/com/fastcomments/model/APITenant.java @@ -182,6 +182,11 @@ public class APITenant { @javax.annotation.Nullable private Boolean hasAuditing; + public static final String SERIALIZED_NAME_HAS_DEBRANDING = "hasDebranding"; + @SerializedName(SERIALIZED_NAME_HAS_DEBRANDING) + @javax.annotation.Nullable + private Boolean hasDebranding; + public static final String SERIALIZED_NAME_FLEX_LAST_BILLED_AMOUNT = "flexLastBilledAmount"; @SerializedName(SERIALIZED_NAME_FLEX_LAST_BILLED_AMOUNT) @javax.annotation.Nullable @@ -683,6 +688,25 @@ public void setHasAuditing(@javax.annotation.Nullable Boolean hasAuditing) { } + public APITenant hasDebranding(@javax.annotation.Nullable Boolean hasDebranding) { + this.hasDebranding = hasDebranding; + return this; + } + + /** + * Get hasDebranding + * @return hasDebranding + */ + @javax.annotation.Nullable + public Boolean getHasDebranding() { + return hasDebranding; + } + + public void setHasDebranding(@javax.annotation.Nullable Boolean hasDebranding) { + this.hasDebranding = hasDebranding; + } + + public APITenant flexLastBilledAmount(@javax.annotation.Nullable Double flexLastBilledAmount) { this.flexLastBilledAmount = flexLastBilledAmount; return this; @@ -783,6 +807,7 @@ public boolean equals(Object o) { Objects.equals(this.sendProfaneToSpam, apITenant.sendProfaneToSpam) && Objects.equals(this.hasFlexPricing, apITenant.hasFlexPricing) && Objects.equals(this.hasAuditing, apITenant.hasAuditing) && + Objects.equals(this.hasDebranding, apITenant.hasDebranding) && Objects.equals(this.flexLastBilledAmount, apITenant.flexLastBilledAmount) && Objects.equals(this.deAnonIpAddr, apITenant.deAnonIpAddr) && Objects.equals(this.meta, apITenant.meta); @@ -790,7 +815,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, name, email, signUpDate, packageId, paymentFrequency, billingInfoValid, billingHandledExternally, createdBy, isSetup, domainConfiguration, billingInfo, stripeCustomerId, stripeSubscriptionId, stripePlanId, enableProfanityFilter, enableSpamFilter, lastBillingIssueReminderDate, removeUnverifiedComments, unverifiedCommentsTTLms, commentsRequireApproval, autoApproveCommentOnVerification, sendProfaneToSpam, hasFlexPricing, hasAuditing, flexLastBilledAmount, deAnonIpAddr, meta); + return Objects.hash(id, name, email, signUpDate, packageId, paymentFrequency, billingInfoValid, billingHandledExternally, createdBy, isSetup, domainConfiguration, billingInfo, stripeCustomerId, stripeSubscriptionId, stripePlanId, enableProfanityFilter, enableSpamFilter, lastBillingIssueReminderDate, removeUnverifiedComments, unverifiedCommentsTTLms, commentsRequireApproval, autoApproveCommentOnVerification, sendProfaneToSpam, hasFlexPricing, hasAuditing, hasDebranding, flexLastBilledAmount, deAnonIpAddr, meta); } @Override @@ -822,6 +847,7 @@ public String toString() { sb.append(" sendProfaneToSpam: ").append(toIndentedString(sendProfaneToSpam)).append("\n"); sb.append(" hasFlexPricing: ").append(toIndentedString(hasFlexPricing)).append("\n"); sb.append(" hasAuditing: ").append(toIndentedString(hasAuditing)).append("\n"); + sb.append(" hasDebranding: ").append(toIndentedString(hasDebranding)).append("\n"); sb.append(" flexLastBilledAmount: ").append(toIndentedString(flexLastBilledAmount)).append("\n"); sb.append(" deAnonIpAddr: ").append(toIndentedString(deAnonIpAddr)).append("\n"); sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); @@ -843,7 +869,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "name", "email", "signUpDate", "packageId", "paymentFrequency", "billingInfoValid", "billingHandledExternally", "createdBy", "isSetup", "domainConfiguration", "billingInfo", "stripeCustomerId", "stripeSubscriptionId", "stripePlanId", "enableProfanityFilter", "enableSpamFilter", "lastBillingIssueReminderDate", "removeUnverifiedComments", "unverifiedCommentsTTLms", "commentsRequireApproval", "autoApproveCommentOnVerification", "sendProfaneToSpam", "hasFlexPricing", "hasAuditing", "flexLastBilledAmount", "deAnonIpAddr", "meta")); + openapiFields = new HashSet(Arrays.asList("id", "name", "email", "signUpDate", "packageId", "paymentFrequency", "billingInfoValid", "billingHandledExternally", "createdBy", "isSetup", "domainConfiguration", "billingInfo", "stripeCustomerId", "stripeSubscriptionId", "stripePlanId", "enableProfanityFilter", "enableSpamFilter", "lastBillingIssueReminderDate", "removeUnverifiedComments", "unverifiedCommentsTTLms", "commentsRequireApproval", "autoApproveCommentOnVerification", "sendProfaneToSpam", "hasFlexPricing", "hasAuditing", "hasDebranding", "flexLastBilledAmount", "deAnonIpAddr", "meta")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("id", "name", "signUpDate", "packageId", "paymentFrequency", "billingInfoValid", "createdBy", "isSetup", "domainConfiguration", "enableProfanityFilter", "enableSpamFilter")); diff --git a/client/src/main/java/com/fastcomments/model/BillingInfo.java b/client/src/main/java/com/fastcomments/model/BillingInfo.java index 56dca02d..7556978e 100644 --- a/client/src/main/java/com/fastcomments/model/BillingInfo.java +++ b/client/src/main/java/com/fastcomments/model/BillingInfo.java @@ -90,6 +90,11 @@ public class BillingInfo { @javax.annotation.Nullable private String email; + public static final String SERIALIZED_NAME_VAT_ID = "vatId"; + @SerializedName(SERIALIZED_NAME_VAT_ID) + @javax.annotation.Nullable + private String vatId; + public BillingInfo() { } @@ -245,6 +250,25 @@ public void setEmail(@javax.annotation.Nullable String email) { } + public BillingInfo vatId(@javax.annotation.Nullable String vatId) { + this.vatId = vatId; + return this; + } + + /** + * VAT / Tax ID for invoices. Only persisted once Stripe has accepted it. + * @return vatId + */ + @javax.annotation.Nullable + public String getVatId() { + return vatId; + } + + public void setVatId(@javax.annotation.Nullable String vatId) { + this.vatId = vatId; + } + + @Override public boolean equals(Object o) { @@ -262,12 +286,13 @@ public boolean equals(Object o) { Objects.equals(this.zip, billingInfo.zip) && Objects.equals(this.country, billingInfo.country) && Objects.equals(this.currency, billingInfo.currency) && - Objects.equals(this.email, billingInfo.email); + Objects.equals(this.email, billingInfo.email) && + Objects.equals(this.vatId, billingInfo.vatId); } @Override public int hashCode() { - return Objects.hash(name, address, city, state, zip, country, currency, email); + return Objects.hash(name, address, city, state, zip, country, currency, email, vatId); } @Override @@ -282,6 +307,7 @@ public String toString() { sb.append(" country: ").append(toIndentedString(country)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" vatId: ").append(toIndentedString(vatId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -300,7 +326,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "address", "city", "state", "zip", "country", "currency", "email")); + openapiFields = new HashSet(Arrays.asList("name", "address", "city", "state", "zip", "country", "currency", "email", "vatId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name", "address", "city", "state", "zip", "country")); @@ -358,6 +384,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } + if ((jsonObj.get("vatId") != null && !jsonObj.get("vatId").isJsonNull()) && !jsonObj.get("vatId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `vatId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vatId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/java/com/fastcomments/model/CommentData.java b/client/src/main/java/com/fastcomments/model/CommentData.java index 349f834a..e58049a9 100644 --- a/client/src/main/java/com/fastcomments/model/CommentData.java +++ b/client/src/main/java/com/fastcomments/model/CommentData.java @@ -14,9 +14,10 @@ package com.fastcomments.model; import java.util.Objects; +import com.fastcomments.model.CommentPollInput; import com.fastcomments.model.CommentUserHashTagInfo; import com.fastcomments.model.CommentUserMentionInfo; -import com.fastcomments.model.GifSearchResponseImagesInnerInner; +import com.fastcomments.model.RecordStringStringOrNumberOrNumberArrayValue; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -175,7 +176,12 @@ public class CommentData { public static final String SERIALIZED_NAME_QUESTION_VALUES = "questionValues"; @SerializedName(SERIALIZED_NAME_QUESTION_VALUES) @javax.annotation.Nullable - private Map questionValues = new HashMap<>(); + private Map questionValues = new HashMap<>(); + + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nullable + private CommentPollInput poll; public static final String SERIALIZED_NAME_TOS = "tos"; @SerializedName(SERIALIZED_NAME_TOS) @@ -659,12 +665,12 @@ public void setFeedbackIds(@javax.annotation.Nullable List feedbackIds) } - public CommentData questionValues(@javax.annotation.Nullable Map questionValues) { + public CommentData questionValues(@javax.annotation.Nullable Map questionValues) { this.questionValues = questionValues; return this; } - public CommentData putQuestionValuesItem(String key, GifSearchResponseImagesInnerInner questionValuesItem) { + public CommentData putQuestionValuesItem(String key, RecordStringStringOrNumberOrNumberArrayValue questionValuesItem) { if (this.questionValues == null) { this.questionValues = new HashMap<>(); } @@ -677,15 +683,34 @@ public CommentData putQuestionValuesItem(String key, GifSearchResponseImagesInne * @return questionValues */ @javax.annotation.Nullable - public Map getQuestionValues() { + public Map getQuestionValues() { return questionValues; } - public void setQuestionValues(@javax.annotation.Nullable Map questionValues) { + public void setQuestionValues(@javax.annotation.Nullable Map questionValues) { this.questionValues = questionValues; } + public CommentData poll(@javax.annotation.Nullable CommentPollInput poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nullable + public CommentPollInput getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nullable CommentPollInput poll) { + this.poll = poll; + } + + public CommentData tos(@javax.annotation.Nullable Boolean tos) { this.tos = tos; return this; @@ -758,13 +783,14 @@ public boolean equals(Object o) { Objects.equals(this.autoplayDelayMS, commentData.autoplayDelayMS) && Objects.equals(this.feedbackIds, commentData.feedbackIds) && Objects.equals(this.questionValues, commentData.questionValues) && + Objects.equals(this.poll, commentData.poll) && Objects.equals(this.tos, commentData.tos) && Objects.equals(this.botId, commentData.botId); } @Override public int hashCode() { - return Objects.hash(date, localDateString, localDateHours, commenterName, commenterEmail, commenterLink, comment, productId, userId, avatarSrc, parentId, mentions, hashTags, pageTitle, isFromMyAccountPage, url, urlId, meta, moderationGroupIds, rating, fromOfflineRestore, autoplayDelayMS, feedbackIds, questionValues, tos, botId); + return Objects.hash(date, localDateString, localDateHours, commenterName, commenterEmail, commenterLink, comment, productId, userId, avatarSrc, parentId, mentions, hashTags, pageTitle, isFromMyAccountPage, url, urlId, meta, moderationGroupIds, rating, fromOfflineRestore, autoplayDelayMS, feedbackIds, questionValues, poll, tos, botId); } @Override @@ -795,6 +821,7 @@ public String toString() { sb.append(" autoplayDelayMS: ").append(toIndentedString(autoplayDelayMS)).append("\n"); sb.append(" feedbackIds: ").append(toIndentedString(feedbackIds)).append("\n"); sb.append(" questionValues: ").append(toIndentedString(questionValues)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); sb.append(" tos: ").append(toIndentedString(tos)).append("\n"); sb.append(" botId: ").append(toIndentedString(botId)).append("\n"); sb.append("}"); @@ -815,7 +842,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("date", "localDateString", "localDateHours", "commenterName", "commenterEmail", "commenterLink", "comment", "productId", "userId", "avatarSrc", "parentId", "mentions", "hashTags", "pageTitle", "isFromMyAccountPage", "url", "urlId", "meta", "moderationGroupIds", "rating", "fromOfflineRestore", "autoplayDelayMS", "feedbackIds", "questionValues", "tos", "botId")); + openapiFields = new HashSet(Arrays.asList("date", "localDateString", "localDateHours", "commenterName", "commenterEmail", "commenterLink", "comment", "productId", "userId", "avatarSrc", "parentId", "mentions", "hashTags", "pageTitle", "isFromMyAccountPage", "url", "urlId", "meta", "moderationGroupIds", "rating", "fromOfflineRestore", "autoplayDelayMS", "feedbackIds", "questionValues", "poll", "tos", "botId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("commenterName", "comment", "url", "urlId")); @@ -918,6 +945,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("feedbackIds") != null && !jsonObj.get("feedbackIds").isJsonNull() && !jsonObj.get("feedbackIds").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `feedbackIds` to be an array in the JSON string but got `%s`", jsonObj.get("feedbackIds").toString())); } + // validate the optional field `poll` + if (jsonObj.get("poll") != null && !jsonObj.get("poll").isJsonNull()) { + CommentPollInput.validateJsonElement(jsonObj.get("poll")); + } if ((jsonObj.get("botId") != null && !jsonObj.get("botId").isJsonNull()) && !jsonObj.get("botId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `botId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("botId").toString())); } diff --git a/client/src/main/java/com/fastcomments/model/CommentLogData.java b/client/src/main/java/com/fastcomments/model/CommentLogData.java index f6434bfd..14266650 100644 --- a/client/src/main/java/com/fastcomments/model/CommentLogData.java +++ b/client/src/main/java/com/fastcomments/model/CommentLogData.java @@ -14,6 +14,7 @@ package com.fastcomments.model; import java.util.Objects; +import com.fastcomments.model.NotificationSkipReason; import com.fastcomments.model.RepeatCommentCheckIgnoredReason; import com.fastcomments.model.RepeatCommentHandlingAction; import com.fastcomments.model.SpamRule; @@ -194,6 +195,11 @@ public class CommentLogData { @javax.annotation.Nullable private RepeatCommentCheckIgnoredReason reason; + public static final String SERIALIZED_NAME_SKIP_REASON = "skipReason"; + @SerializedName(SERIALIZED_NAME_SKIP_REASON) + @javax.annotation.Nullable + private String skipReason; + public static final String SERIALIZED_NAME_OTHER_DATA = "otherData"; @SerializedName(SERIALIZED_NAME_OTHER_DATA) @javax.annotation.Nullable @@ -339,6 +345,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private String detectedLanguage; + public static final String SERIALIZED_NAME_RECIPIENT_USER_ID = "recipientUserId"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_USER_ID) + @javax.annotation.Nullable + private String recipientUserId; + + public static final String SERIALIZED_NAME_NOTIFY_SKIP_REASON = "notifySkipReason"; + @SerializedName(SERIALIZED_NAME_NOTIFY_SKIP_REASON) + @javax.annotation.Nullable + private NotificationSkipReason notifySkipReason; + + public static final String SERIALIZED_NAME_EMAIL_QUEUED = "emailQueued"; + @SerializedName(SERIALIZED_NAME_EMAIL_QUEUED) + @javax.annotation.Nullable + private Boolean emailQueued; + public CommentLogData() { } @@ -874,6 +895,25 @@ public void setReason(@javax.annotation.Nullable RepeatCommentCheckIgnoredReason } + public CommentLogData skipReason(@javax.annotation.Nullable String skipReason) { + this.skipReason = skipReason; + return this; + } + + /** + * Get skipReason + * @return skipReason + */ + @javax.annotation.Nullable + public String getSkipReason() { + return skipReason; + } + + public void setSkipReason(@javax.annotation.Nullable String skipReason) { + this.skipReason = skipReason; + } + + public CommentLogData otherData(@javax.annotation.Nullable Object otherData) { this.otherData = otherData; return this; @@ -1235,6 +1275,63 @@ public void setDetectedLanguage(@javax.annotation.Nullable String detectedLangua } + public CommentLogData recipientUserId(@javax.annotation.Nullable String recipientUserId) { + this.recipientUserId = recipientUserId; + return this; + } + + /** + * Get recipientUserId + * @return recipientUserId + */ + @javax.annotation.Nullable + public String getRecipientUserId() { + return recipientUserId; + } + + public void setRecipientUserId(@javax.annotation.Nullable String recipientUserId) { + this.recipientUserId = recipientUserId; + } + + + public CommentLogData notifySkipReason(@javax.annotation.Nullable NotificationSkipReason notifySkipReason) { + this.notifySkipReason = notifySkipReason; + return this; + } + + /** + * Get notifySkipReason + * @return notifySkipReason + */ + @javax.annotation.Nullable + public NotificationSkipReason getNotifySkipReason() { + return notifySkipReason; + } + + public void setNotifySkipReason(@javax.annotation.Nullable NotificationSkipReason notifySkipReason) { + this.notifySkipReason = notifySkipReason; + } + + + public CommentLogData emailQueued(@javax.annotation.Nullable Boolean emailQueued) { + this.emailQueued = emailQueued; + return this; + } + + /** + * Get emailQueued + * @return emailQueued + */ + @javax.annotation.Nullable + public Boolean getEmailQueued() { + return emailQueued; + } + + public void setEmailQueued(@javax.annotation.Nullable Boolean emailQueued) { + this.emailQueued = emailQueued; + } + + @Override public boolean equals(Object o) { @@ -1273,6 +1370,7 @@ public boolean equals(Object o) { Objects.equals(this.votesDownAfter, commentLogData.votesDownAfter) && Objects.equals(this.repeatAction, commentLogData.repeatAction) && Objects.equals(this.reason, commentLogData.reason) && + Objects.equals(this.skipReason, commentLogData.skipReason) && Objects.equals(this.otherData, commentLogData.otherData) && Objects.equals(this.spamBefore, commentLogData.spamBefore) && Objects.equals(this.spamAfter, commentLogData.spamAfter) && @@ -1291,12 +1389,15 @@ public boolean equals(Object o) { Objects.equals(this.referencedCommentId, commentLogData.referencedCommentId) && Objects.equals(this.invalidLocale, commentLogData.invalidLocale) && Objects.equals(this.detectedLocale, commentLogData.detectedLocale) && - Objects.equals(this.detectedLanguage, commentLogData.detectedLanguage); + Objects.equals(this.detectedLanguage, commentLogData.detectedLanguage) && + Objects.equals(this.recipientUserId, commentLogData.recipientUserId) && + Objects.equals(this.notifySkipReason, commentLogData.notifySkipReason) && + Objects.equals(this.emailQueued, commentLogData.emailQueued); } @Override public int hashCode() { - return Objects.hash(clearContent, isDeletedUser, phrase, badWord, word, locale, tenantBadgeId, badgeId, wasLoggedIn, foundUser, verified, engine, engineResponse, engineTokens, trustFactor, source, rule, userId, subscribers, notificationCount, votesBefore, votesUpBefore, votesDownBefore, votesAfter, votesUpAfter, votesDownAfter, repeatAction, reason, otherData, spamBefore, spamAfter, permanentFlag, approvedBefore, approvedAfter, reviewedBefore, reviewedAfter, textBefore, textAfter, expireBefore, expireAfter, flagCountBefore, trustFactorBefore, trustFactorAfter, referencedCommentId, invalidLocale, detectedLocale, detectedLanguage); + return Objects.hash(clearContent, isDeletedUser, phrase, badWord, word, locale, tenantBadgeId, badgeId, wasLoggedIn, foundUser, verified, engine, engineResponse, engineTokens, trustFactor, source, rule, userId, subscribers, notificationCount, votesBefore, votesUpBefore, votesDownBefore, votesAfter, votesUpAfter, votesDownAfter, repeatAction, reason, skipReason, otherData, spamBefore, spamAfter, permanentFlag, approvedBefore, approvedAfter, reviewedBefore, reviewedAfter, textBefore, textAfter, expireBefore, expireAfter, flagCountBefore, trustFactorBefore, trustFactorAfter, referencedCommentId, invalidLocale, detectedLocale, detectedLanguage, recipientUserId, notifySkipReason, emailQueued); } @Override @@ -1331,6 +1432,7 @@ public String toString() { sb.append(" votesDownAfter: ").append(toIndentedString(votesDownAfter)).append("\n"); sb.append(" repeatAction: ").append(toIndentedString(repeatAction)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" skipReason: ").append(toIndentedString(skipReason)).append("\n"); sb.append(" otherData: ").append(toIndentedString(otherData)).append("\n"); sb.append(" spamBefore: ").append(toIndentedString(spamBefore)).append("\n"); sb.append(" spamAfter: ").append(toIndentedString(spamAfter)).append("\n"); @@ -1350,6 +1452,9 @@ public String toString() { sb.append(" invalidLocale: ").append(toIndentedString(invalidLocale)).append("\n"); sb.append(" detectedLocale: ").append(toIndentedString(detectedLocale)).append("\n"); sb.append(" detectedLanguage: ").append(toIndentedString(detectedLanguage)).append("\n"); + sb.append(" recipientUserId: ").append(toIndentedString(recipientUserId)).append("\n"); + sb.append(" notifySkipReason: ").append(toIndentedString(notifySkipReason)).append("\n"); + sb.append(" emailQueued: ").append(toIndentedString(emailQueued)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1368,7 +1473,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("clearContent", "isDeletedUser", "phrase", "badWord", "word", "locale", "tenantBadgeId", "badgeId", "wasLoggedIn", "foundUser", "verified", "engine", "engineResponse", "engineTokens", "trustFactor", "source", "rule", "userId", "subscribers", "notificationCount", "votesBefore", "votesUpBefore", "votesDownBefore", "votesAfter", "votesUpAfter", "votesDownAfter", "repeatAction", "reason", "otherData", "spamBefore", "spamAfter", "permanentFlag", "approvedBefore", "approvedAfter", "reviewedBefore", "reviewedAfter", "textBefore", "textAfter", "expireBefore", "expireAfter", "flagCountBefore", "trustFactorBefore", "trustFactorAfter", "referencedCommentId", "invalidLocale", "detectedLocale", "detectedLanguage")); + openapiFields = new HashSet(Arrays.asList("clearContent", "isDeletedUser", "phrase", "badWord", "word", "locale", "tenantBadgeId", "badgeId", "wasLoggedIn", "foundUser", "verified", "engine", "engineResponse", "engineTokens", "trustFactor", "source", "rule", "userId", "subscribers", "notificationCount", "votesBefore", "votesUpBefore", "votesDownBefore", "votesAfter", "votesUpAfter", "votesDownAfter", "repeatAction", "reason", "skipReason", "otherData", "spamBefore", "spamAfter", "permanentFlag", "approvedBefore", "approvedAfter", "reviewedBefore", "reviewedAfter", "textBefore", "textAfter", "expireBefore", "expireAfter", "flagCountBefore", "trustFactorBefore", "trustFactorAfter", "referencedCommentId", "invalidLocale", "detectedLocale", "detectedLanguage", "recipientUserId", "notifySkipReason", "emailQueued")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -1437,6 +1542,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) { RepeatCommentCheckIgnoredReason.validateJsonElement(jsonObj.get("reason")); } + if ((jsonObj.get("skipReason") != null && !jsonObj.get("skipReason").isJsonNull()) && !jsonObj.get("skipReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `skipReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("skipReason").toString())); + } if ((jsonObj.get("permanentFlag") != null && !jsonObj.get("permanentFlag").isJsonNull()) && !jsonObj.get("permanentFlag").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `permanentFlag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("permanentFlag").toString())); } @@ -1462,6 +1570,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("detectedLanguage") != null && !jsonObj.get("detectedLanguage").isJsonNull()) && !jsonObj.get("detectedLanguage").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `detectedLanguage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("detectedLanguage").toString())); } + if ((jsonObj.get("recipientUserId") != null && !jsonObj.get("recipientUserId").isJsonNull()) && !jsonObj.get("recipientUserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recipientUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientUserId").toString())); + } + // validate the optional field `notifySkipReason` + if (jsonObj.get("notifySkipReason") != null && !jsonObj.get("notifySkipReason").isJsonNull()) { + NotificationSkipReason.validateJsonElement(jsonObj.get("notifySkipReason")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/java/com/fastcomments/model/CommentLogType.java b/client/src/main/java/com/fastcomments/model/CommentLogType.java index 48247d5a..602d42d7 100644 --- a/client/src/main/java/com/fastcomments/model/CommentLogType.java +++ b/client/src/main/java/com/fastcomments/model/CommentLogType.java @@ -139,7 +139,27 @@ public enum CommentLogType { NUMBER_54(54), - NUMBER_55(55); + NUMBER_55(55), + + NUMBER_56(56), + + NUMBER_57(57), + + NUMBER_58(58), + + NUMBER_59(59), + + NUMBER_60(60), + + NUMBER_61(61), + + NUMBER_62(62), + + NUMBER_63(63), + + NUMBER_64(64), + + NUMBER_65(65); private Integer value; diff --git a/client/src/main/java/com/fastcomments/model/CommentPoll.java b/client/src/main/java/com/fastcomments/model/CommentPoll.java new file mode 100644 index 00000000..4cb04157 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentPoll.java @@ -0,0 +1,366 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.CommentPollOption; +import com.fastcomments.model.PollPrivacy; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * A poll attached to a comment. Vote counts are denormalized here; individual votes live in PollVote. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentPoll { + public static final String SERIALIZED_NAME_QUESTION = "question"; + @SerializedName(SERIALIZED_NAME_QUESTION) + @javax.annotation.Nonnull + private String question; + + public static final String SERIALIZED_NAME_OPTIONS = "options"; + @SerializedName(SERIALIZED_NAME_OPTIONS) + @javax.annotation.Nonnull + private List options = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TOTAL_VOTES = "totalVotes"; + @SerializedName(SERIALIZED_NAME_TOTAL_VOTES) + @javax.annotation.Nonnull + private Integer totalVotes; + + public static final String SERIALIZED_NAME_CLOSES_AT = "closesAt"; + @SerializedName(SERIALIZED_NAME_CLOSES_AT) + @javax.annotation.Nullable + private OffsetDateTime closesAt; + + public static final String SERIALIZED_NAME_PRIVACY = "privacy"; + @SerializedName(SERIALIZED_NAME_PRIVACY) + @javax.annotation.Nullable + private PollPrivacy privacy; + + public static final String SERIALIZED_NAME_REQUIRE_VOTE_TO_SEE_RESULTS = "requireVoteToSeeResults"; + @SerializedName(SERIALIZED_NAME_REQUIRE_VOTE_TO_SEE_RESULTS) + @javax.annotation.Nullable + private Boolean requireVoteToSeeResults; + + public CommentPoll() { + } + + public CommentPoll question(@javax.annotation.Nonnull String question) { + this.question = question; + return this; + } + + /** + * Get question + * @return question + */ + @javax.annotation.Nonnull + public String getQuestion() { + return question; + } + + public void setQuestion(@javax.annotation.Nonnull String question) { + this.question = question; + } + + + public CommentPoll options(@javax.annotation.Nonnull List options) { + this.options = options; + return this; + } + + public CommentPoll addOptionsItem(CommentPollOption optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * Get options + * @return options + */ + @javax.annotation.Nonnull + public List getOptions() { + return options; + } + + public void setOptions(@javax.annotation.Nonnull List options) { + this.options = options; + } + + + public CommentPoll totalVotes(@javax.annotation.Nonnull Integer totalVotes) { + this.totalVotes = totalVotes; + return this; + } + + /** + * Get totalVotes + * @return totalVotes + */ + @javax.annotation.Nonnull + public Integer getTotalVotes() { + return totalVotes; + } + + public void setTotalVotes(@javax.annotation.Nonnull Integer totalVotes) { + this.totalVotes = totalVotes; + } + + + public CommentPoll closesAt(@javax.annotation.Nullable OffsetDateTime closesAt) { + this.closesAt = closesAt; + return this; + } + + /** + * Get closesAt + * @return closesAt + */ + @javax.annotation.Nullable + public OffsetDateTime getClosesAt() { + return closesAt; + } + + public void setClosesAt(@javax.annotation.Nullable OffsetDateTime closesAt) { + this.closesAt = closesAt; + } + + + public CommentPoll privacy(@javax.annotation.Nullable PollPrivacy privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get privacy + * @return privacy + */ + @javax.annotation.Nullable + public PollPrivacy getPrivacy() { + return privacy; + } + + public void setPrivacy(@javax.annotation.Nullable PollPrivacy privacy) { + this.privacy = privacy; + } + + + public CommentPoll requireVoteToSeeResults(@javax.annotation.Nullable Boolean requireVoteToSeeResults) { + this.requireVoteToSeeResults = requireVoteToSeeResults; + return this; + } + + /** + * Get requireVoteToSeeResults + * @return requireVoteToSeeResults + */ + @javax.annotation.Nullable + public Boolean getRequireVoteToSeeResults() { + return requireVoteToSeeResults; + } + + public void setRequireVoteToSeeResults(@javax.annotation.Nullable Boolean requireVoteToSeeResults) { + this.requireVoteToSeeResults = requireVoteToSeeResults; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentPoll commentPoll = (CommentPoll) o; + return Objects.equals(this.question, commentPoll.question) && + Objects.equals(this.options, commentPoll.options) && + Objects.equals(this.totalVotes, commentPoll.totalVotes) && + Objects.equals(this.closesAt, commentPoll.closesAt) && + Objects.equals(this.privacy, commentPoll.privacy) && + Objects.equals(this.requireVoteToSeeResults, commentPoll.requireVoteToSeeResults); + } + + @Override + public int hashCode() { + return Objects.hash(question, options, totalVotes, closesAt, privacy, requireVoteToSeeResults); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentPoll {\n"); + sb.append(" question: ").append(toIndentedString(question)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" totalVotes: ").append(toIndentedString(totalVotes)).append("\n"); + sb.append(" closesAt: ").append(toIndentedString(closesAt)).append("\n"); + sb.append(" privacy: ").append(toIndentedString(privacy)).append("\n"); + sb.append(" requireVoteToSeeResults: ").append(toIndentedString(requireVoteToSeeResults)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("question", "options", "totalVotes", "closesAt", "privacy", "requireVoteToSeeResults")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("question", "options", "totalVotes")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentPoll + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentPoll.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentPoll is not found in the empty JSON string", CommentPoll.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentPoll.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentPoll` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentPoll.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("question").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `question` to be a primitive type in the JSON string but got `%s`", jsonObj.get("question").toString())); + } + if (jsonObj.get("options") != null) { + if (!jsonObj.get("options").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `options` to be an array in the JSON string but got `%s`", jsonObj.get("options").toString())); + } + JsonArray jsonArrayoptions = jsonObj.getAsJsonArray("options"); + // validate the required field `options` (array) + for (int i = 0; i < jsonArrayoptions.size(); i++) { + CommentPollOption.validateJsonElement(jsonArrayoptions.get(i)); + } + } + // validate the optional field `privacy` + if (jsonObj.get("privacy") != null && !jsonObj.get("privacy").isJsonNull()) { + PollPrivacy.validateJsonElement(jsonObj.get("privacy")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentPoll.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentPoll' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentPoll.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentPoll value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentPoll read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentPoll given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentPoll + * @throws IOException if the JSON string is invalid with respect to CommentPoll + */ + public static CommentPoll fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentPoll.class); + } + + /** + * Convert an instance of CommentPoll to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentPollInput.java b/client/src/main/java/com/fastcomments/model/CommentPollInput.java new file mode 100644 index 00000000..68d273e0 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentPollInput.java @@ -0,0 +1,332 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentPollInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentPollInput { + public static final String SERIALIZED_NAME_QUESTION = "question"; + @SerializedName(SERIALIZED_NAME_QUESTION) + @javax.annotation.Nonnull + private String question; + + public static final String SERIALIZED_NAME_OPTIONS = "options"; + @SerializedName(SERIALIZED_NAME_OPTIONS) + @javax.annotation.Nonnull + private List options = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CLOSES_AT = "closesAt"; + @SerializedName(SERIALIZED_NAME_CLOSES_AT) + @javax.annotation.Nullable + private String closesAt; + + public static final String SERIALIZED_NAME_PRIVACY = "privacy"; + @SerializedName(SERIALIZED_NAME_PRIVACY) + @javax.annotation.Nullable + private Integer privacy; + + public static final String SERIALIZED_NAME_REQUIRE_VOTE_TO_SEE_RESULTS = "requireVoteToSeeResults"; + @SerializedName(SERIALIZED_NAME_REQUIRE_VOTE_TO_SEE_RESULTS) + @javax.annotation.Nullable + private Boolean requireVoteToSeeResults; + + public CommentPollInput() { + } + + public CommentPollInput question(@javax.annotation.Nonnull String question) { + this.question = question; + return this; + } + + /** + * Get question + * @return question + */ + @javax.annotation.Nonnull + public String getQuestion() { + return question; + } + + public void setQuestion(@javax.annotation.Nonnull String question) { + this.question = question; + } + + + public CommentPollInput options(@javax.annotation.Nonnull List options) { + this.options = options; + return this; + } + + public CommentPollInput addOptionsItem(String optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * Get options + * @return options + */ + @javax.annotation.Nonnull + public List getOptions() { + return options; + } + + public void setOptions(@javax.annotation.Nonnull List options) { + this.options = options; + } + + + public CommentPollInput closesAt(@javax.annotation.Nullable String closesAt) { + this.closesAt = closesAt; + return this; + } + + /** + * Get closesAt + * @return closesAt + */ + @javax.annotation.Nullable + public String getClosesAt() { + return closesAt; + } + + public void setClosesAt(@javax.annotation.Nullable String closesAt) { + this.closesAt = closesAt; + } + + + public CommentPollInput privacy(@javax.annotation.Nullable Integer privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get privacy + * @return privacy + */ + @javax.annotation.Nullable + public Integer getPrivacy() { + return privacy; + } + + public void setPrivacy(@javax.annotation.Nullable Integer privacy) { + this.privacy = privacy; + } + + + public CommentPollInput requireVoteToSeeResults(@javax.annotation.Nullable Boolean requireVoteToSeeResults) { + this.requireVoteToSeeResults = requireVoteToSeeResults; + return this; + } + + /** + * Get requireVoteToSeeResults + * @return requireVoteToSeeResults + */ + @javax.annotation.Nullable + public Boolean getRequireVoteToSeeResults() { + return requireVoteToSeeResults; + } + + public void setRequireVoteToSeeResults(@javax.annotation.Nullable Boolean requireVoteToSeeResults) { + this.requireVoteToSeeResults = requireVoteToSeeResults; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentPollInput commentPollInput = (CommentPollInput) o; + return Objects.equals(this.question, commentPollInput.question) && + Objects.equals(this.options, commentPollInput.options) && + Objects.equals(this.closesAt, commentPollInput.closesAt) && + Objects.equals(this.privacy, commentPollInput.privacy) && + Objects.equals(this.requireVoteToSeeResults, commentPollInput.requireVoteToSeeResults); + } + + @Override + public int hashCode() { + return Objects.hash(question, options, closesAt, privacy, requireVoteToSeeResults); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentPollInput {\n"); + sb.append(" question: ").append(toIndentedString(question)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" closesAt: ").append(toIndentedString(closesAt)).append("\n"); + sb.append(" privacy: ").append(toIndentedString(privacy)).append("\n"); + sb.append(" requireVoteToSeeResults: ").append(toIndentedString(requireVoteToSeeResults)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("question", "options", "closesAt", "privacy", "requireVoteToSeeResults")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("question", "options")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentPollInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentPollInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentPollInput is not found in the empty JSON string", CommentPollInput.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentPollInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentPollInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentPollInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("question").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `question` to be a primitive type in the JSON string but got `%s`", jsonObj.get("question").toString())); + } + // ensure the required json array is present + if (jsonObj.get("options") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("options").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `options` to be an array in the JSON string but got `%s`", jsonObj.get("options").toString())); + } + if ((jsonObj.get("closesAt") != null && !jsonObj.get("closesAt").isJsonNull()) && !jsonObj.get("closesAt").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `closesAt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("closesAt").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentPollInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentPollInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentPollInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentPollInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentPollInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentPollInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentPollInput + * @throws IOException if the JSON string is invalid with respect to CommentPollInput + */ + public static CommentPollInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentPollInput.class); + } + + /** + * Convert an instance of CommentPollInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentPollOption.java b/client/src/main/java/com/fastcomments/model/CommentPollOption.java new file mode 100644 index 00000000..4bd8a0d1 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentPollOption.java @@ -0,0 +1,264 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentPollOption + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentPollOption { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_LABEL = "label"; + @SerializedName(SERIALIZED_NAME_LABEL) + @javax.annotation.Nonnull + private String label; + + public static final String SERIALIZED_NAME_VOTES = "votes"; + @SerializedName(SERIALIZED_NAME_VOTES) + @javax.annotation.Nonnull + private Integer votes; + + public CommentPollOption() { + } + + public CommentPollOption id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public CommentPollOption label(@javax.annotation.Nonnull String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + */ + @javax.annotation.Nonnull + public String getLabel() { + return label; + } + + public void setLabel(@javax.annotation.Nonnull String label) { + this.label = label; + } + + + public CommentPollOption votes(@javax.annotation.Nonnull Integer votes) { + this.votes = votes; + return this; + } + + /** + * Get votes + * @return votes + */ + @javax.annotation.Nonnull + public Integer getVotes() { + return votes; + } + + public void setVotes(@javax.annotation.Nonnull Integer votes) { + this.votes = votes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentPollOption commentPollOption = (CommentPollOption) o; + return Objects.equals(this.id, commentPollOption.id) && + Objects.equals(this.label, commentPollOption.label) && + Objects.equals(this.votes, commentPollOption.votes); + } + + @Override + public int hashCode() { + return Objects.hash(id, label, votes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentPollOption {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append(" votes: ").append(toIndentedString(votes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("id", "label", "votes")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("id", "label", "votes")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentPollOption + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentPollOption.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentPollOption is not found in the empty JSON string", CommentPollOption.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentPollOption.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentPollOption` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentPollOption.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("label").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentPollOption.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentPollOption' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentPollOption.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentPollOption value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentPollOption read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentPollOption given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentPollOption + * @throws IOException if the JSON string is invalid with respect to CommentPollOption + */ + public static CommentPollOption fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentPollOption.class); + } + + /** + * Convert an instance of CommentPollOption to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentPollOptionInput.java b/client/src/main/java/com/fastcomments/model/CommentPollOptionInput.java new file mode 100644 index 00000000..187b4c7b --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentPollOptionInput.java @@ -0,0 +1,238 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentPollOptionInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentPollOptionInput { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_LABEL = "label"; + @SerializedName(SERIALIZED_NAME_LABEL) + @javax.annotation.Nonnull + private String label; + + public CommentPollOptionInput() { + } + + public CommentPollOptionInput id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public CommentPollOptionInput label(@javax.annotation.Nonnull String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + */ + @javax.annotation.Nonnull + public String getLabel() { + return label; + } + + public void setLabel(@javax.annotation.Nonnull String label) { + this.label = label; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentPollOptionInput commentPollOptionInput = (CommentPollOptionInput) o; + return Objects.equals(this.id, commentPollOptionInput.id) && + Objects.equals(this.label, commentPollOptionInput.label); + } + + @Override + public int hashCode() { + return Objects.hash(id, label); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentPollOptionInput {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("id", "label")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("label")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentPollOptionInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentPollOptionInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentPollOptionInput is not found in the empty JSON string", CommentPollOptionInput.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentPollOptionInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentPollOptionInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentPollOptionInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("label").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentPollOptionInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentPollOptionInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentPollOptionInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentPollOptionInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentPollOptionInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentPollOptionInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentPollOptionInput + * @throws IOException if the JSON string is invalid with respect to CommentPollOptionInput + */ + public static CommentPollOptionInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentPollOptionInput.class); + } + + /** + * Convert an instance of CommentPollOptionInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentPollPatch.java b/client/src/main/java/com/fastcomments/model/CommentPollPatch.java new file mode 100644 index 00000000..915da23c --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentPollPatch.java @@ -0,0 +1,334 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.CommentPollPatchOptionsInner; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentPollPatch + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentPollPatch { + public static final String SERIALIZED_NAME_QUESTION = "question"; + @SerializedName(SERIALIZED_NAME_QUESTION) + @javax.annotation.Nullable + private String question; + + public static final String SERIALIZED_NAME_OPTIONS = "options"; + @SerializedName(SERIALIZED_NAME_OPTIONS) + @javax.annotation.Nullable + private List options; + + public static final String SERIALIZED_NAME_CLOSES_AT = "closesAt"; + @SerializedName(SERIALIZED_NAME_CLOSES_AT) + @javax.annotation.Nullable + private String closesAt; + + public static final String SERIALIZED_NAME_PRIVACY = "privacy"; + @SerializedName(SERIALIZED_NAME_PRIVACY) + @javax.annotation.Nullable + private Integer privacy; + + public static final String SERIALIZED_NAME_REQUIRE_VOTE_TO_SEE_RESULTS = "requireVoteToSeeResults"; + @SerializedName(SERIALIZED_NAME_REQUIRE_VOTE_TO_SEE_RESULTS) + @javax.annotation.Nullable + private Boolean requireVoteToSeeResults; + + public CommentPollPatch() { + } + + public CommentPollPatch question(@javax.annotation.Nullable String question) { + this.question = question; + return this; + } + + /** + * Get question + * @return question + */ + @javax.annotation.Nullable + public String getQuestion() { + return question; + } + + public void setQuestion(@javax.annotation.Nullable String question) { + this.question = question; + } + + + public CommentPollPatch options(@javax.annotation.Nullable List options) { + this.options = options; + return this; + } + + public CommentPollPatch addOptionsItem(CommentPollPatchOptionsInner optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * Get options + * @return options + */ + @javax.annotation.Nullable + public List getOptions() { + return options; + } + + public void setOptions(@javax.annotation.Nullable List options) { + this.options = options; + } + + + public CommentPollPatch closesAt(@javax.annotation.Nullable String closesAt) { + this.closesAt = closesAt; + return this; + } + + /** + * Get closesAt + * @return closesAt + */ + @javax.annotation.Nullable + public String getClosesAt() { + return closesAt; + } + + public void setClosesAt(@javax.annotation.Nullable String closesAt) { + this.closesAt = closesAt; + } + + + public CommentPollPatch privacy(@javax.annotation.Nullable Integer privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get privacy + * @return privacy + */ + @javax.annotation.Nullable + public Integer getPrivacy() { + return privacy; + } + + public void setPrivacy(@javax.annotation.Nullable Integer privacy) { + this.privacy = privacy; + } + + + public CommentPollPatch requireVoteToSeeResults(@javax.annotation.Nullable Boolean requireVoteToSeeResults) { + this.requireVoteToSeeResults = requireVoteToSeeResults; + return this; + } + + /** + * Get requireVoteToSeeResults + * @return requireVoteToSeeResults + */ + @javax.annotation.Nullable + public Boolean getRequireVoteToSeeResults() { + return requireVoteToSeeResults; + } + + public void setRequireVoteToSeeResults(@javax.annotation.Nullable Boolean requireVoteToSeeResults) { + this.requireVoteToSeeResults = requireVoteToSeeResults; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentPollPatch commentPollPatch = (CommentPollPatch) o; + return Objects.equals(this.question, commentPollPatch.question) && + Objects.equals(this.options, commentPollPatch.options) && + Objects.equals(this.closesAt, commentPollPatch.closesAt) && + Objects.equals(this.privacy, commentPollPatch.privacy) && + Objects.equals(this.requireVoteToSeeResults, commentPollPatch.requireVoteToSeeResults); + } + + @Override + public int hashCode() { + return Objects.hash(question, options, closesAt, privacy, requireVoteToSeeResults); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentPollPatch {\n"); + sb.append(" question: ").append(toIndentedString(question)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" closesAt: ").append(toIndentedString(closesAt)).append("\n"); + sb.append(" privacy: ").append(toIndentedString(privacy)).append("\n"); + sb.append(" requireVoteToSeeResults: ").append(toIndentedString(requireVoteToSeeResults)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("question", "options", "closesAt", "privacy", "requireVoteToSeeResults")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentPollPatch + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentPollPatch.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentPollPatch is not found in the empty JSON string", CommentPollPatch.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentPollPatch.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentPollPatch` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("question") != null && !jsonObj.get("question").isJsonNull()) && !jsonObj.get("question").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `question` to be a primitive type in the JSON string but got `%s`", jsonObj.get("question").toString())); + } + if (jsonObj.get("options") != null && !jsonObj.get("options").isJsonNull()) { + JsonArray jsonArrayoptions = jsonObj.getAsJsonArray("options"); + if (jsonArrayoptions != null) { + // ensure the json data is an array + if (!jsonObj.get("options").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `options` to be an array in the JSON string but got `%s`", jsonObj.get("options").toString())); + } + + // validate the optional field `options` (array) + for (int i = 0; i < jsonArrayoptions.size(); i++) { + CommentPollPatchOptionsInner.validateJsonElement(jsonArrayoptions.get(i)); + }; + } + } + if ((jsonObj.get("closesAt") != null && !jsonObj.get("closesAt").isJsonNull()) && !jsonObj.get("closesAt").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `closesAt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("closesAt").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentPollPatch.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentPollPatch' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentPollPatch.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentPollPatch value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentPollPatch read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentPollPatch given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentPollPatch + * @throws IOException if the JSON string is invalid with respect to CommentPollPatch + */ + public static CommentPollPatch fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentPollPatch.class); + } + + /** + * Convert an instance of CommentPollPatch to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentPollPatchOptionsInner.java b/client/src/main/java/com/fastcomments/model/CommentPollPatchOptionsInner.java new file mode 100644 index 00000000..20caedee --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentPollPatchOptionsInner.java @@ -0,0 +1,319 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentPollPatchOptionsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentPollPatchOptionsInner { + public static final String SERIALIZED_NAME_LABEL = "label"; + @SerializedName(SERIALIZED_NAME_LABEL) + @javax.annotation.Nonnull + private String label; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public CommentPollPatchOptionsInner() { + } + + public CommentPollPatchOptionsInner label(@javax.annotation.Nonnull String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + */ + @javax.annotation.Nonnull + public String getLabel() { + return label; + } + + public void setLabel(@javax.annotation.Nonnull String label) { + this.label = label; + } + + + public CommentPollPatchOptionsInner id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CommentPollPatchOptionsInner instance itself + */ + public CommentPollPatchOptionsInner putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentPollPatchOptionsInner commentPollPatchOptionsInner = (CommentPollPatchOptionsInner) o; + return Objects.equals(this.label, commentPollPatchOptionsInner.label) && + Objects.equals(this.id, commentPollPatchOptionsInner.id)&& + Objects.equals(this.additionalProperties, commentPollPatchOptionsInner.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(label, id, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentPollPatchOptionsInner {\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("label", "id")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("label", "id")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentPollPatchOptionsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentPollPatchOptionsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentPollPatchOptionsInner is not found in the empty JSON string", CommentPollPatchOptionsInner.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentPollPatchOptionsInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("label").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); + } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentPollPatchOptionsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentPollPatchOptionsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentPollPatchOptionsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentPollPatchOptionsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CommentPollPatchOptionsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CommentPollPatchOptionsInner instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentPollPatchOptionsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentPollPatchOptionsInner + * @throws IOException if the JSON string is invalid with respect to CommentPollPatchOptionsInner + */ + public static CommentPollPatchOptionsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentPollPatchOptionsInner.class); + } + + /** + * Convert an instance of CommentPollPatchOptionsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentPollPutInput.java b/client/src/main/java/com/fastcomments/model/CommentPollPutInput.java new file mode 100644 index 00000000..994dc603 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentPollPutInput.java @@ -0,0 +1,337 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.CommentPollOptionInput; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentPollPutInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentPollPutInput { + public static final String SERIALIZED_NAME_QUESTION = "question"; + @SerializedName(SERIALIZED_NAME_QUESTION) + @javax.annotation.Nonnull + private String question; + + public static final String SERIALIZED_NAME_OPTIONS = "options"; + @SerializedName(SERIALIZED_NAME_OPTIONS) + @javax.annotation.Nonnull + private List options = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CLOSES_AT = "closesAt"; + @SerializedName(SERIALIZED_NAME_CLOSES_AT) + @javax.annotation.Nullable + private String closesAt; + + public static final String SERIALIZED_NAME_PRIVACY = "privacy"; + @SerializedName(SERIALIZED_NAME_PRIVACY) + @javax.annotation.Nullable + private Integer privacy; + + public static final String SERIALIZED_NAME_REQUIRE_VOTE_TO_SEE_RESULTS = "requireVoteToSeeResults"; + @SerializedName(SERIALIZED_NAME_REQUIRE_VOTE_TO_SEE_RESULTS) + @javax.annotation.Nullable + private Boolean requireVoteToSeeResults; + + public CommentPollPutInput() { + } + + public CommentPollPutInput question(@javax.annotation.Nonnull String question) { + this.question = question; + return this; + } + + /** + * Get question + * @return question + */ + @javax.annotation.Nonnull + public String getQuestion() { + return question; + } + + public void setQuestion(@javax.annotation.Nonnull String question) { + this.question = question; + } + + + public CommentPollPutInput options(@javax.annotation.Nonnull List options) { + this.options = options; + return this; + } + + public CommentPollPutInput addOptionsItem(CommentPollOptionInput optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * Get options + * @return options + */ + @javax.annotation.Nonnull + public List getOptions() { + return options; + } + + public void setOptions(@javax.annotation.Nonnull List options) { + this.options = options; + } + + + public CommentPollPutInput closesAt(@javax.annotation.Nullable String closesAt) { + this.closesAt = closesAt; + return this; + } + + /** + * Get closesAt + * @return closesAt + */ + @javax.annotation.Nullable + public String getClosesAt() { + return closesAt; + } + + public void setClosesAt(@javax.annotation.Nullable String closesAt) { + this.closesAt = closesAt; + } + + + public CommentPollPutInput privacy(@javax.annotation.Nullable Integer privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get privacy + * @return privacy + */ + @javax.annotation.Nullable + public Integer getPrivacy() { + return privacy; + } + + public void setPrivacy(@javax.annotation.Nullable Integer privacy) { + this.privacy = privacy; + } + + + public CommentPollPutInput requireVoteToSeeResults(@javax.annotation.Nullable Boolean requireVoteToSeeResults) { + this.requireVoteToSeeResults = requireVoteToSeeResults; + return this; + } + + /** + * Get requireVoteToSeeResults + * @return requireVoteToSeeResults + */ + @javax.annotation.Nullable + public Boolean getRequireVoteToSeeResults() { + return requireVoteToSeeResults; + } + + public void setRequireVoteToSeeResults(@javax.annotation.Nullable Boolean requireVoteToSeeResults) { + this.requireVoteToSeeResults = requireVoteToSeeResults; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentPollPutInput commentPollPutInput = (CommentPollPutInput) o; + return Objects.equals(this.question, commentPollPutInput.question) && + Objects.equals(this.options, commentPollPutInput.options) && + Objects.equals(this.closesAt, commentPollPutInput.closesAt) && + Objects.equals(this.privacy, commentPollPutInput.privacy) && + Objects.equals(this.requireVoteToSeeResults, commentPollPutInput.requireVoteToSeeResults); + } + + @Override + public int hashCode() { + return Objects.hash(question, options, closesAt, privacy, requireVoteToSeeResults); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentPollPutInput {\n"); + sb.append(" question: ").append(toIndentedString(question)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" closesAt: ").append(toIndentedString(closesAt)).append("\n"); + sb.append(" privacy: ").append(toIndentedString(privacy)).append("\n"); + sb.append(" requireVoteToSeeResults: ").append(toIndentedString(requireVoteToSeeResults)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("question", "options", "closesAt", "privacy", "requireVoteToSeeResults")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("question", "options")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentPollPutInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentPollPutInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentPollPutInput is not found in the empty JSON string", CommentPollPutInput.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentPollPutInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentPollPutInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentPollPutInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("question").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `question` to be a primitive type in the JSON string but got `%s`", jsonObj.get("question").toString())); + } + if (jsonObj.get("options") != null) { + if (!jsonObj.get("options").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `options` to be an array in the JSON string but got `%s`", jsonObj.get("options").toString())); + } + JsonArray jsonArrayoptions = jsonObj.getAsJsonArray("options"); + // validate the required field `options` (array) + for (int i = 0; i < jsonArrayoptions.size(); i++) { + CommentPollOptionInput.validateJsonElement(jsonArrayoptions.get(i)); + } + } + if ((jsonObj.get("closesAt") != null && !jsonObj.get("closesAt").isJsonNull()) && !jsonObj.get("closesAt").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `closesAt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("closesAt").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentPollPutInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentPollPutInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentPollPutInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentPollPutInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentPollPutInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentPollPutInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentPollPutInput + * @throws IOException if the JSON string is invalid with respect to CommentPollPutInput + */ + public static CommentPollPutInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentPollPutInput.class); + } + + /** + * Convert an instance of CommentPollPutInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentTranslation.java b/client/src/main/java/com/fastcomments/model/CommentTranslation.java new file mode 100644 index 00000000..e9c2e561 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentTranslation.java @@ -0,0 +1,323 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentTranslation + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentTranslation { + public static final String SERIALIZED_NAME_COMMENT = "comment"; + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nonnull + private String comment; + + public static final String SERIALIZED_NAME_COMMENT_H_T_M_L = "commentHTML"; + @SerializedName(SERIALIZED_NAME_COMMENT_H_T_M_L) + @javax.annotation.Nonnull + private String commentHTML; + + public static final String SERIALIZED_NAME_SOURCE_LANGUAGE = "sourceLanguage"; + @SerializedName(SERIALIZED_NAME_SOURCE_LANGUAGE) + @javax.annotation.Nonnull + private String sourceLanguage; + + public static final String SERIALIZED_NAME_MODEL = "model"; + @SerializedName(SERIALIZED_NAME_MODEL) + @javax.annotation.Nonnull + private String model; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull + private OffsetDateTime createdAt; + + public CommentTranslation() { + } + + public CommentTranslation comment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + return this; + } + + /** + * Get comment + * @return comment + */ + @javax.annotation.Nonnull + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + } + + + public CommentTranslation commentHTML(@javax.annotation.Nonnull String commentHTML) { + this.commentHTML = commentHTML; + return this; + } + + /** + * Get commentHTML + * @return commentHTML + */ + @javax.annotation.Nonnull + public String getCommentHTML() { + return commentHTML; + } + + public void setCommentHTML(@javax.annotation.Nonnull String commentHTML) { + this.commentHTML = commentHTML; + } + + + public CommentTranslation sourceLanguage(@javax.annotation.Nonnull String sourceLanguage) { + this.sourceLanguage = sourceLanguage; + return this; + } + + /** + * Get sourceLanguage + * @return sourceLanguage + */ + @javax.annotation.Nonnull + public String getSourceLanguage() { + return sourceLanguage; + } + + public void setSourceLanguage(@javax.annotation.Nonnull String sourceLanguage) { + this.sourceLanguage = sourceLanguage; + } + + + public CommentTranslation model(@javax.annotation.Nonnull String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nonnull + public String getModel() { + return model; + } + + public void setModel(@javax.annotation.Nonnull String model) { + this.model = model; + } + + + public CommentTranslation createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentTranslation commentTranslation = (CommentTranslation) o; + return Objects.equals(this.comment, commentTranslation.comment) && + Objects.equals(this.commentHTML, commentTranslation.commentHTML) && + Objects.equals(this.sourceLanguage, commentTranslation.sourceLanguage) && + Objects.equals(this.model, commentTranslation.model) && + Objects.equals(this.createdAt, commentTranslation.createdAt); + } + + @Override + public int hashCode() { + return Objects.hash(comment, commentHTML, sourceLanguage, model, createdAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentTranslation {\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commentHTML: ").append(toIndentedString(commentHTML)).append("\n"); + sb.append(" sourceLanguage: ").append(toIndentedString(sourceLanguage)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("comment", "commentHTML", "sourceLanguage", "model", "createdAt")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("comment", "commentHTML", "sourceLanguage", "model", "createdAt")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentTranslation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentTranslation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentTranslation is not found in the empty JSON string", CommentTranslation.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentTranslation.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentTranslation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentTranslation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); + } + if (!jsonObj.get("commentHTML").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentHTML` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentHTML").toString())); + } + if (!jsonObj.get("sourceLanguage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sourceLanguage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceLanguage").toString())); + } + if (!jsonObj.get("model").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `model` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentTranslation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentTranslation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentTranslation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentTranslation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentTranslation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentTranslation given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentTranslation + * @throws IOException if the JSON string is invalid with respect to CommentTranslation + */ + public static CommentTranslation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentTranslation.class); + } + + /** + * Convert an instance of CommentTranslation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentTranslationMode.java b/client/src/main/java/com/fastcomments/model/CommentTranslationMode.java new file mode 100644 index 00000000..7a8c8958 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentTranslationMode.java @@ -0,0 +1,80 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets CommentTranslationMode + */ +@JsonAdapter(CommentTranslationMode.Adapter.class) +public enum CommentTranslationMode { + + OFF("off"), + + AUTO("auto"), + + MANUAL("manual"); + + private String value; + + CommentTranslationMode(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CommentTranslationMode fromValue(String value) { + for (CommentTranslationMode b : CommentTranslationMode.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CommentTranslationMode enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CommentTranslationMode read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CommentTranslationMode.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CommentTranslationMode.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentTranslationPublic.java b/client/src/main/java/com/fastcomments/model/CommentTranslationPublic.java new file mode 100644 index 00000000..efeabe22 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentTranslationPublic.java @@ -0,0 +1,238 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentTranslationPublic + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentTranslationPublic { + public static final String SERIALIZED_NAME_COMMENT_H_T_M_L = "commentHTML"; + @SerializedName(SERIALIZED_NAME_COMMENT_H_T_M_L) + @javax.annotation.Nonnull + private String commentHTML; + + public static final String SERIALIZED_NAME_SOURCE_LANGUAGE = "sourceLanguage"; + @SerializedName(SERIALIZED_NAME_SOURCE_LANGUAGE) + @javax.annotation.Nonnull + private String sourceLanguage; + + public CommentTranslationPublic() { + } + + public CommentTranslationPublic commentHTML(@javax.annotation.Nonnull String commentHTML) { + this.commentHTML = commentHTML; + return this; + } + + /** + * Get commentHTML + * @return commentHTML + */ + @javax.annotation.Nonnull + public String getCommentHTML() { + return commentHTML; + } + + public void setCommentHTML(@javax.annotation.Nonnull String commentHTML) { + this.commentHTML = commentHTML; + } + + + public CommentTranslationPublic sourceLanguage(@javax.annotation.Nonnull String sourceLanguage) { + this.sourceLanguage = sourceLanguage; + return this; + } + + /** + * Get sourceLanguage + * @return sourceLanguage + */ + @javax.annotation.Nonnull + public String getSourceLanguage() { + return sourceLanguage; + } + + public void setSourceLanguage(@javax.annotation.Nonnull String sourceLanguage) { + this.sourceLanguage = sourceLanguage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentTranslationPublic commentTranslationPublic = (CommentTranslationPublic) o; + return Objects.equals(this.commentHTML, commentTranslationPublic.commentHTML) && + Objects.equals(this.sourceLanguage, commentTranslationPublic.sourceLanguage); + } + + @Override + public int hashCode() { + return Objects.hash(commentHTML, sourceLanguage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentTranslationPublic {\n"); + sb.append(" commentHTML: ").append(toIndentedString(commentHTML)).append("\n"); + sb.append(" sourceLanguage: ").append(toIndentedString(sourceLanguage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("commentHTML", "sourceLanguage")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("commentHTML", "sourceLanguage")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentTranslationPublic + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentTranslationPublic.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentTranslationPublic is not found in the empty JSON string", CommentTranslationPublic.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentTranslationPublic.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentTranslationPublic` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentTranslationPublic.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("commentHTML").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentHTML` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentHTML").toString())); + } + if (!jsonObj.get("sourceLanguage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sourceLanguage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceLanguage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentTranslationPublic.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentTranslationPublic' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentTranslationPublic.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentTranslationPublic value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentTranslationPublic read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentTranslationPublic given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentTranslationPublic + * @throws IOException if the JSON string is invalid with respect to CommentTranslationPublic + */ + public static CommentTranslationPublic fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentTranslationPublic.class); + } + + /** + * Convert an instance of CommentTranslationPublic to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentTranslationsRequest.java b/client/src/main/java/com/fastcomments/model/CommentTranslationsRequest.java new file mode 100644 index 00000000..0cdb4486 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentTranslationsRequest.java @@ -0,0 +1,222 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentTranslationsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentTranslationsRequest { + public static final String SERIALIZED_NAME_COMMENT_IDS = "commentIds"; + @SerializedName(SERIALIZED_NAME_COMMENT_IDS) + @javax.annotation.Nonnull + private List commentIds = new ArrayList<>(); + + public CommentTranslationsRequest() { + } + + public CommentTranslationsRequest commentIds(@javax.annotation.Nonnull List commentIds) { + this.commentIds = commentIds; + return this; + } + + public CommentTranslationsRequest addCommentIdsItem(String commentIdsItem) { + if (this.commentIds == null) { + this.commentIds = new ArrayList<>(); + } + this.commentIds.add(commentIdsItem); + return this; + } + + /** + * Get commentIds + * @return commentIds + */ + @javax.annotation.Nonnull + public List getCommentIds() { + return commentIds; + } + + public void setCommentIds(@javax.annotation.Nonnull List commentIds) { + this.commentIds = commentIds; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentTranslationsRequest commentTranslationsRequest = (CommentTranslationsRequest) o; + return Objects.equals(this.commentIds, commentTranslationsRequest.commentIds); + } + + @Override + public int hashCode() { + return Objects.hash(commentIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentTranslationsRequest {\n"); + sb.append(" commentIds: ").append(toIndentedString(commentIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("commentIds")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("commentIds")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentTranslationsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentTranslationsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentTranslationsRequest is not found in the empty JSON string", CommentTranslationsRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentTranslationsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentTranslationsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentTranslationsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("commentIds") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("commentIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentIds` to be an array in the JSON string but got `%s`", jsonObj.get("commentIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentTranslationsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentTranslationsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentTranslationsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentTranslationsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentTranslationsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentTranslationsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentTranslationsRequest + * @throws IOException if the JSON string is invalid with respect to CommentTranslationsRequest + */ + public static CommentTranslationsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentTranslationsRequest.class); + } + + /** + * Convert an instance of CommentTranslationsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CommentTranslationsResponse.java b/client/src/main/java/com/fastcomments/model/CommentTranslationsResponse.java new file mode 100644 index 00000000..5dd98aae --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CommentTranslationsResponse.java @@ -0,0 +1,317 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentTranslationPublic; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CommentTranslationsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CommentTranslationsResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_LOCALE = "locale"; + @SerializedName(SERIALIZED_NAME_LOCALE) + @javax.annotation.Nonnull + private String locale; + + public static final String SERIALIZED_NAME_TRANSLATIONS = "translations"; + @SerializedName(SERIALIZED_NAME_TRANSLATIONS) + @javax.annotation.Nonnull + private Map translations = new HashMap<>(); + + public static final String SERIALIZED_NAME_FAILED = "failed"; + @SerializedName(SERIALIZED_NAME_FAILED) + @javax.annotation.Nonnull + private List failed = new ArrayList<>(); + + public CommentTranslationsResponse() { + } + + public CommentTranslationsResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public CommentTranslationsResponse locale(@javax.annotation.Nonnull String locale) { + this.locale = locale; + return this; + } + + /** + * Get locale + * @return locale + */ + @javax.annotation.Nonnull + public String getLocale() { + return locale; + } + + public void setLocale(@javax.annotation.Nonnull String locale) { + this.locale = locale; + } + + + public CommentTranslationsResponse translations(@javax.annotation.Nonnull Map translations) { + this.translations = translations; + return this; + } + + public CommentTranslationsResponse putTranslationsItem(String key, CommentTranslationPublic translationsItem) { + if (this.translations == null) { + this.translations = new HashMap<>(); + } + this.translations.put(key, translationsItem); + return this; + } + + /** + * Construct a type with a set of properties K of type T + * @return translations + */ + @javax.annotation.Nonnull + public Map getTranslations() { + return translations; + } + + public void setTranslations(@javax.annotation.Nonnull Map translations) { + this.translations = translations; + } + + + public CommentTranslationsResponse failed(@javax.annotation.Nonnull List failed) { + this.failed = failed; + return this; + } + + public CommentTranslationsResponse addFailedItem(String failedItem) { + if (this.failed == null) { + this.failed = new ArrayList<>(); + } + this.failed.add(failedItem); + return this; + } + + /** + * Comment ids that failed transiently and may be retried. + * @return failed + */ + @javax.annotation.Nonnull + public List getFailed() { + return failed; + } + + public void setFailed(@javax.annotation.Nonnull List failed) { + this.failed = failed; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentTranslationsResponse commentTranslationsResponse = (CommentTranslationsResponse) o; + return Objects.equals(this.status, commentTranslationsResponse.status) && + Objects.equals(this.locale, commentTranslationsResponse.locale) && + Objects.equals(this.translations, commentTranslationsResponse.translations) && + Objects.equals(this.failed, commentTranslationsResponse.failed); + } + + @Override + public int hashCode() { + return Objects.hash(status, locale, translations, failed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentTranslationsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); + sb.append(" translations: ").append(toIndentedString(translations)).append("\n"); + sb.append(" failed: ").append(toIndentedString(failed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "locale", "translations", "failed")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "locale", "translations", "failed")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommentTranslationsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommentTranslationsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CommentTranslationsResponse is not found in the empty JSON string", CommentTranslationsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommentTranslationsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CommentTranslationsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommentTranslationsResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + if (!jsonObj.get("locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locale").toString())); + } + // ensure the required json array is present + if (jsonObj.get("failed") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("failed").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `failed` to be an array in the JSON string but got `%s`", jsonObj.get("failed").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommentTranslationsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommentTranslationsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommentTranslationsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommentTranslationsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommentTranslationsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommentTranslationsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommentTranslationsResponse + * @throws IOException if the JSON string is invalid with respect to CommentTranslationsResponse + */ + public static CommentTranslationsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommentTranslationsResponse.class); + } + + /** + * Convert an instance of CommentTranslationsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CreateAgentTenantBody.java b/client/src/main/java/com/fastcomments/model/CreateAgentTenantBody.java new file mode 100644 index 00000000..a4c2717b --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CreateAgentTenantBody.java @@ -0,0 +1,271 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CreateAgentTenantBody + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CreateAgentTenantBody { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DOMAINS = "domains"; + @SerializedName(SERIALIZED_NAME_DOMAINS) + @javax.annotation.Nullable + private List domains = new ArrayList<>(); + + public static final String SERIALIZED_NAME_AGENT = "agent"; + @SerializedName(SERIALIZED_NAME_AGENT) + @javax.annotation.Nullable + private String agent; + + public CreateAgentTenantBody() { + } + + public CreateAgentTenantBody name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Display name for the account. Defaults to the first domain. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public CreateAgentTenantBody domains(@javax.annotation.Nullable List domains) { + this.domains = domains; + return this; + } + + public CreateAgentTenantBody addDomainsItem(String domainsItem) { + if (this.domains == null) { + this.domains = new ArrayList<>(); + } + this.domains.add(domainsItem); + return this; + } + + /** + * Domains the comment widget will be embedded on, e.g. [\"example.com\"]. At most 5. + * @return domains + */ + @javax.annotation.Nullable + public List getDomains() { + return domains; + } + + public void setDomains(@javax.annotation.Nullable List domains) { + this.domains = domains; + } + + + public CreateAgentTenantBody agent(@javax.annotation.Nullable String agent) { + this.agent = agent; + return this; + } + + /** + * Free-form identifier of the agent making the request, e.g. \"claude-code\". + * @return agent + */ + @javax.annotation.Nullable + public String getAgent() { + return agent; + } + + public void setAgent(@javax.annotation.Nullable String agent) { + this.agent = agent; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAgentTenantBody createAgentTenantBody = (CreateAgentTenantBody) o; + return Objects.equals(this.name, createAgentTenantBody.name) && + Objects.equals(this.domains, createAgentTenantBody.domains) && + Objects.equals(this.agent, createAgentTenantBody.agent); + } + + @Override + public int hashCode() { + return Objects.hash(name, domains, agent); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAgentTenantBody {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" domains: ").append(toIndentedString(domains)).append("\n"); + sb.append(" agent: ").append(toIndentedString(agent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("name", "domains", "agent")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateAgentTenantBody + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateAgentTenantBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateAgentTenantBody is not found in the empty JSON string", CreateAgentTenantBody.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateAgentTenantBody.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateAgentTenantBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("domains") != null && !jsonObj.get("domains").isJsonNull() && !jsonObj.get("domains").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `domains` to be an array in the JSON string but got `%s`", jsonObj.get("domains").toString())); + } + if ((jsonObj.get("agent") != null && !jsonObj.get("agent").isJsonNull()) && !jsonObj.get("agent").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `agent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agent").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAgentTenantBody.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAgentTenantBody' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAgentTenantBody.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAgentTenantBody value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateAgentTenantBody read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAgentTenantBody given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAgentTenantBody + * @throws IOException if the JSON string is invalid with respect to CreateAgentTenantBody + */ + public static CreateAgentTenantBody fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAgentTenantBody.class); + } + + /** + * Convert an instance of CreateAgentTenantBody to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CreateAgentTenantResponse.java b/client/src/main/java/com/fastcomments/model/CreateAgentTenantResponse.java new file mode 100644 index 00000000..f4448e35 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CreateAgentTenantResponse.java @@ -0,0 +1,383 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CreateAgentTenantResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CreateAgentTenantResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenantId"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + @javax.annotation.Nonnull + private String tenantId; + + public static final String SERIALIZED_NAME_API_KEY = "apiKey"; + @SerializedName(SERIALIZED_NAME_API_KEY) + @javax.annotation.Nonnull + private String apiKey; + + public static final String SERIALIZED_NAME_CLAIM_URL = "claimUrl"; + @SerializedName(SERIALIZED_NAME_CLAIM_URL) + @javax.annotation.Nonnull + private String claimUrl; + + public static final String SERIALIZED_NAME_EXPIRES_AT = "expiresAt"; + @SerializedName(SERIALIZED_NAME_EXPIRES_AT) + @javax.annotation.Nonnull + private String expiresAt; + + public static final String SERIALIZED_NAME_API_BASE_URL = "apiBaseUrl"; + @SerializedName(SERIALIZED_NAME_API_BASE_URL) + @javax.annotation.Nonnull + private String apiBaseUrl; + + public static final String SERIALIZED_NAME_MCP_URL = "mcpUrl"; + @SerializedName(SERIALIZED_NAME_MCP_URL) + @javax.annotation.Nonnull + private String mcpUrl; + + public CreateAgentTenantResponse() { + } + + public CreateAgentTenantResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public CreateAgentTenantResponse tenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Pass as tenantId on every API and MCP call. + * @return tenantId + */ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + public void setTenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + + public CreateAgentTenantResponse apiKey(@javax.annotation.Nonnull String apiKey) { + this.apiKey = apiKey; + return this; + } + + /** + * Full-access key for this tenant. Works immediately. Keep it secret. + * @return apiKey + */ + @javax.annotation.Nonnull + public String getApiKey() { + return apiKey; + } + + public void setApiKey(@javax.annotation.Nonnull String apiKey) { + this.apiKey = apiKey; + } + + + public CreateAgentTenantResponse claimUrl(@javax.annotation.Nonnull String claimUrl) { + this.claimUrl = claimUrl; + return this; + } + + /** + * Give this to the human. Opening it while logged in attaches the tenant to their account. + * @return claimUrl + */ + @javax.annotation.Nonnull + public String getClaimUrl() { + return claimUrl; + } + + public void setClaimUrl(@javax.annotation.Nonnull String claimUrl) { + this.claimUrl = claimUrl; + } + + + public CreateAgentTenantResponse expiresAt(@javax.annotation.Nonnull String expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * ISO date. The tenant and its key are deleted at this time unless claimed. + * @return expiresAt + */ + @javax.annotation.Nonnull + public String getExpiresAt() { + return expiresAt; + } + + public void setExpiresAt(@javax.annotation.Nonnull String expiresAt) { + this.expiresAt = expiresAt; + } + + + public CreateAgentTenantResponse apiBaseUrl(@javax.annotation.Nonnull String apiBaseUrl) { + this.apiBaseUrl = apiBaseUrl; + return this; + } + + /** + * Get apiBaseUrl + * @return apiBaseUrl + */ + @javax.annotation.Nonnull + public String getApiBaseUrl() { + return apiBaseUrl; + } + + public void setApiBaseUrl(@javax.annotation.Nonnull String apiBaseUrl) { + this.apiBaseUrl = apiBaseUrl; + } + + + public CreateAgentTenantResponse mcpUrl(@javax.annotation.Nonnull String mcpUrl) { + this.mcpUrl = mcpUrl; + return this; + } + + /** + * Get mcpUrl + * @return mcpUrl + */ + @javax.annotation.Nonnull + public String getMcpUrl() { + return mcpUrl; + } + + public void setMcpUrl(@javax.annotation.Nonnull String mcpUrl) { + this.mcpUrl = mcpUrl; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAgentTenantResponse createAgentTenantResponse = (CreateAgentTenantResponse) o; + return Objects.equals(this.status, createAgentTenantResponse.status) && + Objects.equals(this.tenantId, createAgentTenantResponse.tenantId) && + Objects.equals(this.apiKey, createAgentTenantResponse.apiKey) && + Objects.equals(this.claimUrl, createAgentTenantResponse.claimUrl) && + Objects.equals(this.expiresAt, createAgentTenantResponse.expiresAt) && + Objects.equals(this.apiBaseUrl, createAgentTenantResponse.apiBaseUrl) && + Objects.equals(this.mcpUrl, createAgentTenantResponse.mcpUrl); + } + + @Override + public int hashCode() { + return Objects.hash(status, tenantId, apiKey, claimUrl, expiresAt, apiBaseUrl, mcpUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAgentTenantResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); + sb.append(" claimUrl: ").append(toIndentedString(claimUrl)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" apiBaseUrl: ").append(toIndentedString(apiBaseUrl)).append("\n"); + sb.append(" mcpUrl: ").append(toIndentedString(mcpUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "tenantId", "apiKey", "claimUrl", "expiresAt", "apiBaseUrl", "mcpUrl")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "tenantId", "apiKey", "claimUrl", "expiresAt", "apiBaseUrl", "mcpUrl")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateAgentTenantResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateAgentTenantResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateAgentTenantResponse is not found in the empty JSON string", CreateAgentTenantResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateAgentTenantResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateAgentTenantResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateAgentTenantResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + if (!jsonObj.get("tenantId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tenantId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenantId").toString())); + } + if (!jsonObj.get("apiKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `apiKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiKey").toString())); + } + if (!jsonObj.get("claimUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `claimUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("claimUrl").toString())); + } + if (!jsonObj.get("expiresAt").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `expiresAt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expiresAt").toString())); + } + if (!jsonObj.get("apiBaseUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `apiBaseUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiBaseUrl").toString())); + } + if (!jsonObj.get("mcpUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mcpUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mcpUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAgentTenantResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAgentTenantResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAgentTenantResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAgentTenantResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateAgentTenantResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAgentTenantResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAgentTenantResponse + * @throws IOException if the JSON string is invalid with respect to CreateAgentTenantResponse + */ + public static CreateAgentTenantResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAgentTenantResponse.class); + } + + /** + * Convert an instance of CreateAgentTenantResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CreateCommentParams.java b/client/src/main/java/com/fastcomments/model/CreateCommentParams.java index dc3fdaa0..cb73d04b 100644 --- a/client/src/main/java/com/fastcomments/model/CreateCommentParams.java +++ b/client/src/main/java/com/fastcomments/model/CreateCommentParams.java @@ -14,9 +14,10 @@ package com.fastcomments.model; import java.util.Objects; +import com.fastcomments.model.CommentPollInput; import com.fastcomments.model.CommentUserHashTagInfo; import com.fastcomments.model.CommentUserMentionInfo; -import com.fastcomments.model.GifSearchResponseImagesInnerInner; +import com.fastcomments.model.RecordStringStringOrNumberOrNumberArrayValue; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -175,7 +176,12 @@ public class CreateCommentParams { public static final String SERIALIZED_NAME_QUESTION_VALUES = "questionValues"; @SerializedName(SERIALIZED_NAME_QUESTION_VALUES) @javax.annotation.Nullable - private Map questionValues = new HashMap<>(); + private Map questionValues = new HashMap<>(); + + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nullable + private CommentPollInput poll; public static final String SERIALIZED_NAME_TOS = "tos"; @SerializedName(SERIALIZED_NAME_TOS) @@ -709,12 +715,12 @@ public void setFeedbackIds(@javax.annotation.Nullable List feedbackIds) } - public CreateCommentParams questionValues(@javax.annotation.Nullable Map questionValues) { + public CreateCommentParams questionValues(@javax.annotation.Nullable Map questionValues) { this.questionValues = questionValues; return this; } - public CreateCommentParams putQuestionValuesItem(String key, GifSearchResponseImagesInnerInner questionValuesItem) { + public CreateCommentParams putQuestionValuesItem(String key, RecordStringStringOrNumberOrNumberArrayValue questionValuesItem) { if (this.questionValues == null) { this.questionValues = new HashMap<>(); } @@ -727,15 +733,34 @@ public CreateCommentParams putQuestionValuesItem(String key, GifSearchResponseIm * @return questionValues */ @javax.annotation.Nullable - public Map getQuestionValues() { + public Map getQuestionValues() { return questionValues; } - public void setQuestionValues(@javax.annotation.Nullable Map questionValues) { + public void setQuestionValues(@javax.annotation.Nullable Map questionValues) { this.questionValues = questionValues; } + public CreateCommentParams poll(@javax.annotation.Nullable CommentPollInput poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nullable + public CommentPollInput getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nullable CommentPollInput poll) { + this.poll = poll; + } + + public CreateCommentParams tos(@javax.annotation.Nullable Boolean tos) { this.tos = tos; return this; @@ -998,6 +1023,7 @@ public boolean equals(Object o) { Objects.equals(this.autoplayDelayMS, createCommentParams.autoplayDelayMS) && Objects.equals(this.feedbackIds, createCommentParams.feedbackIds) && Objects.equals(this.questionValues, createCommentParams.questionValues) && + Objects.equals(this.poll, createCommentParams.poll) && Objects.equals(this.tos, createCommentParams.tos) && Objects.equals(this.botId, createCommentParams.botId) && Objects.equals(this.approved, createCommentParams.approved) && @@ -1014,7 +1040,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(date, localDateString, localDateHours, commenterName, commenterEmail, commenterLink, comment, productId, userId, avatarSrc, parentId, mentions, hashTags, pageTitle, isFromMyAccountPage, url, urlId, meta, moderationGroupIds, rating, fromOfflineRestore, autoplayDelayMS, feedbackIds, questionValues, tos, botId, approved, domain, ip, isPinned, locale, reviewed, verified, votes, votesDown, votesUp); + return Objects.hash(date, localDateString, localDateHours, commenterName, commenterEmail, commenterLink, comment, productId, userId, avatarSrc, parentId, mentions, hashTags, pageTitle, isFromMyAccountPage, url, urlId, meta, moderationGroupIds, rating, fromOfflineRestore, autoplayDelayMS, feedbackIds, questionValues, poll, tos, botId, approved, domain, ip, isPinned, locale, reviewed, verified, votes, votesDown, votesUp); } @Override @@ -1045,6 +1071,7 @@ public String toString() { sb.append(" autoplayDelayMS: ").append(toIndentedString(autoplayDelayMS)).append("\n"); sb.append(" feedbackIds: ").append(toIndentedString(feedbackIds)).append("\n"); sb.append(" questionValues: ").append(toIndentedString(questionValues)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); sb.append(" tos: ").append(toIndentedString(tos)).append("\n"); sb.append(" botId: ").append(toIndentedString(botId)).append("\n"); sb.append(" approved: ").append(toIndentedString(approved)).append("\n"); @@ -1075,7 +1102,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("date", "localDateString", "localDateHours", "commenterName", "commenterEmail", "commenterLink", "comment", "productId", "userId", "avatarSrc", "parentId", "mentions", "hashTags", "pageTitle", "isFromMyAccountPage", "url", "urlId", "meta", "moderationGroupIds", "rating", "fromOfflineRestore", "autoplayDelayMS", "feedbackIds", "questionValues", "tos", "botId", "approved", "domain", "ip", "isPinned", "locale", "reviewed", "verified", "votes", "votesDown", "votesUp")); + openapiFields = new HashSet(Arrays.asList("date", "localDateString", "localDateHours", "commenterName", "commenterEmail", "commenterLink", "comment", "productId", "userId", "avatarSrc", "parentId", "mentions", "hashTags", "pageTitle", "isFromMyAccountPage", "url", "urlId", "meta", "moderationGroupIds", "rating", "fromOfflineRestore", "autoplayDelayMS", "feedbackIds", "questionValues", "poll", "tos", "botId", "approved", "domain", "ip", "isPinned", "locale", "reviewed", "verified", "votes", "votesDown", "votesUp")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("commenterName", "comment", "url", "urlId", "locale")); @@ -1178,6 +1205,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("feedbackIds") != null && !jsonObj.get("feedbackIds").isJsonNull() && !jsonObj.get("feedbackIds").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `feedbackIds` to be an array in the JSON string but got `%s`", jsonObj.get("feedbackIds").toString())); } + // validate the optional field `poll` + if (jsonObj.get("poll") != null && !jsonObj.get("poll").isJsonNull()) { + CommentPollInput.validateJsonElement(jsonObj.get("poll")); + } if ((jsonObj.get("botId") != null && !jsonObj.get("botId").isJsonNull()) && !jsonObj.get("botId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `botId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("botId").toString())); } diff --git a/client/src/main/java/com/fastcomments/model/CreatePollVoteBody.java b/client/src/main/java/com/fastcomments/model/CreatePollVoteBody.java new file mode 100644 index 00000000..59972a73 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CreatePollVoteBody.java @@ -0,0 +1,325 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CreatePollVoteBody + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CreatePollVoteBody { + public static final String SERIALIZED_NAME_COMMENT_ID = "commentId"; + @SerializedName(SERIALIZED_NAME_COMMENT_ID) + @javax.annotation.Nonnull + private String commentId; + + public static final String SERIALIZED_NAME_OPTION_ID = "optionId"; + @SerializedName(SERIALIZED_NAME_OPTION_ID) + @javax.annotation.Nonnull + private String optionId; + + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nullable + private String userId; + + public static final String SERIALIZED_NAME_ANON_USER_ID = "anonUserId"; + @SerializedName(SERIALIZED_NAME_ANON_USER_ID) + @javax.annotation.Nullable + private String anonUserId; + + public static final String SERIALIZED_NAME_IP = "ip"; + @SerializedName(SERIALIZED_NAME_IP) + @javax.annotation.Nullable + private String ip; + + public CreatePollVoteBody() { + } + + public CreatePollVoteBody commentId(@javax.annotation.Nonnull String commentId) { + this.commentId = commentId; + return this; + } + + /** + * Get commentId + * @return commentId + */ + @javax.annotation.Nonnull + public String getCommentId() { + return commentId; + } + + public void setCommentId(@javax.annotation.Nonnull String commentId) { + this.commentId = commentId; + } + + + public CreatePollVoteBody optionId(@javax.annotation.Nonnull String optionId) { + this.optionId = optionId; + return this; + } + + /** + * Get optionId + * @return optionId + */ + @javax.annotation.Nonnull + public String getOptionId() { + return optionId; + } + + public void setOptionId(@javax.annotation.Nonnull String optionId) { + this.optionId = optionId; + } + + + public CreatePollVoteBody userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nullable + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nullable String userId) { + this.userId = userId; + } + + + public CreatePollVoteBody anonUserId(@javax.annotation.Nullable String anonUserId) { + this.anonUserId = anonUserId; + return this; + } + + /** + * Get anonUserId + * @return anonUserId + */ + @javax.annotation.Nullable + public String getAnonUserId() { + return anonUserId; + } + + public void setAnonUserId(@javax.annotation.Nullable String anonUserId) { + this.anonUserId = anonUserId; + } + + + public CreatePollVoteBody ip(@javax.annotation.Nullable String ip) { + this.ip = ip; + return this; + } + + /** + * Get ip + * @return ip + */ + @javax.annotation.Nullable + public String getIp() { + return ip; + } + + public void setIp(@javax.annotation.Nullable String ip) { + this.ip = ip; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePollVoteBody createPollVoteBody = (CreatePollVoteBody) o; + return Objects.equals(this.commentId, createPollVoteBody.commentId) && + Objects.equals(this.optionId, createPollVoteBody.optionId) && + Objects.equals(this.userId, createPollVoteBody.userId) && + Objects.equals(this.anonUserId, createPollVoteBody.anonUserId) && + Objects.equals(this.ip, createPollVoteBody.ip); + } + + @Override + public int hashCode() { + return Objects.hash(commentId, optionId, userId, anonUserId, ip); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePollVoteBody {\n"); + sb.append(" commentId: ").append(toIndentedString(commentId)).append("\n"); + sb.append(" optionId: ").append(toIndentedString(optionId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" anonUserId: ").append(toIndentedString(anonUserId)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("commentId", "optionId", "userId", "anonUserId", "ip")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("commentId", "optionId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreatePollVoteBody + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreatePollVoteBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreatePollVoteBody is not found in the empty JSON string", CreatePollVoteBody.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreatePollVoteBody.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreatePollVoteBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreatePollVoteBody.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("commentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentId").toString())); + } + if (!jsonObj.get("optionId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `optionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("optionId").toString())); + } + if ((jsonObj.get("userId") != null && !jsonObj.get("userId").isJsonNull()) && !jsonObj.get("userId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + if ((jsonObj.get("anonUserId") != null && !jsonObj.get("anonUserId").isJsonNull()) && !jsonObj.get("anonUserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `anonUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("anonUserId").toString())); + } + if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreatePollVoteBody.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreatePollVoteBody' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreatePollVoteBody.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreatePollVoteBody value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreatePollVoteBody read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreatePollVoteBody given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreatePollVoteBody + * @throws IOException if the JSON string is invalid with respect to CreatePollVoteBody + */ + public static CreatePollVoteBody fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreatePollVoteBody.class); + } + + /** + * Convert an instance of CreatePollVoteBody to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CreatePollVoteResponse.java b/client/src/main/java/com/fastcomments/model/CreatePollVoteResponse.java new file mode 100644 index 00000000..6c763eb1 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CreatePollVoteResponse.java @@ -0,0 +1,267 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentPoll; +import com.fastcomments.model.PublicPollVote; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CreatePollVoteResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CreatePollVoteResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_POLL_VOTE = "pollVote"; + @SerializedName(SERIALIZED_NAME_POLL_VOTE) + @javax.annotation.Nonnull + private PublicPollVote pollVote; + + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nonnull + private CommentPoll poll; + + public CreatePollVoteResponse() { + } + + public CreatePollVoteResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public CreatePollVoteResponse pollVote(@javax.annotation.Nonnull PublicPollVote pollVote) { + this.pollVote = pollVote; + return this; + } + + /** + * Get pollVote + * @return pollVote + */ + @javax.annotation.Nonnull + public PublicPollVote getPollVote() { + return pollVote; + } + + public void setPollVote(@javax.annotation.Nonnull PublicPollVote pollVote) { + this.pollVote = pollVote; + } + + + public CreatePollVoteResponse poll(@javax.annotation.Nonnull CommentPoll poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nonnull + public CommentPoll getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nonnull CommentPoll poll) { + this.poll = poll; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePollVoteResponse createPollVoteResponse = (CreatePollVoteResponse) o; + return Objects.equals(this.status, createPollVoteResponse.status) && + Objects.equals(this.pollVote, createPollVoteResponse.pollVote) && + Objects.equals(this.poll, createPollVoteResponse.poll); + } + + @Override + public int hashCode() { + return Objects.hash(status, pollVote, poll); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePollVoteResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" pollVote: ").append(toIndentedString(pollVote)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "pollVote", "poll")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "pollVote", "poll")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreatePollVoteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreatePollVoteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreatePollVoteResponse is not found in the empty JSON string", CreatePollVoteResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreatePollVoteResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreatePollVoteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreatePollVoteResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + // validate the required field `pollVote` + PublicPollVote.validateJsonElement(jsonObj.get("pollVote")); + // validate the required field `poll` + CommentPoll.validateJsonElement(jsonObj.get("poll")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreatePollVoteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreatePollVoteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreatePollVoteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreatePollVoteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreatePollVoteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreatePollVoteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreatePollVoteResponse + * @throws IOException if the JSON string is invalid with respect to CreatePollVoteResponse + */ + public static CreatePollVoteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreatePollVoteResponse.class); + } + + /** + * Convert an instance of CreatePollVoteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CreateQuestionConfigBody.java b/client/src/main/java/com/fastcomments/model/CreateQuestionConfigBody.java index 2d1530ee..549623d0 100644 --- a/client/src/main/java/com/fastcomments/model/CreateQuestionConfigBody.java +++ b/client/src/main/java/com/fastcomments/model/CreateQuestionConfigBody.java @@ -14,7 +14,9 @@ package com.fastcomments.model; import java.util.Objects; +import com.fastcomments.model.QuestionCondition; import com.fastcomments.model.QuestionConfigCustomOptionsInner; +import com.fastcomments.model.SubQuestionCondition; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -118,6 +120,21 @@ public class CreateQuestionConfigBody { @javax.annotation.Nullable private Boolean alwaysShowSubQuestions; + public static final String SERIALIZED_NAME_SUB_QUESTION_CONDITIONS = "subQuestionConditions"; + @SerializedName(SERIALIZED_NAME_SUB_QUESTION_CONDITIONS) + @javax.annotation.Nullable + private List subQuestionConditions = new ArrayList<>(); + + public static final String SERIALIZED_NAME_COMMENT_BOX_CONDITION = "commentBoxCondition"; + @SerializedName(SERIALIZED_NAME_COMMENT_BOX_CONDITION) + @javax.annotation.Nullable + private QuestionCondition commentBoxCondition; + + public static final String SERIALIZED_NAME_COMMENT_BOX_PROMPT = "commentBoxPrompt"; + @SerializedName(SERIALIZED_NAME_COMMENT_BOX_PROMPT) + @javax.annotation.Nullable + private String commentBoxPrompt; + public static final String SERIALIZED_NAME_REPORTING_ORDER = "reportingOrder"; @SerializedName(SERIALIZED_NAME_REPORTING_ORDER) @javax.annotation.Nonnull @@ -189,7 +206,7 @@ public CreateQuestionConfigBody type(@javax.annotation.Nonnull String type) { } /** - * Get type + * One of nps, slider, star, thumbs, choice, multi, emoji, scale. choice, multi, emoji and scale take their labels from customOptions (choice/multi 2-20 options, emoji/scale 3-7). * @return type */ @javax.annotation.Nonnull @@ -389,6 +406,71 @@ public void setAlwaysShowSubQuestions(@javax.annotation.Nullable Boolean alwaysS } + public CreateQuestionConfigBody subQuestionConditions(@javax.annotation.Nullable List subQuestionConditions) { + this.subQuestionConditions = subQuestionConditions; + return this; + } + + public CreateQuestionConfigBody addSubQuestionConditionsItem(SubQuestionCondition subQuestionConditionsItem) { + if (this.subQuestionConditions == null) { + this.subQuestionConditions = new ArrayList<>(); + } + this.subQuestionConditions.add(subQuestionConditionsItem); + return this; + } + + /** + * Show a sub-question only when this question's answer matches its rule. + * @return subQuestionConditions + */ + @javax.annotation.Nullable + public List getSubQuestionConditions() { + return subQuestionConditions; + } + + public void setSubQuestionConditions(@javax.annotation.Nullable List subQuestionConditions) { + this.subQuestionConditions = subQuestionConditions; + } + + + public CreateQuestionConfigBody commentBoxCondition(@javax.annotation.Nullable QuestionCondition commentBoxCondition) { + this.commentBoxCondition = commentBoxCondition; + return this; + } + + /** + * Get commentBoxCondition + * @return commentBoxCondition + */ + @javax.annotation.Nullable + public QuestionCondition getCommentBoxCondition() { + return commentBoxCondition; + } + + public void setCommentBoxCondition(@javax.annotation.Nullable QuestionCondition commentBoxCondition) { + this.commentBoxCondition = commentBoxCondition; + } + + + public CreateQuestionConfigBody commentBoxPrompt(@javax.annotation.Nullable String commentBoxPrompt) { + this.commentBoxPrompt = commentBoxPrompt; + return this; + } + + /** + * Comment box placeholder when commentBoxCondition reveals it. + * @return commentBoxPrompt + */ + @javax.annotation.Nullable + public String getCommentBoxPrompt() { + return commentBoxPrompt; + } + + public void setCommentBoxPrompt(@javax.annotation.Nullable String commentBoxPrompt) { + this.commentBoxPrompt = commentBoxPrompt; + } + + public CreateQuestionConfigBody reportingOrder(@javax.annotation.Nonnull Double reportingOrder) { this.reportingOrder = reportingOrder; return this; @@ -475,13 +557,16 @@ public boolean equals(Object o) { Objects.equals(this.customOptions, createQuestionConfigBody.customOptions) && Objects.equals(this.subQuestionIds, createQuestionConfigBody.subQuestionIds) && Objects.equals(this.alwaysShowSubQuestions, createQuestionConfigBody.alwaysShowSubQuestions) && + Objects.equals(this.subQuestionConditions, createQuestionConfigBody.subQuestionConditions) && + Objects.equals(this.commentBoxCondition, createQuestionConfigBody.commentBoxCondition) && + Objects.equals(this.commentBoxPrompt, createQuestionConfigBody.commentBoxPrompt) && Objects.equals(this.reportingOrder, createQuestionConfigBody.reportingOrder)&& Objects.equals(this.additionalProperties, createQuestionConfigBody.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, question, helpText, type, numStars, min, max, defaultValue, labelNegative, labelPositive, customOptions, subQuestionIds, alwaysShowSubQuestions, reportingOrder, additionalProperties); + return Objects.hash(name, question, helpText, type, numStars, min, max, defaultValue, labelNegative, labelPositive, customOptions, subQuestionIds, alwaysShowSubQuestions, subQuestionConditions, commentBoxCondition, commentBoxPrompt, reportingOrder, additionalProperties); } @Override @@ -501,6 +586,9 @@ public String toString() { sb.append(" customOptions: ").append(toIndentedString(customOptions)).append("\n"); sb.append(" subQuestionIds: ").append(toIndentedString(subQuestionIds)).append("\n"); sb.append(" alwaysShowSubQuestions: ").append(toIndentedString(alwaysShowSubQuestions)).append("\n"); + sb.append(" subQuestionConditions: ").append(toIndentedString(subQuestionConditions)).append("\n"); + sb.append(" commentBoxCondition: ").append(toIndentedString(commentBoxCondition)).append("\n"); + sb.append(" commentBoxPrompt: ").append(toIndentedString(commentBoxPrompt)).append("\n"); sb.append(" reportingOrder: ").append(toIndentedString(reportingOrder)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -521,7 +609,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "question", "helpText", "type", "numStars", "min", "max", "defaultValue", "labelNegative", "labelPositive", "customOptions", "subQuestionIds", "alwaysShowSubQuestions", "reportingOrder")); + openapiFields = new HashSet(Arrays.asList("name", "question", "helpText", "type", "numStars", "min", "max", "defaultValue", "labelNegative", "labelPositive", "customOptions", "subQuestionIds", "alwaysShowSubQuestions", "subQuestionConditions", "commentBoxCondition", "commentBoxPrompt", "reportingOrder")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name", "question", "type", "reportingOrder")); @@ -583,6 +671,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("subQuestionIds") != null && !jsonObj.get("subQuestionIds").isJsonNull() && !jsonObj.get("subQuestionIds").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subQuestionIds` to be an array in the JSON string but got `%s`", jsonObj.get("subQuestionIds").toString())); } + if (jsonObj.get("subQuestionConditions") != null && !jsonObj.get("subQuestionConditions").isJsonNull()) { + JsonArray jsonArraysubQuestionConditions = jsonObj.getAsJsonArray("subQuestionConditions"); + if (jsonArraysubQuestionConditions != null) { + // ensure the json data is an array + if (!jsonObj.get("subQuestionConditions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subQuestionConditions` to be an array in the JSON string but got `%s`", jsonObj.get("subQuestionConditions").toString())); + } + + // validate the optional field `subQuestionConditions` (array) + for (int i = 0; i < jsonArraysubQuestionConditions.size(); i++) { + SubQuestionCondition.validateJsonElement(jsonArraysubQuestionConditions.get(i)); + }; + } + } + // validate the optional field `commentBoxCondition` + if (jsonObj.get("commentBoxCondition") != null && !jsonObj.get("commentBoxCondition").isJsonNull()) { + QuestionCondition.validateJsonElement(jsonObj.get("commentBoxCondition")); + } + if ((jsonObj.get("commentBoxPrompt") != null && !jsonObj.get("commentBoxPrompt").isJsonNull()) && !jsonObj.get("commentBoxPrompt").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentBoxPrompt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentBoxPrompt").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/java/com/fastcomments/model/CreateQuestionResultBody.java b/client/src/main/java/com/fastcomments/model/CreateQuestionResultBody.java index 0f6e6078..9b01b0eb 100644 --- a/client/src/main/java/com/fastcomments/model/CreateQuestionResultBody.java +++ b/client/src/main/java/com/fastcomments/model/CreateQuestionResultBody.java @@ -60,9 +60,14 @@ public class CreateQuestionResultBody { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nonnull + @javax.annotation.Nullable private Double value; + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + public static final String SERIALIZED_NAME_QUESTION_ID = "questionId"; @SerializedName(SERIALIZED_NAME_QUESTION_ID) @javax.annotation.Nonnull @@ -110,25 +115,52 @@ public void setUrlId(@javax.annotation.Nonnull String urlId) { } - public CreateQuestionResultBody value(@javax.annotation.Nonnull Double value) { + public CreateQuestionResultBody value(@javax.annotation.Nullable Double value) { this.value = value; return this; } /** - * Get value + * Required unless values is given. For multi-choice questions this is derived from values. * @return value */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Double getValue() { return value; } - public void setValue(@javax.annotation.Nonnull Double value) { + public void setValue(@javax.annotation.Nullable Double value) { this.value = value; } + public CreateQuestionResultBody values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public CreateQuestionResultBody addValuesItem(Double valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Selected option indexes for multi-choice questions. + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + public CreateQuestionResultBody questionId(@javax.annotation.Nonnull String questionId) { this.questionId = questionId; return this; @@ -288,6 +320,7 @@ public boolean equals(Object o) { CreateQuestionResultBody createQuestionResultBody = (CreateQuestionResultBody) o; return Objects.equals(this.urlId, createQuestionResultBody.urlId) && Objects.equals(this.value, createQuestionResultBody.value) && + Objects.equals(this.values, createQuestionResultBody.values) && Objects.equals(this.questionId, createQuestionResultBody.questionId) && Objects.equals(this.anonUserId, createQuestionResultBody.anonUserId) && Objects.equals(this.userId, createQuestionResultBody.userId) && @@ -298,7 +331,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(urlId, value, questionId, anonUserId, userId, commentId, meta, additionalProperties); + return Objects.hash(urlId, value, values, questionId, anonUserId, userId, commentId, meta, additionalProperties); } @Override @@ -307,6 +340,7 @@ public String toString() { sb.append("class CreateQuestionResultBody {\n"); sb.append(" urlId: ").append(toIndentedString(urlId)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); sb.append(" questionId: ").append(toIndentedString(questionId)).append("\n"); sb.append(" anonUserId: ").append(toIndentedString(anonUserId)).append("\n"); sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); @@ -331,10 +365,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("urlId", "value", "questionId", "anonUserId", "userId", "commentId", "meta")); + openapiFields = new HashSet(Arrays.asList("urlId", "value", "values", "questionId", "anonUserId", "userId", "commentId", "meta")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("urlId", "value", "questionId")); + openapiRequiredFields = new HashSet(Arrays.asList("urlId", "questionId")); } /** @@ -360,6 +394,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("urlId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `urlId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("urlId").toString())); } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } if (!jsonObj.get("questionId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `questionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("questionId").toString())); } diff --git a/client/src/main/java/com/fastcomments/model/CreateTenantBody.java b/client/src/main/java/com/fastcomments/model/CreateTenantBody.java index 6a58a47f..58f344a0 100644 --- a/client/src/main/java/com/fastcomments/model/CreateTenantBody.java +++ b/client/src/main/java/com/fastcomments/model/CreateTenantBody.java @@ -96,11 +96,6 @@ public class CreateTenantBody { @javax.annotation.Nullable private Boolean billingHandledExternally; - public static final String SERIALIZED_NAME_CREATED_BY = "createdBy"; - @SerializedName(SERIALIZED_NAME_CREATED_BY) - @javax.annotation.Nullable - private String createdBy; - public static final String SERIALIZED_NAME_IS_SETUP = "isSetup"; @SerializedName(SERIALIZED_NAME_IS_SETUP) @javax.annotation.Nullable @@ -334,25 +329,6 @@ public void setBillingHandledExternally(@javax.annotation.Nullable Boolean billi } - public CreateTenantBody createdBy(@javax.annotation.Nullable String createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get createdBy - * @return createdBy - */ - @javax.annotation.Nullable - public String getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(@javax.annotation.Nullable String createdBy) { - this.createdBy = createdBy; - } - - public CreateTenantBody isSetup(@javax.annotation.Nullable Boolean isSetup) { this.isSetup = isSetup; return this; @@ -645,7 +621,6 @@ public boolean equals(Object o) { Objects.equals(this.paymentFrequency, createTenantBody.paymentFrequency) && Objects.equals(this.billingInfoValid, createTenantBody.billingInfoValid) && Objects.equals(this.billingHandledExternally, createTenantBody.billingHandledExternally) && - Objects.equals(this.createdBy, createTenantBody.createdBy) && Objects.equals(this.isSetup, createTenantBody.isSetup) && Objects.equals(this.billingInfo, createTenantBody.billingInfo) && Objects.equals(this.stripeCustomerId, createTenantBody.stripeCustomerId) && @@ -664,7 +639,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(name, domainConfiguration, email, signUpDate, packageId, paymentFrequency, billingInfoValid, billingHandledExternally, createdBy, isSetup, billingInfo, stripeCustomerId, stripeSubscriptionId, stripePlanId, enableProfanityFilter, enableSpamFilter, removeUnverifiedComments, unverifiedCommentsTTLms, commentsRequireApproval, autoApproveCommentOnVerification, sendProfaneToSpam, deAnonIpAddr, meta); + return Objects.hash(name, domainConfiguration, email, signUpDate, packageId, paymentFrequency, billingInfoValid, billingHandledExternally, isSetup, billingInfo, stripeCustomerId, stripeSubscriptionId, stripePlanId, enableProfanityFilter, enableSpamFilter, removeUnverifiedComments, unverifiedCommentsTTLms, commentsRequireApproval, autoApproveCommentOnVerification, sendProfaneToSpam, deAnonIpAddr, meta); } @Override @@ -679,7 +654,6 @@ public String toString() { sb.append(" paymentFrequency: ").append(toIndentedString(paymentFrequency)).append("\n"); sb.append(" billingInfoValid: ").append(toIndentedString(billingInfoValid)).append("\n"); sb.append(" billingHandledExternally: ").append(toIndentedString(billingHandledExternally)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); sb.append(" isSetup: ").append(toIndentedString(isSetup)).append("\n"); sb.append(" billingInfo: ").append(toIndentedString(billingInfo)).append("\n"); sb.append(" stripeCustomerId: ").append(toIndentedString(stripeCustomerId)).append("\n"); @@ -712,7 +686,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "domainConfiguration", "email", "signUpDate", "packageId", "paymentFrequency", "billingInfoValid", "billingHandledExternally", "createdBy", "isSetup", "billingInfo", "stripeCustomerId", "stripeSubscriptionId", "stripePlanId", "enableProfanityFilter", "enableSpamFilter", "removeUnverifiedComments", "unverifiedCommentsTTLms", "commentsRequireApproval", "autoApproveCommentOnVerification", "sendProfaneToSpam", "deAnonIpAddr", "meta")); + openapiFields = new HashSet(Arrays.asList("name", "domainConfiguration", "email", "signUpDate", "packageId", "paymentFrequency", "billingInfoValid", "billingHandledExternally", "isSetup", "billingInfo", "stripeCustomerId", "stripeSubscriptionId", "stripePlanId", "enableProfanityFilter", "enableSpamFilter", "removeUnverifiedComments", "unverifiedCommentsTTLms", "commentsRequireApproval", "autoApproveCommentOnVerification", "sendProfaneToSpam", "deAnonIpAddr", "meta")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name", "domainConfiguration")); @@ -765,9 +739,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("packageId") != null && !jsonObj.get("packageId").isJsonNull()) && !jsonObj.get("packageId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `packageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("packageId").toString())); } - if ((jsonObj.get("createdBy") != null && !jsonObj.get("createdBy").isJsonNull()) && !jsonObj.get("createdBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `createdBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdBy").toString())); - } // validate the optional field `billingInfo` if (jsonObj.get("billingInfo") != null && !jsonObj.get("billingInfo").isJsonNull()) { BillingInfo.validateJsonElement(jsonObj.get("billingInfo")); diff --git a/client/src/main/java/com/fastcomments/model/CreateWebhookParams.java b/client/src/main/java/com/fastcomments/model/CreateWebhookParams.java new file mode 100644 index 00000000..a4e729f3 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CreateWebhookParams.java @@ -0,0 +1,298 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.WebhookEventName; +import com.fastcomments.model.WebhookHTTPMethod; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CreateWebhookParams + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CreateWebhookParams { + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_EVENT = "event"; + @SerializedName(SERIALIZED_NAME_EVENT) + @javax.annotation.Nonnull + private WebhookEventName event; + + public static final String SERIALIZED_NAME_DOMAIN = "domain"; + @SerializedName(SERIALIZED_NAME_DOMAIN) + @javax.annotation.Nullable + private String domain; + + public static final String SERIALIZED_NAME_METHOD = "method"; + @SerializedName(SERIALIZED_NAME_METHOD) + @javax.annotation.Nullable + private WebhookHTTPMethod method; + + public CreateWebhookParams() { + } + + public CreateWebhookParams url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Where events are delivered. Must be http(s). + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + + public CreateWebhookParams event(@javax.annotation.Nonnull WebhookEventName event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @javax.annotation.Nonnull + public WebhookEventName getEvent() { + return event; + } + + public void setEvent(@javax.annotation.Nonnull WebhookEventName event) { + this.event = event; + } + + + public CreateWebhookParams domain(@javax.annotation.Nullable String domain) { + this.domain = domain; + return this; + } + + /** + * A domain from your account configuration, or '*' (the default) for every domain. + * @return domain + */ + @javax.annotation.Nullable + public String getDomain() { + return domain; + } + + public void setDomain(@javax.annotation.Nullable String domain) { + this.domain = domain; + } + + + public CreateWebhookParams method(@javax.annotation.Nullable WebhookHTTPMethod method) { + this.method = method; + return this; + } + + /** + * Get method + * @return method + */ + @javax.annotation.Nullable + public WebhookHTTPMethod getMethod() { + return method; + } + + public void setMethod(@javax.annotation.Nullable WebhookHTTPMethod method) { + this.method = method; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWebhookParams createWebhookParams = (CreateWebhookParams) o; + return Objects.equals(this.url, createWebhookParams.url) && + Objects.equals(this.event, createWebhookParams.event) && + Objects.equals(this.domain, createWebhookParams.domain) && + Objects.equals(this.method, createWebhookParams.method); + } + + @Override + public int hashCode() { + return Objects.hash(url, event, domain, method); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWebhookParams {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("url", "event", "domain", "method")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("url", "event")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateWebhookParams + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateWebhookParams.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateWebhookParams is not found in the empty JSON string", CreateWebhookParams.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateWebhookParams.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateWebhookParams` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateWebhookParams.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + // validate the required field `event` + WebhookEventName.validateJsonElement(jsonObj.get("event")); + if ((jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) && !jsonObj.get("domain").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `domain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain").toString())); + } + // validate the optional field `method` + if (jsonObj.get("method") != null && !jsonObj.get("method").isJsonNull()) { + WebhookHTTPMethod.validateJsonElement(jsonObj.get("method")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateWebhookParams.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateWebhookParams' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateWebhookParams.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateWebhookParams value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateWebhookParams read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateWebhookParams given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateWebhookParams + * @throws IOException if the JSON string is invalid with respect to CreateWebhookParams + */ + public static CreateWebhookParams fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateWebhookParams.class); + } + + /** + * Convert an instance of CreateWebhookParams to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CreateWebhookResponse.java b/client/src/main/java/com/fastcomments/model/CreateWebhookResponse.java new file mode 100644 index 00000000..10b56bdb --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/CreateWebhookResponse.java @@ -0,0 +1,238 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PublicWebhook; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * CreateWebhookResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class CreateWebhookResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_WEBHOOK = "webhook"; + @SerializedName(SERIALIZED_NAME_WEBHOOK) + @javax.annotation.Nonnull + private PublicWebhook webhook; + + public CreateWebhookResponse() { + } + + public CreateWebhookResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public CreateWebhookResponse webhook(@javax.annotation.Nonnull PublicWebhook webhook) { + this.webhook = webhook; + return this; + } + + /** + * Get webhook + * @return webhook + */ + @javax.annotation.Nonnull + public PublicWebhook getWebhook() { + return webhook; + } + + public void setWebhook(@javax.annotation.Nonnull PublicWebhook webhook) { + this.webhook = webhook; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWebhookResponse createWebhookResponse = (CreateWebhookResponse) o; + return Objects.equals(this.status, createWebhookResponse.status) && + Objects.equals(this.webhook, createWebhookResponse.webhook); + } + + @Override + public int hashCode() { + return Objects.hash(status, webhook); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWebhookResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" webhook: ").append(toIndentedString(webhook)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "webhook")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "webhook")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateWebhookResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateWebhookResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateWebhookResponse is not found in the empty JSON string", CreateWebhookResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateWebhookResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateWebhookResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateWebhookResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + // validate the required field `webhook` + PublicWebhook.validateJsonElement(jsonObj.get("webhook")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateWebhookResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateWebhookResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateWebhookResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateWebhookResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateWebhookResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateWebhookResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateWebhookResponse + * @throws IOException if the JSON string is invalid with respect to CreateWebhookResponse + */ + public static CreateWebhookResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateWebhookResponse.class); + } + + /** + * Convert an instance of CreateWebhookResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/CustomConfigParameters.java b/client/src/main/java/com/fastcomments/model/CustomConfigParameters.java index 4a0abca6..fdf6ce77 100644 --- a/client/src/main/java/com/fastcomments/model/CustomConfigParameters.java +++ b/client/src/main/java/com/fastcomments/model/CustomConfigParameters.java @@ -18,10 +18,13 @@ import com.fastcomments.model.CommentQuestionResultsRenderingType; import com.fastcomments.model.CommentQuestionsRequired; import com.fastcomments.model.CommentThreadDeletionMode; +import com.fastcomments.model.CommentTranslationMode; import com.fastcomments.model.CommenterNameFormats; import com.fastcomments.model.GifRating; import com.fastcomments.model.ImageContentProfanityLevel; import com.fastcomments.model.MentionAutoCompleteMode; +import com.fastcomments.model.PollCreationMode; +import com.fastcomments.model.PollVotingMode; import com.fastcomments.model.QuestionRenderingType; import com.fastcomments.model.QuestionSubQuestionVisibility; import com.fastcomments.model.QuestionWhenSave; @@ -101,6 +104,11 @@ public class CustomConfigParameters { @javax.annotation.Nullable private List allowedLanguages; + public static final String SERIALIZED_NAME_AUTO_GENERATE_USERNAME = "autoGenerateUsername"; + @SerializedName(SERIALIZED_NAME_AUTO_GENERATE_USERNAME) + @javax.annotation.Nullable + private Boolean autoGenerateUsername; + public static final String SERIALIZED_NAME_COLLAPSE_REPLIES = "collapseReplies"; @SerializedName(SERIALIZED_NAME_COLLAPSE_REPLIES) @javax.annotation.Nullable @@ -116,11 +124,26 @@ public class CustomConfigParameters { @javax.annotation.Nullable private CommentHTMLRenderingMode commentHTMLRenderingMode; + public static final String SERIALIZED_NAME_COMMENTS_REQUIRE_APPROVAL = "commentsRequireApproval"; + @SerializedName(SERIALIZED_NAME_COMMENTS_REQUIRE_APPROVAL) + @javax.annotation.Nullable + private Boolean commentsRequireApproval; + public static final String SERIALIZED_NAME_COMMENT_THREAD_DELETE_MODE = "commentThreadDeleteMode"; @SerializedName(SERIALIZED_NAME_COMMENT_THREAD_DELETE_MODE) @javax.annotation.Nullable private CommentThreadDeletionMode commentThreadDeleteMode; + public static final String SERIALIZED_NAME_POLL_CREATION = "pollCreation"; + @SerializedName(SERIALIZED_NAME_POLL_CREATION) + @javax.annotation.Nullable + private PollCreationMode pollCreation; + + public static final String SERIALIZED_NAME_POLL_VOTING = "pollVoting"; + @SerializedName(SERIALIZED_NAME_POLL_VOTING) + @javax.annotation.Nullable + private PollVotingMode pollVoting; + public static final String SERIALIZED_NAME_COMMENTER_NAME_FORMAT = "commenterNameFormat"; @SerializedName(SERIALIZED_NAME_COMMENTER_NAME_FORMAT) @javax.annotation.Nullable @@ -511,6 +534,11 @@ public class CustomConfigParameters { @javax.annotation.Nullable private TOSConfig tos; + public static final String SERIALIZED_NAME_COMMENT_TRANSLATION = "commentTranslation"; + @SerializedName(SERIALIZED_NAME_COMMENT_TRANSLATION) + @javax.annotation.Nullable + private CommentTranslationMode commentTranslation; + public CustomConfigParameters() { } @@ -636,6 +664,25 @@ public void setAllowedLanguages(@javax.annotation.Nullable List allowedL } + public CustomConfigParameters autoGenerateUsername(@javax.annotation.Nullable Boolean autoGenerateUsername) { + this.autoGenerateUsername = autoGenerateUsername; + return this; + } + + /** + * Serve each new visitor a unique generated username as the prefilled defaultUsername. + * @return autoGenerateUsername + */ + @javax.annotation.Nullable + public Boolean getAutoGenerateUsername() { + return autoGenerateUsername; + } + + public void setAutoGenerateUsername(@javax.annotation.Nullable Boolean autoGenerateUsername) { + this.autoGenerateUsername = autoGenerateUsername; + } + + public CustomConfigParameters collapseReplies(@javax.annotation.Nullable Boolean collapseReplies) { this.collapseReplies = collapseReplies; return this; @@ -693,6 +740,25 @@ public void setCommentHTMLRenderingMode(@javax.annotation.Nullable CommentHTMLRe } + public CustomConfigParameters commentsRequireApproval(@javax.annotation.Nullable Boolean commentsRequireApproval) { + this.commentsRequireApproval = commentsRequireApproval; + return this; + } + + /** + * Hold every new or edited comment on this page or domain for moderation, like the tenant-wide setting but scoped. + * @return commentsRequireApproval + */ + @javax.annotation.Nullable + public Boolean getCommentsRequireApproval() { + return commentsRequireApproval; + } + + public void setCommentsRequireApproval(@javax.annotation.Nullable Boolean commentsRequireApproval) { + this.commentsRequireApproval = commentsRequireApproval; + } + + public CustomConfigParameters commentThreadDeleteMode(@javax.annotation.Nullable CommentThreadDeletionMode commentThreadDeleteMode) { this.commentThreadDeleteMode = commentThreadDeleteMode; return this; @@ -712,6 +778,44 @@ public void setCommentThreadDeleteMode(@javax.annotation.Nullable CommentThreadD } + public CustomConfigParameters pollCreation(@javax.annotation.Nullable PollCreationMode pollCreation) { + this.pollCreation = pollCreation; + return this; + } + + /** + * Get pollCreation + * @return pollCreation + */ + @javax.annotation.Nullable + public PollCreationMode getPollCreation() { + return pollCreation; + } + + public void setPollCreation(@javax.annotation.Nullable PollCreationMode pollCreation) { + this.pollCreation = pollCreation; + } + + + public CustomConfigParameters pollVoting(@javax.annotation.Nullable PollVotingMode pollVoting) { + this.pollVoting = pollVoting; + return this; + } + + /** + * Get pollVoting + * @return pollVoting + */ + @javax.annotation.Nullable + public PollVotingMode getPollVoting() { + return pollVoting; + } + + public void setPollVoting(@javax.annotation.Nullable PollVotingMode pollVoting) { + this.pollVoting = pollVoting; + } + + public CustomConfigParameters commenterNameFormat(@javax.annotation.Nullable CommenterNameFormats commenterNameFormat) { this.commenterNameFormat = commenterNameFormat; return this; @@ -2234,6 +2338,25 @@ public void setTos(@javax.annotation.Nullable TOSConfig tos) { } + public CustomConfigParameters commentTranslation(@javax.annotation.Nullable CommentTranslationMode commentTranslation) { + this.commentTranslation = commentTranslation; + return this; + } + + /** + * Get commentTranslation + * @return commentTranslation + */ + @javax.annotation.Nullable + public CommentTranslationMode getCommentTranslation() { + return commentTranslation; + } + + public void setCommentTranslation(@javax.annotation.Nullable CommentTranslationMode commentTranslation) { + this.commentTranslation = commentTranslation; + } + + @Override public boolean equals(Object o) { @@ -2250,10 +2373,14 @@ public boolean equals(Object o) { Objects.equals(this.allowAnonFlag, customConfigParameters.allowAnonFlag) && Objects.equals(this.allowAnonVotes, customConfigParameters.allowAnonVotes) && Objects.equals(this.allowedLanguages, customConfigParameters.allowedLanguages) && + Objects.equals(this.autoGenerateUsername, customConfigParameters.autoGenerateUsername) && Objects.equals(this.collapseReplies, customConfigParameters.collapseReplies) && Objects.equals(this.commentCountFormat, customConfigParameters.commentCountFormat) && Objects.equals(this.commentHTMLRenderingMode, customConfigParameters.commentHTMLRenderingMode) && + Objects.equals(this.commentsRequireApproval, customConfigParameters.commentsRequireApproval) && Objects.equals(this.commentThreadDeleteMode, customConfigParameters.commentThreadDeleteMode) && + Objects.equals(this.pollCreation, customConfigParameters.pollCreation) && + Objects.equals(this.pollVoting, customConfigParameters.pollVoting) && Objects.equals(this.commenterNameFormat, customConfigParameters.commenterNameFormat) && Objects.equals(this.countAboveToggle, customConfigParameters.countAboveToggle) && Objects.equals(this.customCSS, customConfigParameters.customCSS) && @@ -2331,12 +2458,13 @@ public boolean equals(Object o) { Objects.equals(this.ticketFileUploadsEnabled, customConfigParameters.ticketFileUploadsEnabled) && Objects.equals(this.ticketMaxFileSize, customConfigParameters.ticketMaxFileSize) && Objects.equals(this.ticketAutoAssignUserIds, customConfigParameters.ticketAutoAssignUserIds) && - Objects.equals(this.tos, customConfigParameters.tos); + Objects.equals(this.tos, customConfigParameters.tos) && + Objects.equals(this.commentTranslation, customConfigParameters.commentTranslation); } @Override public int hashCode() { - return Objects.hash(absoluteAndRelativeDates, absoluteDates, allowAnon, allowAnonFlag, allowAnonVotes, allowedLanguages, collapseReplies, commentCountFormat, commentHTMLRenderingMode, commentThreadDeleteMode, commenterNameFormat, countAboveToggle, customCSS, defaultAvatarSrc, defaultSortDirection, defaultUsername, disableAutoAdminMigration, disableAutoHashTagCreation, disableBlocking, disableCommenterCommentDelete, disableCommenterCommentEdit, disableEmailInputs, disableLiveCommenting, disableNotificationBell, disableProfileComments, disableProfileDirectMessages, disableProfiles, disableSuccessMessage, disableToolbar, disableUnverifiedLabel, disableVoting, enableCommenterLinks, enableSearch, enableSpoilers, enableThirdPartyCookieBypass, enableViewCounts, enableVoteList, enableWYSIWYG, gifRating, hasDarkBackground, headerHTML, hideAvatars, hideCommentsUnderCountTextFormat, imageContentProfanityLevel, inputAfterComments, limitCommentsByGroups, locale, maxCommentCharacterLength, maxCommentCreatedCountPUPM, noCustomConfig, mentionAutoCompleteMode, noImageUploads, allowEmbeds, allowedEmbedDomains, noStyles, pageSize, readonly, noNewRootComments, requireSSO, enableFChat, enableResizeHandle, restrictedLinkDomains, showBadgesInTopBar, showCommentSaveSuccess, showLiveRightAway, showQuestion, spamRules, ssoSecLvl, translations, useShowCommentsToggle, useSingleLineCommentInput, voteStyle, widgetQuestionId, widgetQuestionResultsStyle, widgetQuestionShowBreakdown, widgetQuestionStyle, widgetQuestionWhenToSave, widgetQuestionsRequired, widgetSubQuestionVisibility, wrap, usersListLocation, usersListIncludeOffline, ticketBaseUrl, ticketKBSearchEndpoint, ticketFileUploadsEnabled, ticketMaxFileSize, ticketAutoAssignUserIds, tos); + return Objects.hash(absoluteAndRelativeDates, absoluteDates, allowAnon, allowAnonFlag, allowAnonVotes, allowedLanguages, autoGenerateUsername, collapseReplies, commentCountFormat, commentHTMLRenderingMode, commentsRequireApproval, commentThreadDeleteMode, pollCreation, pollVoting, commenterNameFormat, countAboveToggle, customCSS, defaultAvatarSrc, defaultSortDirection, defaultUsername, disableAutoAdminMigration, disableAutoHashTagCreation, disableBlocking, disableCommenterCommentDelete, disableCommenterCommentEdit, disableEmailInputs, disableLiveCommenting, disableNotificationBell, disableProfileComments, disableProfileDirectMessages, disableProfiles, disableSuccessMessage, disableToolbar, disableUnverifiedLabel, disableVoting, enableCommenterLinks, enableSearch, enableSpoilers, enableThirdPartyCookieBypass, enableViewCounts, enableVoteList, enableWYSIWYG, gifRating, hasDarkBackground, headerHTML, hideAvatars, hideCommentsUnderCountTextFormat, imageContentProfanityLevel, inputAfterComments, limitCommentsByGroups, locale, maxCommentCharacterLength, maxCommentCreatedCountPUPM, noCustomConfig, mentionAutoCompleteMode, noImageUploads, allowEmbeds, allowedEmbedDomains, noStyles, pageSize, readonly, noNewRootComments, requireSSO, enableFChat, enableResizeHandle, restrictedLinkDomains, showBadgesInTopBar, showCommentSaveSuccess, showLiveRightAway, showQuestion, spamRules, ssoSecLvl, translations, useShowCommentsToggle, useSingleLineCommentInput, voteStyle, widgetQuestionId, widgetQuestionResultsStyle, widgetQuestionShowBreakdown, widgetQuestionStyle, widgetQuestionWhenToSave, widgetQuestionsRequired, widgetSubQuestionVisibility, wrap, usersListLocation, usersListIncludeOffline, ticketBaseUrl, ticketKBSearchEndpoint, ticketFileUploadsEnabled, ticketMaxFileSize, ticketAutoAssignUserIds, tos, commentTranslation); } @Override @@ -2349,10 +2477,14 @@ public String toString() { sb.append(" allowAnonFlag: ").append(toIndentedString(allowAnonFlag)).append("\n"); sb.append(" allowAnonVotes: ").append(toIndentedString(allowAnonVotes)).append("\n"); sb.append(" allowedLanguages: ").append(toIndentedString(allowedLanguages)).append("\n"); + sb.append(" autoGenerateUsername: ").append(toIndentedString(autoGenerateUsername)).append("\n"); sb.append(" collapseReplies: ").append(toIndentedString(collapseReplies)).append("\n"); sb.append(" commentCountFormat: ").append(toIndentedString(commentCountFormat)).append("\n"); sb.append(" commentHTMLRenderingMode: ").append(toIndentedString(commentHTMLRenderingMode)).append("\n"); + sb.append(" commentsRequireApproval: ").append(toIndentedString(commentsRequireApproval)).append("\n"); sb.append(" commentThreadDeleteMode: ").append(toIndentedString(commentThreadDeleteMode)).append("\n"); + sb.append(" pollCreation: ").append(toIndentedString(pollCreation)).append("\n"); + sb.append(" pollVoting: ").append(toIndentedString(pollVoting)).append("\n"); sb.append(" commenterNameFormat: ").append(toIndentedString(commenterNameFormat)).append("\n"); sb.append(" countAboveToggle: ").append(toIndentedString(countAboveToggle)).append("\n"); sb.append(" customCSS: ").append(toIndentedString(customCSS)).append("\n"); @@ -2431,6 +2563,7 @@ public String toString() { sb.append(" ticketMaxFileSize: ").append(toIndentedString(ticketMaxFileSize)).append("\n"); sb.append(" ticketAutoAssignUserIds: ").append(toIndentedString(ticketAutoAssignUserIds)).append("\n"); sb.append(" tos: ").append(toIndentedString(tos)).append("\n"); + sb.append(" commentTranslation: ").append(toIndentedString(commentTranslation)).append("\n"); sb.append("}"); return sb.toString(); } @@ -2449,7 +2582,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("absoluteAndRelativeDates", "absoluteDates", "allowAnon", "allowAnonFlag", "allowAnonVotes", "allowedLanguages", "collapseReplies", "commentCountFormat", "commentHTMLRenderingMode", "commentThreadDeleteMode", "commenterNameFormat", "countAboveToggle", "customCSS", "defaultAvatarSrc", "defaultSortDirection", "defaultUsername", "disableAutoAdminMigration", "disableAutoHashTagCreation", "disableBlocking", "disableCommenterCommentDelete", "disableCommenterCommentEdit", "disableEmailInputs", "disableLiveCommenting", "disableNotificationBell", "disableProfileComments", "disableProfileDirectMessages", "disableProfiles", "disableSuccessMessage", "disableToolbar", "disableUnverifiedLabel", "disableVoting", "enableCommenterLinks", "enableSearch", "enableSpoilers", "enableThirdPartyCookieBypass", "enableViewCounts", "enableVoteList", "enableWYSIWYG", "gifRating", "hasDarkBackground", "headerHTML", "hideAvatars", "hideCommentsUnderCountTextFormat", "imageContentProfanityLevel", "inputAfterComments", "limitCommentsByGroups", "locale", "maxCommentCharacterLength", "maxCommentCreatedCountPUPM", "noCustomConfig", "mentionAutoCompleteMode", "noImageUploads", "allowEmbeds", "allowedEmbedDomains", "noStyles", "pageSize", "readonly", "noNewRootComments", "requireSSO", "enableFChat", "enableResizeHandle", "restrictedLinkDomains", "showBadgesInTopBar", "showCommentSaveSuccess", "showLiveRightAway", "showQuestion", "spamRules", "ssoSecLvl", "translations", "useShowCommentsToggle", "useSingleLineCommentInput", "voteStyle", "widgetQuestionId", "widgetQuestionResultsStyle", "widgetQuestionShowBreakdown", "widgetQuestionStyle", "widgetQuestionWhenToSave", "widgetQuestionsRequired", "widgetSubQuestionVisibility", "wrap", "usersListLocation", "usersListIncludeOffline", "ticketBaseUrl", "ticketKBSearchEndpoint", "ticketFileUploadsEnabled", "ticketMaxFileSize", "ticketAutoAssignUserIds", "tos")); + openapiFields = new HashSet(Arrays.asList("absoluteAndRelativeDates", "absoluteDates", "allowAnon", "allowAnonFlag", "allowAnonVotes", "allowedLanguages", "autoGenerateUsername", "collapseReplies", "commentCountFormat", "commentHTMLRenderingMode", "commentsRequireApproval", "commentThreadDeleteMode", "pollCreation", "pollVoting", "commenterNameFormat", "countAboveToggle", "customCSS", "defaultAvatarSrc", "defaultSortDirection", "defaultUsername", "disableAutoAdminMigration", "disableAutoHashTagCreation", "disableBlocking", "disableCommenterCommentDelete", "disableCommenterCommentEdit", "disableEmailInputs", "disableLiveCommenting", "disableNotificationBell", "disableProfileComments", "disableProfileDirectMessages", "disableProfiles", "disableSuccessMessage", "disableToolbar", "disableUnverifiedLabel", "disableVoting", "enableCommenterLinks", "enableSearch", "enableSpoilers", "enableThirdPartyCookieBypass", "enableViewCounts", "enableVoteList", "enableWYSIWYG", "gifRating", "hasDarkBackground", "headerHTML", "hideAvatars", "hideCommentsUnderCountTextFormat", "imageContentProfanityLevel", "inputAfterComments", "limitCommentsByGroups", "locale", "maxCommentCharacterLength", "maxCommentCreatedCountPUPM", "noCustomConfig", "mentionAutoCompleteMode", "noImageUploads", "allowEmbeds", "allowedEmbedDomains", "noStyles", "pageSize", "readonly", "noNewRootComments", "requireSSO", "enableFChat", "enableResizeHandle", "restrictedLinkDomains", "showBadgesInTopBar", "showCommentSaveSuccess", "showLiveRightAway", "showQuestion", "spamRules", "ssoSecLvl", "translations", "useShowCommentsToggle", "useSingleLineCommentInput", "voteStyle", "widgetQuestionId", "widgetQuestionResultsStyle", "widgetQuestionShowBreakdown", "widgetQuestionStyle", "widgetQuestionWhenToSave", "widgetQuestionsRequired", "widgetSubQuestionVisibility", "wrap", "usersListLocation", "usersListIncludeOffline", "ticketBaseUrl", "ticketKBSearchEndpoint", "ticketFileUploadsEnabled", "ticketMaxFileSize", "ticketAutoAssignUserIds", "tos", "commentTranslation")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -2491,6 +2624,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("commentThreadDeleteMode") != null && !jsonObj.get("commentThreadDeleteMode").isJsonNull()) { CommentThreadDeletionMode.validateJsonElement(jsonObj.get("commentThreadDeleteMode")); } + // validate the optional field `pollCreation` + if (jsonObj.get("pollCreation") != null && !jsonObj.get("pollCreation").isJsonNull()) { + PollCreationMode.validateJsonElement(jsonObj.get("pollCreation")); + } + // validate the optional field `pollVoting` + if (jsonObj.get("pollVoting") != null && !jsonObj.get("pollVoting").isJsonNull()) { + PollVotingMode.validateJsonElement(jsonObj.get("pollVoting")); + } // validate the optional field `commenterNameFormat` if (jsonObj.get("commenterNameFormat") != null && !jsonObj.get("commenterNameFormat").isJsonNull()) { CommenterNameFormats.validateJsonElement(jsonObj.get("commenterNameFormat")); @@ -2600,6 +2741,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("tos") != null && !jsonObj.get("tos").isJsonNull()) { TOSConfig.validateJsonElement(jsonObj.get("tos")); } + // validate the optional field `commentTranslation` + if (jsonObj.get("commentTranslation") != null && !jsonObj.get("commentTranslation").isJsonNull()) { + CommentTranslationMode.validateJsonElement(jsonObj.get("commentTranslation")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/java/com/fastcomments/model/DeletePollVoteResponse.java b/client/src/main/java/com/fastcomments/model/DeletePollVoteResponse.java new file mode 100644 index 00000000..b4ca5511 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/DeletePollVoteResponse.java @@ -0,0 +1,238 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentPoll; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * DeletePollVoteResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class DeletePollVoteResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nonnull + private CommentPoll poll; + + public DeletePollVoteResponse() { + } + + public DeletePollVoteResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public DeletePollVoteResponse poll(@javax.annotation.Nonnull CommentPoll poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nonnull + public CommentPoll getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nonnull CommentPoll poll) { + this.poll = poll; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePollVoteResponse deletePollVoteResponse = (DeletePollVoteResponse) o; + return Objects.equals(this.status, deletePollVoteResponse.status) && + Objects.equals(this.poll, deletePollVoteResponse.poll); + } + + @Override + public int hashCode() { + return Objects.hash(status, poll); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletePollVoteResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "poll")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "poll")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeletePollVoteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeletePollVoteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in DeletePollVoteResponse is not found in the empty JSON string", DeletePollVoteResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeletePollVoteResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `DeletePollVoteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeletePollVoteResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + // validate the required field `poll` + CommentPoll.validateJsonElement(jsonObj.get("poll")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeletePollVoteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeletePollVoteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeletePollVoteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeletePollVoteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeletePollVoteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DeletePollVoteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeletePollVoteResponse + * @throws IOException if the JSON string is invalid with respect to DeletePollVoteResponse + */ + public static DeletePollVoteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeletePollVoteResponse.class); + } + + /** + * Convert an instance of DeletePollVoteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/EventLogEntry.java b/client/src/main/java/com/fastcomments/model/EventLogEntry.java index dfcbce83..005f3555 100644 --- a/client/src/main/java/com/fastcomments/model/EventLogEntry.java +++ b/client/src/main/java/com/fastcomments/model/EventLogEntry.java @@ -81,6 +81,11 @@ public class EventLogEntry { @javax.annotation.Nonnull private String data; + public static final String SERIALIZED_NAME_DOMAIN = "domain"; + @SerializedName(SERIALIZED_NAME_DOMAIN) + @javax.annotation.Nullable + private String domain; + public EventLogEntry() { } @@ -198,6 +203,25 @@ public void setData(@javax.annotation.Nonnull String data) { } + public EventLogEntry domain(@javax.annotation.Nullable String domain) { + this.domain = domain; + return this; + } + + /** + * Get domain + * @return domain + */ + @javax.annotation.Nullable + public String getDomain() { + return domain; + } + + public void setDomain(@javax.annotation.Nullable String domain) { + this.domain = domain; + } + + @Override public boolean equals(Object o) { @@ -213,12 +237,13 @@ public boolean equals(Object o) { Objects.equals(this.tenantId, eventLogEntry.tenantId) && Objects.equals(this.urlId, eventLogEntry.urlId) && Objects.equals(this.broadcastId, eventLogEntry.broadcastId) && - Objects.equals(this.data, eventLogEntry.data); + Objects.equals(this.data, eventLogEntry.data) && + Objects.equals(this.domain, eventLogEntry.domain); } @Override public int hashCode() { - return Objects.hash(id, createdAt, tenantId, urlId, broadcastId, data); + return Objects.hash(id, createdAt, tenantId, urlId, broadcastId, data, domain); } @Override @@ -231,6 +256,7 @@ public String toString() { sb.append(" urlId: ").append(toIndentedString(urlId)).append("\n"); sb.append(" broadcastId: ").append(toIndentedString(broadcastId)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); sb.append("}"); return sb.toString(); } @@ -249,7 +275,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("_id", "createdAt", "tenantId", "urlId", "broadcastId", "data")); + openapiFields = new HashSet(Arrays.asList("_id", "createdAt", "tenantId", "urlId", "broadcastId", "data", "domain")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("_id", "createdAt", "tenantId", "urlId", "broadcastId", "data")); @@ -298,6 +324,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("data").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data").toString())); } + if ((jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) && !jsonObj.get("domain").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `domain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/java/com/fastcomments/model/FComment.java b/client/src/main/java/com/fastcomments/model/FComment.java index 41ae6d6c..c2dcbcbd 100644 --- a/client/src/main/java/com/fastcomments/model/FComment.java +++ b/client/src/main/java/com/fastcomments/model/FComment.java @@ -15,6 +15,8 @@ import java.util.Objects; import com.fastcomments.model.CommentLogEntry; +import com.fastcomments.model.CommentPoll; +import com.fastcomments.model.CommentTranslation; import com.fastcomments.model.CommentUserBadgeInfo; import com.fastcomments.model.CommentUserHashTagInfo; import com.fastcomments.model.CommentUserMentionInfo; @@ -28,7 +30,9 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -268,6 +272,16 @@ public class FComment { @javax.annotation.Nullable private String locale; + public static final String SERIALIZED_NAME_DETECTED_LANGUAGE = "detectedLanguage"; + @SerializedName(SERIALIZED_NAME_DETECTED_LANGUAGE) + @javax.annotation.Nullable + private String detectedLanguage; + + public static final String SERIALIZED_NAME_TRANSLATIONS = "translations"; + @SerializedName(SERIALIZED_NAME_TRANSLATIONS) + @javax.annotation.Nullable + private Map translations; + public static final String SERIALIZED_NAME_IS_DELETED = "isDeleted"; @SerializedName(SERIALIZED_NAME_IS_DELETED) @javax.annotation.Nullable @@ -388,6 +402,11 @@ public class FComment { @javax.annotation.Nullable private List feedbackIds = new ArrayList<>(); + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nullable + private CommentPoll poll; + public static final String SERIALIZED_NAME_LOGS = "logs"; @SerializedName(SERIALIZED_NAME_LOGS) @javax.annotation.Nullable @@ -1224,6 +1243,52 @@ public void setLocale(@javax.annotation.Nullable String locale) { } + public FComment detectedLanguage(@javax.annotation.Nullable String detectedLanguage) { + this.detectedLanguage = detectedLanguage; + return this; + } + + /** + * Get detectedLanguage + * @return detectedLanguage + */ + @javax.annotation.Nullable + public String getDetectedLanguage() { + return detectedLanguage; + } + + public void setDetectedLanguage(@javax.annotation.Nullable String detectedLanguage) { + this.detectedLanguage = detectedLanguage; + } + + + public FComment translations(@javax.annotation.Nullable Map translations) { + this.translations = translations; + return this; + } + + public FComment putTranslationsItem(String key, CommentTranslation translationsItem) { + if (this.translations == null) { + this.translations = new HashMap<>(); + } + this.translations.put(key, translationsItem); + return this; + } + + /** + * Construct a type with a set of properties K of type T + * @return translations + */ + @javax.annotation.Nullable + public Map getTranslations() { + return translations; + } + + public void setTranslations(@javax.annotation.Nullable Map translations) { + this.translations = translations; + } + + public FComment isDeleted(@javax.annotation.Nullable Boolean isDeleted) { this.isDeleted = isDeleted; return this; @@ -1720,6 +1785,25 @@ public void setFeedbackIds(@javax.annotation.Nullable List feedbackIds) } + public FComment poll(@javax.annotation.Nullable CommentPoll poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nullable + public CommentPoll getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nullable CommentPoll poll) { + this.poll = poll; + } + + public FComment logs(@javax.annotation.Nullable List logs) { this.logs = logs; return this; @@ -1921,6 +2005,8 @@ public boolean equals(Object o) { Objects.equals(this.hasCode, fcomment.hasCode) && Objects.equals(this.approved, fcomment.approved) && Objects.equals(this.locale, fcomment.locale) && + Objects.equals(this.detectedLanguage, fcomment.detectedLanguage) && + Objects.equals(this.translations, fcomment.translations) && Objects.equals(this.isDeleted, fcomment.isDeleted) && Objects.equals(this.isDeletedUser, fcomment.isDeletedUser) && Objects.equals(this.isBannedUser, fcomment.isBannedUser) && @@ -1945,6 +2031,7 @@ public boolean equals(Object o) { Objects.equals(this.autoplayJobId, fcomment.autoplayJobId) && Objects.equals(this.autoplayDelayMS, fcomment.autoplayDelayMS) && Objects.equals(this.feedbackIds, fcomment.feedbackIds) && + Objects.equals(this.poll, fcomment.poll) && Objects.equals(this.logs, fcomment.logs) && Objects.equals(this.groupIds, fcomment.groupIds) && Objects.equals(this.viewCount, fcomment.viewCount) && @@ -1956,7 +2043,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, tenantId, urlId, urlIdRaw, url, pageTitle, userId, anonUserId, commenterEmail, commenterName, commenterLink, comment, commentHTML, parentId, date, localDateString, localDateHours, votes, votesUp, votesDown, expireAt, verified, verifiedDate, verificationId, notificationSentForParent, notificationSentForParentTenant, reviewed, imported, externalId, externalParentId, avatarSrc, isSpam, permNotSpam, aiDeterminedSpam, hasImages, pageNumber, pageNumberOF, pageNumberNF, hasLinks, hasCode, approved, locale, isDeleted, isDeletedUser, isBannedUser, isByAdmin, isByModerator, isPinned, isLocked, flagCount, rating, displayLabel, fromProductId, meta, ipHash, mentions, hashTags, badges, domain, veteranBadgeProcessed, moderationGroupIds, didProcessBadges, fromOfflineRestore, autoplayJobId, autoplayDelayMS, feedbackIds, logs, groupIds, viewCount, requiresVerification, editKey, tosAcceptedAt, botId); + return Objects.hash(id, tenantId, urlId, urlIdRaw, url, pageTitle, userId, anonUserId, commenterEmail, commenterName, commenterLink, comment, commentHTML, parentId, date, localDateString, localDateHours, votes, votesUp, votesDown, expireAt, verified, verifiedDate, verificationId, notificationSentForParent, notificationSentForParentTenant, reviewed, imported, externalId, externalParentId, avatarSrc, isSpam, permNotSpam, aiDeterminedSpam, hasImages, pageNumber, pageNumberOF, pageNumberNF, hasLinks, hasCode, approved, locale, detectedLanguage, translations, isDeleted, isDeletedUser, isBannedUser, isByAdmin, isByModerator, isPinned, isLocked, flagCount, rating, displayLabel, fromProductId, meta, ipHash, mentions, hashTags, badges, domain, veteranBadgeProcessed, moderationGroupIds, didProcessBadges, fromOfflineRestore, autoplayJobId, autoplayDelayMS, feedbackIds, poll, logs, groupIds, viewCount, requiresVerification, editKey, tosAcceptedAt, botId); } @Override @@ -2005,6 +2092,8 @@ public String toString() { sb.append(" hasCode: ").append(toIndentedString(hasCode)).append("\n"); sb.append(" approved: ").append(toIndentedString(approved)).append("\n"); sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); + sb.append(" detectedLanguage: ").append(toIndentedString(detectedLanguage)).append("\n"); + sb.append(" translations: ").append(toIndentedString(translations)).append("\n"); sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); sb.append(" isDeletedUser: ").append(toIndentedString(isDeletedUser)).append("\n"); sb.append(" isBannedUser: ").append(toIndentedString(isBannedUser)).append("\n"); @@ -2029,6 +2118,7 @@ public String toString() { sb.append(" autoplayJobId: ").append(toIndentedString(autoplayJobId)).append("\n"); sb.append(" autoplayDelayMS: ").append(toIndentedString(autoplayDelayMS)).append("\n"); sb.append(" feedbackIds: ").append(toIndentedString(feedbackIds)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); sb.append(" logs: ").append(toIndentedString(logs)).append("\n"); sb.append(" groupIds: ").append(toIndentedString(groupIds)).append("\n"); sb.append(" viewCount: ").append(toIndentedString(viewCount)).append("\n"); @@ -2054,7 +2144,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "urlId", "urlIdRaw", "url", "pageTitle", "userId", "anonUserId", "commenterEmail", "commenterName", "commenterLink", "comment", "commentHTML", "parentId", "date", "localDateString", "localDateHours", "votes", "votesUp", "votesDown", "expireAt", "verified", "verifiedDate", "verificationId", "notificationSentForParent", "notificationSentForParentTenant", "reviewed", "imported", "externalId", "externalParentId", "avatarSrc", "isSpam", "permNotSpam", "aiDeterminedSpam", "hasImages", "pageNumber", "pageNumberOF", "pageNumberNF", "hasLinks", "hasCode", "approved", "locale", "isDeleted", "isDeletedUser", "isBannedUser", "isByAdmin", "isByModerator", "isPinned", "isLocked", "flagCount", "rating", "displayLabel", "fromProductId", "meta", "ipHash", "mentions", "hashTags", "badges", "domain", "veteranBadgeProcessed", "moderationGroupIds", "didProcessBadges", "fromOfflineRestore", "autoplayJobId", "autoplayDelayMS", "feedbackIds", "logs", "groupIds", "viewCount", "requiresVerification", "editKey", "tosAcceptedAt", "botId")); + openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "urlId", "urlIdRaw", "url", "pageTitle", "userId", "anonUserId", "commenterEmail", "commenterName", "commenterLink", "comment", "commentHTML", "parentId", "date", "localDateString", "localDateHours", "votes", "votesUp", "votesDown", "expireAt", "verified", "verifiedDate", "verificationId", "notificationSentForParent", "notificationSentForParentTenant", "reviewed", "imported", "externalId", "externalParentId", "avatarSrc", "isSpam", "permNotSpam", "aiDeterminedSpam", "hasImages", "pageNumber", "pageNumberOF", "pageNumberNF", "hasLinks", "hasCode", "approved", "locale", "detectedLanguage", "translations", "isDeleted", "isDeletedUser", "isBannedUser", "isByAdmin", "isByModerator", "isPinned", "isLocked", "flagCount", "rating", "displayLabel", "fromProductId", "meta", "ipHash", "mentions", "hashTags", "badges", "domain", "veteranBadgeProcessed", "moderationGroupIds", "didProcessBadges", "fromOfflineRestore", "autoplayJobId", "autoplayDelayMS", "feedbackIds", "poll", "logs", "groupIds", "viewCount", "requiresVerification", "editKey", "tosAcceptedAt", "botId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("_id", "tenantId", "urlId", "url", "commenterName", "comment", "commentHTML", "date", "verified", "approved", "locale")); @@ -2148,6 +2238,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("locale") != null && !jsonObj.get("locale").isJsonNull()) && !jsonObj.get("locale").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locale").toString())); } + if ((jsonObj.get("detectedLanguage") != null && !jsonObj.get("detectedLanguage").isJsonNull()) && !jsonObj.get("detectedLanguage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `detectedLanguage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("detectedLanguage").toString())); + } if ((jsonObj.get("displayLabel") != null && !jsonObj.get("displayLabel").isJsonNull()) && !jsonObj.get("displayLabel").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayLabel").toString())); } @@ -2213,6 +2306,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("feedbackIds") != null && !jsonObj.get("feedbackIds").isJsonNull() && !jsonObj.get("feedbackIds").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `feedbackIds` to be an array in the JSON string but got `%s`", jsonObj.get("feedbackIds").toString())); } + // validate the optional field `poll` + if (jsonObj.get("poll") != null && !jsonObj.get("poll").isJsonNull()) { + CommentPoll.validateJsonElement(jsonObj.get("poll")); + } if (jsonObj.get("logs") != null && !jsonObj.get("logs").isJsonNull()) { JsonArray jsonArraylogs = jsonObj.getAsJsonArray("logs"); if (jsonArraylogs != null) { diff --git a/client/src/main/java/com/fastcomments/model/GetBatchJobAPIResponse.java b/client/src/main/java/com/fastcomments/model/GetBatchJobAPIResponse.java new file mode 100644 index 00000000..80caa351 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetBatchJobAPIResponse.java @@ -0,0 +1,379 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIBatchJob; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetBatchJobAPIResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetBatchJobAPIResponse { + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nullable + private String reason; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nullable + private String code; + + public static final String SERIALIZED_NAME_BATCH_JOB = "batchJob"; + @SerializedName(SERIALIZED_NAME_BATCH_JOB) + @javax.annotation.Nullable + private APIBatchJob batchJob; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private String status; + + public GetBatchJobAPIResponse() { + } + + public GetBatchJobAPIResponse reason(@javax.annotation.Nullable String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nullable + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nullable String reason) { + this.reason = reason; + } + + + public GetBatchJobAPIResponse code(@javax.annotation.Nullable String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = code; + } + + + public GetBatchJobAPIResponse batchJob(@javax.annotation.Nullable APIBatchJob batchJob) { + this.batchJob = batchJob; + return this; + } + + /** + * Get batchJob + * @return batchJob + */ + @javax.annotation.Nullable + public APIBatchJob getBatchJob() { + return batchJob; + } + + public void setBatchJob(@javax.annotation.Nullable APIBatchJob batchJob) { + this.batchJob = batchJob; + } + + + public GetBatchJobAPIResponse status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetBatchJobAPIResponse instance itself + */ + public GetBatchJobAPIResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetBatchJobAPIResponse getBatchJobAPIResponse = (GetBatchJobAPIResponse) o; + return Objects.equals(this.reason, getBatchJobAPIResponse.reason) && + Objects.equals(this.code, getBatchJobAPIResponse.code) && + Objects.equals(this.batchJob, getBatchJobAPIResponse.batchJob) && + Objects.equals(this.status, getBatchJobAPIResponse.status)&& + Objects.equals(this.additionalProperties, getBatchJobAPIResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(reason, code, batchJob, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetBatchJobAPIResponse {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" batchJob: ").append(toIndentedString(batchJob)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("reason", "code", "batchJob", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetBatchJobAPIResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetBatchJobAPIResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetBatchJobAPIResponse is not found in the empty JSON string", GetBatchJobAPIResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetBatchJobAPIResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + // validate the optional field `batchJob` + if (jsonObj.get("batchJob") != null && !jsonObj.get("batchJob").isJsonNull()) { + APIBatchJob.validateJsonElement(jsonObj.get("batchJob")); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetBatchJobAPIResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetBatchJobAPIResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetBatchJobAPIResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetBatchJobAPIResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetBatchJobAPIResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetBatchJobAPIResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetBatchJobAPIResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetBatchJobAPIResponse + * @throws IOException if the JSON string is invalid with respect to GetBatchJobAPIResponse + */ + public static GetBatchJobAPIResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetBatchJobAPIResponse.class); + } + + /** + * Convert an instance of GetBatchJobAPIResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/GetBatchJobsAPIResponse.java b/client/src/main/java/com/fastcomments/model/GetBatchJobsAPIResponse.java new file mode 100644 index 00000000..e65248c4 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetBatchJobsAPIResponse.java @@ -0,0 +1,399 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIBatchJob; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetBatchJobsAPIResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetBatchJobsAPIResponse { + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nullable + private String reason; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nullable + private String code; + + public static final String SERIALIZED_NAME_BATCH_JOBS = "batchJobs"; + @SerializedName(SERIALIZED_NAME_BATCH_JOBS) + @javax.annotation.Nullable + private List batchJobs = new ArrayList<>(); + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private String status; + + public GetBatchJobsAPIResponse() { + } + + public GetBatchJobsAPIResponse reason(@javax.annotation.Nullable String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nullable + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nullable String reason) { + this.reason = reason; + } + + + public GetBatchJobsAPIResponse code(@javax.annotation.Nullable String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = code; + } + + + public GetBatchJobsAPIResponse batchJobs(@javax.annotation.Nullable List batchJobs) { + this.batchJobs = batchJobs; + return this; + } + + public GetBatchJobsAPIResponse addBatchJobsItem(APIBatchJob batchJobsItem) { + if (this.batchJobs == null) { + this.batchJobs = new ArrayList<>(); + } + this.batchJobs.add(batchJobsItem); + return this; + } + + /** + * Newest first, 100 per page. + * @return batchJobs + */ + @javax.annotation.Nullable + public List getBatchJobs() { + return batchJobs; + } + + public void setBatchJobs(@javax.annotation.Nullable List batchJobs) { + this.batchJobs = batchJobs; + } + + + public GetBatchJobsAPIResponse status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetBatchJobsAPIResponse instance itself + */ + public GetBatchJobsAPIResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetBatchJobsAPIResponse getBatchJobsAPIResponse = (GetBatchJobsAPIResponse) o; + return Objects.equals(this.reason, getBatchJobsAPIResponse.reason) && + Objects.equals(this.code, getBatchJobsAPIResponse.code) && + Objects.equals(this.batchJobs, getBatchJobsAPIResponse.batchJobs) && + Objects.equals(this.status, getBatchJobsAPIResponse.status)&& + Objects.equals(this.additionalProperties, getBatchJobsAPIResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(reason, code, batchJobs, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetBatchJobsAPIResponse {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" batchJobs: ").append(toIndentedString(batchJobs)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("reason", "code", "batchJobs", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetBatchJobsAPIResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetBatchJobsAPIResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetBatchJobsAPIResponse is not found in the empty JSON string", GetBatchJobsAPIResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetBatchJobsAPIResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if (jsonObj.get("batchJobs") != null && !jsonObj.get("batchJobs").isJsonNull()) { + JsonArray jsonArraybatchJobs = jsonObj.getAsJsonArray("batchJobs"); + if (jsonArraybatchJobs != null) { + // ensure the json data is an array + if (!jsonObj.get("batchJobs").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `batchJobs` to be an array in the JSON string but got `%s`", jsonObj.get("batchJobs").toString())); + } + + // validate the optional field `batchJobs` (array) + for (int i = 0; i < jsonArraybatchJobs.size(); i++) { + APIBatchJob.validateJsonElement(jsonArraybatchJobs.get(i)); + }; + } + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetBatchJobsAPIResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetBatchJobsAPIResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetBatchJobsAPIResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetBatchJobsAPIResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetBatchJobsAPIResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetBatchJobsAPIResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetBatchJobsAPIResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetBatchJobsAPIResponse + * @throws IOException if the JSON string is invalid with respect to GetBatchJobsAPIResponse + */ + public static GetBatchJobsAPIResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetBatchJobsAPIResponse.class); + } + + /** + * Convert an instance of GetBatchJobsAPIResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/GetMeResponse.java b/client/src/main/java/com/fastcomments/model/GetMeResponse.java new file mode 100644 index 00000000..44a990cd --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetMeResponse.java @@ -0,0 +1,426 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.MeAuthType; +import com.fastcomments.model.OAuthScope; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetMeResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetMeResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenantId"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + @javax.annotation.Nonnull + private String tenantId; + + public static final String SERIALIZED_NAME_TENANT_NAME = "tenantName"; + @SerializedName(SERIALIZED_NAME_TENANT_NAME) + @javax.annotation.Nonnull + private String tenantName; + + public static final String SERIALIZED_NAME_AUTH_TYPE = "authType"; + @SerializedName(SERIALIZED_NAME_AUTH_TYPE) + @javax.annotation.Nonnull + private MeAuthType authType; + + public static final String SERIALIZED_NAME_SCOPES = "scopes"; + @SerializedName(SERIALIZED_NAME_SCOPES) + @javax.annotation.Nonnull + private List scopes = new ArrayList<>(); + + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nullable + private String userId; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public GetMeResponse() { + } + + public GetMeResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public GetMeResponse tenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get tenantId + * @return tenantId + */ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + public void setTenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + + public GetMeResponse tenantName(@javax.annotation.Nonnull String tenantName) { + this.tenantName = tenantName; + return this; + } + + /** + * Get tenantName + * @return tenantName + */ + @javax.annotation.Nonnull + public String getTenantName() { + return tenantName; + } + + public void setTenantName(@javax.annotation.Nonnull String tenantName) { + this.tenantName = tenantName; + } + + + public GetMeResponse authType(@javax.annotation.Nonnull MeAuthType authType) { + this.authType = authType; + return this; + } + + /** + * Get authType + * @return authType + */ + @javax.annotation.Nonnull + public MeAuthType getAuthType() { + return authType; + } + + public void setAuthType(@javax.annotation.Nonnull MeAuthType authType) { + this.authType = authType; + } + + + public GetMeResponse scopes(@javax.annotation.Nonnull List scopes) { + this.scopes = scopes; + return this; + } + + public GetMeResponse addScopesItem(OAuthScope scopesItem) { + if (this.scopes == null) { + this.scopes = new ArrayList<>(); + } + this.scopes.add(scopesItem); + return this; + } + + /** + * Get scopes + * @return scopes + */ + @javax.annotation.Nonnull + public List getScopes() { + return scopes; + } + + public void setScopes(@javax.annotation.Nonnull List scopes) { + this.scopes = scopes; + } + + + public GetMeResponse userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Only present for OAuth tokens: the user who authorized the application. + * @return userId + */ + @javax.annotation.Nullable + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nullable String userId) { + this.userId = userId; + } + + + public GetMeResponse username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + + public GetMeResponse email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMeResponse getMeResponse = (GetMeResponse) o; + return Objects.equals(this.status, getMeResponse.status) && + Objects.equals(this.tenantId, getMeResponse.tenantId) && + Objects.equals(this.tenantName, getMeResponse.tenantName) && + Objects.equals(this.authType, getMeResponse.authType) && + Objects.equals(this.scopes, getMeResponse.scopes) && + Objects.equals(this.userId, getMeResponse.userId) && + Objects.equals(this.username, getMeResponse.username) && + Objects.equals(this.email, getMeResponse.email); + } + + @Override + public int hashCode() { + return Objects.hash(status, tenantId, tenantName, authType, scopes, userId, username, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMeResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" tenantName: ").append(toIndentedString(tenantName)).append("\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "tenantId", "tenantName", "authType", "scopes", "userId", "username", "email")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "tenantId", "tenantName", "authType", "scopes")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetMeResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetMeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetMeResponse is not found in the empty JSON string", GetMeResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetMeResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GetMeResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetMeResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + if (!jsonObj.get("tenantId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tenantId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenantId").toString())); + } + if (!jsonObj.get("tenantName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tenantName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenantName").toString())); + } + // validate the required field `authType` + MeAuthType.validateJsonElement(jsonObj.get("authType")); + // ensure the required json array is present + if (jsonObj.get("scopes") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("scopes").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `scopes` to be an array in the JSON string but got `%s`", jsonObj.get("scopes").toString())); + } + if ((jsonObj.get("userId") != null && !jsonObj.get("userId").isJsonNull()) && !jsonObj.get("userId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetMeResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetMeResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetMeResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetMeResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetMeResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetMeResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetMeResponse + * @throws IOException if the JSON string is invalid with respect to GetMeResponse + */ + public static GetMeResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetMeResponse.class); + } + + /** + * Convert an instance of GetMeResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/GetPageLikesAPIResponse.java b/client/src/main/java/com/fastcomments/model/GetPageLikesAPIResponse.java new file mode 100644 index 00000000..7f4ae4ff --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetPageLikesAPIResponse.java @@ -0,0 +1,425 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.PageReactUser; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetPageLikesAPIResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetPageLikesAPIResponse { + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nullable + private String reason; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nullable + private String code; + + public static final String SERIALIZED_NAME_USERS = "users"; + @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nullable + private List users = new ArrayList<>(); + + public static final String SERIALIZED_NAME_LIKE_COUNT = "likeCount"; + @SerializedName(SERIALIZED_NAME_LIKE_COUNT) + @javax.annotation.Nullable + private Integer likeCount; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private String status; + + public GetPageLikesAPIResponse() { + } + + public GetPageLikesAPIResponse reason(@javax.annotation.Nullable String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nullable + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nullable String reason) { + this.reason = reason; + } + + + public GetPageLikesAPIResponse code(@javax.annotation.Nullable String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = code; + } + + + public GetPageLikesAPIResponse users(@javax.annotation.Nullable List users) { + this.users = users; + return this; + } + + public GetPageLikesAPIResponse addUsersItem(PageReactUser usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Most recent first. Present when includeUserInfo is passed. Capped at 100 reacts. + * @return users + */ + @javax.annotation.Nullable + public List getUsers() { + return users; + } + + public void setUsers(@javax.annotation.Nullable List users) { + this.users = users; + } + + + public GetPageLikesAPIResponse likeCount(@javax.annotation.Nullable Integer likeCount) { + this.likeCount = likeCount; + return this; + } + + /** + * Get likeCount + * @return likeCount + */ + @javax.annotation.Nullable + public Integer getLikeCount() { + return likeCount; + } + + public void setLikeCount(@javax.annotation.Nullable Integer likeCount) { + this.likeCount = likeCount; + } + + + public GetPageLikesAPIResponse status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetPageLikesAPIResponse instance itself + */ + public GetPageLikesAPIResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPageLikesAPIResponse getPageLikesAPIResponse = (GetPageLikesAPIResponse) o; + return Objects.equals(this.reason, getPageLikesAPIResponse.reason) && + Objects.equals(this.code, getPageLikesAPIResponse.code) && + Objects.equals(this.users, getPageLikesAPIResponse.users) && + Objects.equals(this.likeCount, getPageLikesAPIResponse.likeCount) && + Objects.equals(this.status, getPageLikesAPIResponse.status)&& + Objects.equals(this.additionalProperties, getPageLikesAPIResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(reason, code, users, likeCount, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetPageLikesAPIResponse {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append(" likeCount: ").append(toIndentedString(likeCount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("reason", "code", "users", "likeCount", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetPageLikesAPIResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetPageLikesAPIResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetPageLikesAPIResponse is not found in the empty JSON string", GetPageLikesAPIResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetPageLikesAPIResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { + JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); + if (jsonArrayusers != null) { + // ensure the json data is an array + if (!jsonObj.get("users").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + } + + // validate the optional field `users` (array) + for (int i = 0; i < jsonArrayusers.size(); i++) { + PageReactUser.validateJsonElement(jsonArrayusers.get(i)); + }; + } + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetPageLikesAPIResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetPageLikesAPIResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetPageLikesAPIResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetPageLikesAPIResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetPageLikesAPIResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetPageLikesAPIResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetPageLikesAPIResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetPageLikesAPIResponse + * @throws IOException if the JSON string is invalid with respect to GetPageLikesAPIResponse + */ + public static GetPageLikesAPIResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetPageLikesAPIResponse.class); + } + + /** + * Convert an instance of GetPageLikesAPIResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/GetPageReactsAPIResponse.java b/client/src/main/java/com/fastcomments/model/GetPageReactsAPIResponse.java new file mode 100644 index 00000000..053ab836 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetPageReactsAPIResponse.java @@ -0,0 +1,435 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.PageCustomReactUser; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetPageReactsAPIResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetPageReactsAPIResponse { + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nullable + private String reason; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nullable + private String code; + + public static final String SERIALIZED_NAME_USERS = "users"; + @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nullable + private List users = new ArrayList<>(); + + public static final String SERIALIZED_NAME_COUNTS = "counts"; + @SerializedName(SERIALIZED_NAME_COUNTS) + @javax.annotation.Nullable + private Map counts = new HashMap<>(); + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private String status; + + public GetPageReactsAPIResponse() { + } + + public GetPageReactsAPIResponse reason(@javax.annotation.Nullable String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nullable + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nullable String reason) { + this.reason = reason; + } + + + public GetPageReactsAPIResponse code(@javax.annotation.Nullable String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = code; + } + + + public GetPageReactsAPIResponse users(@javax.annotation.Nullable List users) { + this.users = users; + return this; + } + + public GetPageReactsAPIResponse addUsersItem(PageCustomReactUser usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * One entry per react, most recent first. Present when includeUserInfo is passed. Capped at 100 reacts. + * @return users + */ + @javax.annotation.Nullable + public List getUsers() { + return users; + } + + public void setUsers(@javax.annotation.Nullable List users) { + this.users = users; + } + + + public GetPageReactsAPIResponse counts(@javax.annotation.Nullable Map counts) { + this.counts = counts; + return this; + } + + public GetPageReactsAPIResponse putCountsItem(String key, Double countsItem) { + if (this.counts == null) { + this.counts = new HashMap<>(); + } + this.counts.put(key, countsItem); + return this; + } + + /** + * Construct a type with a set of properties K of type T + * @return counts + */ + @javax.annotation.Nullable + public Map getCounts() { + return counts; + } + + public void setCounts(@javax.annotation.Nullable Map counts) { + this.counts = counts; + } + + + public GetPageReactsAPIResponse status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetPageReactsAPIResponse instance itself + */ + public GetPageReactsAPIResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPageReactsAPIResponse getPageReactsAPIResponse = (GetPageReactsAPIResponse) o; + return Objects.equals(this.reason, getPageReactsAPIResponse.reason) && + Objects.equals(this.code, getPageReactsAPIResponse.code) && + Objects.equals(this.users, getPageReactsAPIResponse.users) && + Objects.equals(this.counts, getPageReactsAPIResponse.counts) && + Objects.equals(this.status, getPageReactsAPIResponse.status)&& + Objects.equals(this.additionalProperties, getPageReactsAPIResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(reason, code, users, counts, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetPageReactsAPIResponse {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append(" counts: ").append(toIndentedString(counts)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("reason", "code", "users", "counts", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetPageReactsAPIResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetPageReactsAPIResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetPageReactsAPIResponse is not found in the empty JSON string", GetPageReactsAPIResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetPageReactsAPIResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { + JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); + if (jsonArrayusers != null) { + // ensure the json data is an array + if (!jsonObj.get("users").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + } + + // validate the optional field `users` (array) + for (int i = 0; i < jsonArrayusers.size(); i++) { + PageCustomReactUser.validateJsonElement(jsonArrayusers.get(i)); + }; + } + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetPageReactsAPIResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetPageReactsAPIResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetPageReactsAPIResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetPageReactsAPIResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetPageReactsAPIResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetPageReactsAPIResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetPageReactsAPIResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetPageReactsAPIResponse + * @throws IOException if the JSON string is invalid with respect to GetPageReactsAPIResponse + */ + public static GetPageReactsAPIResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetPageReactsAPIResponse.class); + } + + /** + * Convert an instance of GetPageReactsAPIResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/GetPollResponse.java b/client/src/main/java/com/fastcomments/model/GetPollResponse.java new file mode 100644 index 00000000..930fbfd9 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetPollResponse.java @@ -0,0 +1,238 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentPoll; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetPollResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetPollResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nonnull + private CommentPoll poll; + + public GetPollResponse() { + } + + public GetPollResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public GetPollResponse poll(@javax.annotation.Nonnull CommentPoll poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nonnull + public CommentPoll getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nonnull CommentPoll poll) { + this.poll = poll; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPollResponse getPollResponse = (GetPollResponse) o; + return Objects.equals(this.status, getPollResponse.status) && + Objects.equals(this.poll, getPollResponse.poll); + } + + @Override + public int hashCode() { + return Objects.hash(status, poll); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetPollResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "poll")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "poll")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetPollResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetPollResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetPollResponse is not found in the empty JSON string", GetPollResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetPollResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GetPollResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetPollResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + // validate the required field `poll` + CommentPoll.validateJsonElement(jsonObj.get("poll")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetPollResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetPollResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetPollResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetPollResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetPollResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetPollResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetPollResponse + * @throws IOException if the JSON string is invalid with respect to GetPollResponse + */ + public static GetPollResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetPollResponse.class); + } + + /** + * Convert an instance of GetPollResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/GetPollVoteResponse.java b/client/src/main/java/com/fastcomments/model/GetPollVoteResponse.java new file mode 100644 index 00000000..0eae4c64 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetPollVoteResponse.java @@ -0,0 +1,238 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PublicPollVote; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetPollVoteResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetPollVoteResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_POLL_VOTE = "pollVote"; + @SerializedName(SERIALIZED_NAME_POLL_VOTE) + @javax.annotation.Nonnull + private PublicPollVote pollVote; + + public GetPollVoteResponse() { + } + + public GetPollVoteResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public GetPollVoteResponse pollVote(@javax.annotation.Nonnull PublicPollVote pollVote) { + this.pollVote = pollVote; + return this; + } + + /** + * Get pollVote + * @return pollVote + */ + @javax.annotation.Nonnull + public PublicPollVote getPollVote() { + return pollVote; + } + + public void setPollVote(@javax.annotation.Nonnull PublicPollVote pollVote) { + this.pollVote = pollVote; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPollVoteResponse getPollVoteResponse = (GetPollVoteResponse) o; + return Objects.equals(this.status, getPollVoteResponse.status) && + Objects.equals(this.pollVote, getPollVoteResponse.pollVote); + } + + @Override + public int hashCode() { + return Objects.hash(status, pollVote); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetPollVoteResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" pollVote: ").append(toIndentedString(pollVote)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "pollVote")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "pollVote")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetPollVoteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetPollVoteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetPollVoteResponse is not found in the empty JSON string", GetPollVoteResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetPollVoteResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GetPollVoteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetPollVoteResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + // validate the required field `pollVote` + PublicPollVote.validateJsonElement(jsonObj.get("pollVote")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetPollVoteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetPollVoteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetPollVoteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetPollVoteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetPollVoteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetPollVoteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetPollVoteResponse + * @throws IOException if the JSON string is invalid with respect to GetPollVoteResponse + */ + public static GetPollVoteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetPollVoteResponse.class); + } + + /** + * Convert an instance of GetPollVoteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/GetPollVotesResponse.java b/client/src/main/java/com/fastcomments/model/GetPollVotesResponse.java new file mode 100644 index 00000000..ed686bc9 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetPollVotesResponse.java @@ -0,0 +1,256 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PublicPollVote; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetPollVotesResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetPollVotesResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_POLL_VOTES = "pollVotes"; + @SerializedName(SERIALIZED_NAME_POLL_VOTES) + @javax.annotation.Nonnull + private List pollVotes = new ArrayList<>(); + + public GetPollVotesResponse() { + } + + public GetPollVotesResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public GetPollVotesResponse pollVotes(@javax.annotation.Nonnull List pollVotes) { + this.pollVotes = pollVotes; + return this; + } + + public GetPollVotesResponse addPollVotesItem(PublicPollVote pollVotesItem) { + if (this.pollVotes == null) { + this.pollVotes = new ArrayList<>(); + } + this.pollVotes.add(pollVotesItem); + return this; + } + + /** + * Get pollVotes + * @return pollVotes + */ + @javax.annotation.Nonnull + public List getPollVotes() { + return pollVotes; + } + + public void setPollVotes(@javax.annotation.Nonnull List pollVotes) { + this.pollVotes = pollVotes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPollVotesResponse getPollVotesResponse = (GetPollVotesResponse) o; + return Objects.equals(this.status, getPollVotesResponse.status) && + Objects.equals(this.pollVotes, getPollVotesResponse.pollVotes); + } + + @Override + public int hashCode() { + return Objects.hash(status, pollVotes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetPollVotesResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" pollVotes: ").append(toIndentedString(pollVotes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "pollVotes")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "pollVotes")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetPollVotesResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetPollVotesResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetPollVotesResponse is not found in the empty JSON string", GetPollVotesResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetPollVotesResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GetPollVotesResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetPollVotesResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + if (jsonObj.get("pollVotes") != null) { + if (!jsonObj.get("pollVotes").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pollVotes` to be an array in the JSON string but got `%s`", jsonObj.get("pollVotes").toString())); + } + JsonArray jsonArraypollVotes = jsonObj.getAsJsonArray("pollVotes"); + // validate the required field `pollVotes` (array) + for (int i = 0; i < jsonArraypollVotes.size(); i++) { + PublicPollVote.validateJsonElement(jsonArraypollVotes.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetPollVotesResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetPollVotesResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetPollVotesResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetPollVotesResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetPollVotesResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetPollVotesResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetPollVotesResponse + * @throws IOException if the JSON string is invalid with respect to GetPollVotesResponse + */ + public static GetPollVotesResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetPollVotesResponse.class); + } + + /** + * Convert an instance of GetPollVotesResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/GetTranslationsResponse.java b/client/src/main/java/com/fastcomments/model/GetTranslationsResponse.java index 7773d3a4..b7dbd4af 100644 --- a/client/src/main/java/com/fastcomments/model/GetTranslationsResponse.java +++ b/client/src/main/java/com/fastcomments/model/GetTranslationsResponse.java @@ -53,6 +53,11 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class GetTranslationsResponse { + public static final String SERIALIZED_NAME_LOCALE = "locale"; + @SerializedName(SERIALIZED_NAME_LOCALE) + @javax.annotation.Nonnull + private String locale; + public static final String SERIALIZED_NAME_TRANSLATIONS = "translations"; @SerializedName(SERIALIZED_NAME_TRANSLATIONS) @javax.annotation.Nonnull @@ -66,6 +71,25 @@ public class GetTranslationsResponse { public GetTranslationsResponse() { } + public GetTranslationsResponse locale(@javax.annotation.Nonnull String locale) { + this.locale = locale; + return this; + } + + /** + * The locale the translations were resolved for. Clients use it to set text direction. + * @return locale + */ + @javax.annotation.Nonnull + public String getLocale() { + return locale; + } + + public void setLocale(@javax.annotation.Nonnull String locale) { + this.locale = locale; + } + + public GetTranslationsResponse translations(@javax.annotation.Nonnull Map translations) { this.translations = translations; return this; @@ -166,20 +190,22 @@ public boolean equals(Object o) { return false; } GetTranslationsResponse getTranslationsResponse = (GetTranslationsResponse) o; - return Objects.equals(this.translations, getTranslationsResponse.translations) && + return Objects.equals(this.locale, getTranslationsResponse.locale) && + Objects.equals(this.translations, getTranslationsResponse.translations) && Objects.equals(this.status, getTranslationsResponse.status)&& Objects.equals(this.additionalProperties, getTranslationsResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(translations, status, additionalProperties); + return Objects.hash(locale, translations, status, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetTranslationsResponse {\n"); + sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); sb.append(" translations: ").append(toIndentedString(translations)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -201,10 +227,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("translations", "status")); + openapiFields = new HashSet(Arrays.asList("locale", "translations", "status")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("translations", "status")); + openapiRequiredFields = new HashSet(Arrays.asList("locale", "translations", "status")); } /** @@ -227,6 +253,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locale").toString())); + } // validate the required field `status` APIStatus.validateJsonElement(jsonObj.get("status")); } diff --git a/client/src/main/java/com/fastcomments/model/GetV1PageLikes.java b/client/src/main/java/com/fastcomments/model/GetV1PageLikes.java index e0197b40..c423c40b 100644 --- a/client/src/main/java/com/fastcomments/model/GetV1PageLikes.java +++ b/client/src/main/java/com/fastcomments/model/GetV1PageLikes.java @@ -15,13 +15,16 @@ import java.util.Objects; import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageReactUser; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -51,6 +54,11 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class GetV1PageLikes { + public static final String SERIALIZED_NAME_USERS = "users"; + @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nullable + private List users = new ArrayList<>(); + public static final String SERIALIZED_NAME_URL_ID_W_S = "urlIdWS"; @SerializedName(SERIALIZED_NAME_URL_ID_W_S) @javax.annotation.Nonnull @@ -79,6 +87,33 @@ public class GetV1PageLikes { public GetV1PageLikes() { } + public GetV1PageLikes users(@javax.annotation.Nullable List users) { + this.users = users; + return this; + } + + public GetV1PageLikes addUsersItem(PageReactUser usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Most recent first. Present when includeUserInfo is passed. Capped at 100 reacts. + * @return users + */ + @javax.annotation.Nullable + public List getUsers() { + return users; + } + + public void setUsers(@javax.annotation.Nullable List users) { + this.users = users; + } + + public GetV1PageLikes urlIdWS(@javax.annotation.Nonnull String urlIdWS) { this.urlIdWS = urlIdWS; return this; @@ -228,7 +263,8 @@ public boolean equals(Object o) { return false; } GetV1PageLikes getV1PageLikes = (GetV1PageLikes) o; - return Objects.equals(this.urlIdWS, getV1PageLikes.urlIdWS) && + return Objects.equals(this.users, getV1PageLikes.users) && + Objects.equals(this.urlIdWS, getV1PageLikes.urlIdWS) && Objects.equals(this.didLike, getV1PageLikes.didLike) && Objects.equals(this.commentCount, getV1PageLikes.commentCount) && Objects.equals(this.likeCount, getV1PageLikes.likeCount) && @@ -238,13 +274,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(urlIdWS, didLike, commentCount, likeCount, status, additionalProperties); + return Objects.hash(users, urlIdWS, didLike, commentCount, likeCount, status, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetV1PageLikes {\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); sb.append(" urlIdWS: ").append(toIndentedString(urlIdWS)).append("\n"); sb.append(" didLike: ").append(toIndentedString(didLike)).append("\n"); sb.append(" commentCount: ").append(toIndentedString(commentCount)).append("\n"); @@ -269,7 +306,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("urlIdWS", "didLike", "commentCount", "likeCount", "status")); + openapiFields = new HashSet(Arrays.asList("users", "urlIdWS", "didLike", "commentCount", "likeCount", "status")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("urlIdWS", "didLike", "commentCount", "likeCount", "status")); @@ -295,6 +332,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { + JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); + if (jsonArrayusers != null) { + // ensure the json data is an array + if (!jsonObj.get("users").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + } + + // validate the optional field `users` (array) + for (int i = 0; i < jsonArrayusers.size(); i++) { + PageReactUser.validateJsonElement(jsonArrayusers.get(i)); + }; + } + } if (!jsonObj.get("urlIdWS").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `urlIdWS` to be a primitive type in the JSON string but got `%s`", jsonObj.get("urlIdWS").toString())); } diff --git a/client/src/main/java/com/fastcomments/model/GetV2PageReacts.java b/client/src/main/java/com/fastcomments/model/GetV2PageReacts.java index 839afecc..c399c218 100644 --- a/client/src/main/java/com/fastcomments/model/GetV2PageReacts.java +++ b/client/src/main/java/com/fastcomments/model/GetV2PageReacts.java @@ -15,6 +15,7 @@ import java.util.Objects; import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageCustomReactUser; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -55,6 +56,11 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class GetV2PageReacts { + public static final String SERIALIZED_NAME_USERS = "users"; + @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nullable + private List users = new ArrayList<>(); + public static final String SERIALIZED_NAME_REACTED_IDS = "reactedIds"; @SerializedName(SERIALIZED_NAME_REACTED_IDS) @javax.annotation.Nullable @@ -73,6 +79,33 @@ public class GetV2PageReacts { public GetV2PageReacts() { } + public GetV2PageReacts users(@javax.annotation.Nullable List users) { + this.users = users; + return this; + } + + public GetV2PageReacts addUsersItem(PageCustomReactUser usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * One entry per react, most recent first. Present when includeUserInfo is passed. Capped at 100 reacts. + * @return users + */ + @javax.annotation.Nullable + public List getUsers() { + return users; + } + + public void setUsers(@javax.annotation.Nullable List users) { + this.users = users; + } + + public GetV2PageReacts reactedIds(@javax.annotation.Nullable List reactedIds) { this.reactedIds = reactedIds; return this; @@ -200,7 +233,8 @@ public boolean equals(Object o) { return false; } GetV2PageReacts getV2PageReacts = (GetV2PageReacts) o; - return Objects.equals(this.reactedIds, getV2PageReacts.reactedIds) && + return Objects.equals(this.users, getV2PageReacts.users) && + Objects.equals(this.reactedIds, getV2PageReacts.reactedIds) && Objects.equals(this.counts, getV2PageReacts.counts) && Objects.equals(this.status, getV2PageReacts.status)&& Objects.equals(this.additionalProperties, getV2PageReacts.additionalProperties); @@ -208,13 +242,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(reactedIds, counts, status, additionalProperties); + return Objects.hash(users, reactedIds, counts, status, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetV2PageReacts {\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); sb.append(" reactedIds: ").append(toIndentedString(reactedIds)).append("\n"); sb.append(" counts: ").append(toIndentedString(counts)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); @@ -237,7 +272,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("reactedIds", "counts", "status")); + openapiFields = new HashSet(Arrays.asList("users", "reactedIds", "counts", "status")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("status")); @@ -263,6 +298,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { + JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); + if (jsonArrayusers != null) { + // ensure the json data is an array + if (!jsonObj.get("users").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + } + + // validate the optional field `users` (array) + for (int i = 0; i < jsonArrayusers.size(); i++) { + PageCustomReactUser.validateJsonElement(jsonArrayusers.get(i)); + }; + } + } // ensure the optional json data is an array if present if (jsonObj.get("reactedIds") != null && !jsonObj.get("reactedIds").isJsonNull() && !jsonObj.get("reactedIds").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reactedIds` to be an array in the JSON string but got `%s`", jsonObj.get("reactedIds").toString())); diff --git a/client/src/main/java/com/fastcomments/model/GetWebhookSamplePayloadsResponse.java b/client/src/main/java/com/fastcomments/model/GetWebhookSamplePayloadsResponse.java new file mode 100644 index 00000000..3bc521e7 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetWebhookSamplePayloadsResponse.java @@ -0,0 +1,256 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.WebhookComment; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetWebhookSamplePayloadsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetWebhookSamplePayloadsResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_PAYLOADS = "payloads"; + @SerializedName(SERIALIZED_NAME_PAYLOADS) + @javax.annotation.Nonnull + private List payloads = new ArrayList<>(); + + public GetWebhookSamplePayloadsResponse() { + } + + public GetWebhookSamplePayloadsResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public GetWebhookSamplePayloadsResponse payloads(@javax.annotation.Nonnull List payloads) { + this.payloads = payloads; + return this; + } + + public GetWebhookSamplePayloadsResponse addPayloadsItem(WebhookComment payloadsItem) { + if (this.payloads == null) { + this.payloads = new ArrayList<>(); + } + this.payloads.add(payloadsItem); + return this; + } + + /** + * Get payloads + * @return payloads + */ + @javax.annotation.Nonnull + public List getPayloads() { + return payloads; + } + + public void setPayloads(@javax.annotation.Nonnull List payloads) { + this.payloads = payloads; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWebhookSamplePayloadsResponse getWebhookSamplePayloadsResponse = (GetWebhookSamplePayloadsResponse) o; + return Objects.equals(this.status, getWebhookSamplePayloadsResponse.status) && + Objects.equals(this.payloads, getWebhookSamplePayloadsResponse.payloads); + } + + @Override + public int hashCode() { + return Objects.hash(status, payloads); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetWebhookSamplePayloadsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" payloads: ").append(toIndentedString(payloads)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "payloads")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "payloads")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetWebhookSamplePayloadsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetWebhookSamplePayloadsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetWebhookSamplePayloadsResponse is not found in the empty JSON string", GetWebhookSamplePayloadsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetWebhookSamplePayloadsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GetWebhookSamplePayloadsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetWebhookSamplePayloadsResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + if (jsonObj.get("payloads") != null) { + if (!jsonObj.get("payloads").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `payloads` to be an array in the JSON string but got `%s`", jsonObj.get("payloads").toString())); + } + JsonArray jsonArraypayloads = jsonObj.getAsJsonArray("payloads"); + // validate the required field `payloads` (array) + for (int i = 0; i < jsonArraypayloads.size(); i++) { + WebhookComment.validateJsonElement(jsonArraypayloads.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetWebhookSamplePayloadsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetWebhookSamplePayloadsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetWebhookSamplePayloadsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetWebhookSamplePayloadsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetWebhookSamplePayloadsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetWebhookSamplePayloadsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetWebhookSamplePayloadsResponse + * @throws IOException if the JSON string is invalid with respect to GetWebhookSamplePayloadsResponse + */ + public static GetWebhookSamplePayloadsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetWebhookSamplePayloadsResponse.class); + } + + /** + * Convert an instance of GetWebhookSamplePayloadsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/GetWebhooksResponse.java b/client/src/main/java/com/fastcomments/model/GetWebhooksResponse.java new file mode 100644 index 00000000..8a4be650 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/GetWebhooksResponse.java @@ -0,0 +1,256 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PublicWebhook; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * GetWebhooksResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class GetWebhooksResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_WEBHOOKS = "webhooks"; + @SerializedName(SERIALIZED_NAME_WEBHOOKS) + @javax.annotation.Nonnull + private List webhooks = new ArrayList<>(); + + public GetWebhooksResponse() { + } + + public GetWebhooksResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public GetWebhooksResponse webhooks(@javax.annotation.Nonnull List webhooks) { + this.webhooks = webhooks; + return this; + } + + public GetWebhooksResponse addWebhooksItem(PublicWebhook webhooksItem) { + if (this.webhooks == null) { + this.webhooks = new ArrayList<>(); + } + this.webhooks.add(webhooksItem); + return this; + } + + /** + * Get webhooks + * @return webhooks + */ + @javax.annotation.Nonnull + public List getWebhooks() { + return webhooks; + } + + public void setWebhooks(@javax.annotation.Nonnull List webhooks) { + this.webhooks = webhooks; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWebhooksResponse getWebhooksResponse = (GetWebhooksResponse) o; + return Objects.equals(this.status, getWebhooksResponse.status) && + Objects.equals(this.webhooks, getWebhooksResponse.webhooks); + } + + @Override + public int hashCode() { + return Objects.hash(status, webhooks); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetWebhooksResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" webhooks: ").append(toIndentedString(webhooks)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "webhooks")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "webhooks")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetWebhooksResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetWebhooksResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetWebhooksResponse is not found in the empty JSON string", GetWebhooksResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetWebhooksResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GetWebhooksResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetWebhooksResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + if (jsonObj.get("webhooks") != null) { + if (!jsonObj.get("webhooks").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `webhooks` to be an array in the JSON string but got `%s`", jsonObj.get("webhooks").toString())); + } + JsonArray jsonArraywebhooks = jsonObj.getAsJsonArray("webhooks"); + // validate the required field `webhooks` (array) + for (int i = 0; i < jsonArraywebhooks.size(); i++) { + PublicWebhook.validateJsonElement(jsonArraywebhooks.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetWebhooksResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetWebhooksResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetWebhooksResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetWebhooksResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetWebhooksResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetWebhooksResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetWebhooksResponse + * @throws IOException if the JSON string is invalid with respect to GetWebhooksResponse + */ + public static GetWebhooksResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetWebhooksResponse.class); + } + + /** + * Convert an instance of GetWebhooksResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/ImportedSiteType.java b/client/src/main/java/com/fastcomments/model/ImportedSiteType.java index cd8815b2..e7743699 100644 --- a/client/src/main/java/com/fastcomments/model/ImportedSiteType.java +++ b/client/src/main/java/com/fastcomments/model/ImportedSiteType.java @@ -31,7 +31,9 @@ public enum ImportedSiteType { NUMBER_0(0), - NUMBER_1(1); + NUMBER_1(1), + + NUMBER_2(2); private Integer value; diff --git a/client/src/main/java/com/fastcomments/model/LiveEvent.java b/client/src/main/java/com/fastcomments/model/LiveEvent.java index 3886e4db..a520466d 100644 --- a/client/src/main/java/com/fastcomments/model/LiveEvent.java +++ b/client/src/main/java/com/fastcomments/model/LiveEvent.java @@ -18,6 +18,7 @@ import com.fastcomments.model.FeedPost; import com.fastcomments.model.LiveEventExtraInfo; import com.fastcomments.model.LiveEventType; +import com.fastcomments.model.PickCommentPollOptionsOrTotalVotesOrClosesAt; import com.fastcomments.model.PubSubComment; import com.fastcomments.model.PubSubVote; import com.fastcomments.model.UserNotification; @@ -111,6 +112,16 @@ public class LiveEvent { @javax.annotation.Nullable private FeedPost feedPost; + public static final String SERIALIZED_NAME_COMMENT_ID = "commentId"; + @SerializedName(SERIALIZED_NAME_COMMENT_ID) + @javax.annotation.Nullable + private String commentId; + + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nullable + private PickCommentPollOptionsOrTotalVotesOrClosesAt poll; + public static final String SERIALIZED_NAME_EXTRA_INFO = "extraInfo"; @SerializedName(SERIALIZED_NAME_EXTRA_INFO) @javax.annotation.Nullable @@ -347,6 +358,44 @@ public void setFeedPost(@javax.annotation.Nullable FeedPost feedPost) { } + public LiveEvent commentId(@javax.annotation.Nullable String commentId) { + this.commentId = commentId; + return this; + } + + /** + * Get commentId + * @return commentId + */ + @javax.annotation.Nullable + public String getCommentId() { + return commentId; + } + + public void setCommentId(@javax.annotation.Nullable String commentId) { + this.commentId = commentId; + } + + + public LiveEvent poll(@javax.annotation.Nullable PickCommentPollOptionsOrTotalVotesOrClosesAt poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nullable + public PickCommentPollOptionsOrTotalVotesOrClosesAt getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nullable PickCommentPollOptionsOrTotalVotesOrClosesAt poll) { + this.poll = poll; + } + + public LiveEvent extraInfo(@javax.annotation.Nullable LiveEventExtraInfo extraInfo) { this.extraInfo = extraInfo; return this; @@ -524,6 +573,8 @@ public boolean equals(Object o) { Objects.equals(this.vote, liveEvent.vote) && Objects.equals(this.comment, liveEvent.comment) && Objects.equals(this.feedPost, liveEvent.feedPost) && + Objects.equals(this.commentId, liveEvent.commentId) && + Objects.equals(this.poll, liveEvent.poll) && Objects.equals(this.extraInfo, liveEvent.extraInfo) && Objects.equals(this.config, liveEvent.config) && Objects.equals(this.isClosed, liveEvent.isClosed) && @@ -535,7 +586,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, timestamp, ts, broadcastId, userId, badges, notification, vote, comment, feedPost, extraInfo, config, isClosed, uj, ul, sc, changes); + return Objects.hash(type, timestamp, ts, broadcastId, userId, badges, notification, vote, comment, feedPost, commentId, poll, extraInfo, config, isClosed, uj, ul, sc, changes); } @Override @@ -552,6 +603,8 @@ public String toString() { sb.append(" vote: ").append(toIndentedString(vote)).append("\n"); sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); sb.append(" feedPost: ").append(toIndentedString(feedPost)).append("\n"); + sb.append(" commentId: ").append(toIndentedString(commentId)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); sb.append(" extraInfo: ").append(toIndentedString(extraInfo)).append("\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append(" isClosed: ").append(toIndentedString(isClosed)).append("\n"); @@ -577,7 +630,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "timestamp", "ts", "broadcastId", "userId", "badges", "notification", "vote", "comment", "feedPost", "extraInfo", "config", "isClosed", "uj", "ul", "sc", "changes")); + openapiFields = new HashSet(Arrays.asList("type", "timestamp", "ts", "broadcastId", "userId", "badges", "notification", "vote", "comment", "feedPost", "commentId", "poll", "extraInfo", "config", "isClosed", "uj", "ul", "sc", "changes")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("type")); @@ -649,6 +702,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("feedPost") != null && !jsonObj.get("feedPost").isJsonNull()) { FeedPost.validateJsonElement(jsonObj.get("feedPost")); } + if ((jsonObj.get("commentId") != null && !jsonObj.get("commentId").isJsonNull()) && !jsonObj.get("commentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentId").toString())); + } + // validate the optional field `poll` + if (jsonObj.get("poll") != null && !jsonObj.get("poll").isJsonNull()) { + PickCommentPollOptionsOrTotalVotesOrClosesAt.validateJsonElement(jsonObj.get("poll")); + } // validate the optional field `extraInfo` if (jsonObj.get("extraInfo") != null && !jsonObj.get("extraInfo").isJsonNull()) { LiveEventExtraInfo.validateJsonElement(jsonObj.get("extraInfo")); diff --git a/client/src/main/java/com/fastcomments/model/LiveEventType.java b/client/src/main/java/com/fastcomments/model/LiveEventType.java index 8412779c..3adf24cc 100644 --- a/client/src/main/java/com/fastcomments/model/LiveEventType.java +++ b/client/src/main/java/com/fastcomments/model/LiveEventType.java @@ -73,7 +73,9 @@ public enum LiveEventType { PAGE_REACT("page-react"), - QUESTION_RESULT("question-result"); + QUESTION_RESULT("question-result"), + + POLL_UPDATE("poll-update"); private String value; diff --git a/client/src/main/java/com/fastcomments/model/MeAuthType.java b/client/src/main/java/com/fastcomments/model/MeAuthType.java new file mode 100644 index 00000000..bc680dd1 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/MeAuthType.java @@ -0,0 +1,78 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets MeAuthType + */ +@JsonAdapter(MeAuthType.Adapter.class) +public enum MeAuthType { + + API_KEY("api-key"), + + OAUTH("oauth"); + + private String value; + + MeAuthType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MeAuthType fromValue(String value) { + for (MeAuthType b : MeAuthType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MeAuthType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MeAuthType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MeAuthType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MeAuthType.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/MigrateAPIPagesData.java b/client/src/main/java/com/fastcomments/model/MigrateAPIPagesData.java new file mode 100644 index 00000000..602e6bf3 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/MigrateAPIPagesData.java @@ -0,0 +1,308 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.PageMigration; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * MigrateAPIPagesData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class MigrateAPIPagesData { + public static final String SERIALIZED_NAME_MIGRATIONS = "migrations"; + @SerializedName(SERIALIZED_NAME_MIGRATIONS) + @javax.annotation.Nonnull + private List migrations = new ArrayList<>(); + + public MigrateAPIPagesData() { + } + + public MigrateAPIPagesData migrations(@javax.annotation.Nonnull List migrations) { + this.migrations = migrations; + return this; + } + + public MigrateAPIPagesData addMigrationsItem(PageMigration migrationsItem) { + if (this.migrations == null) { + this.migrations = new ArrayList<>(); + } + this.migrations.add(migrationsItem); + return this; + } + + /** + * Run in the order given, so a -> b then b -> c works. At most 100. + * @return migrations + */ + @javax.annotation.Nonnull + public List getMigrations() { + return migrations; + } + + public void setMigrations(@javax.annotation.Nonnull List migrations) { + this.migrations = migrations; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MigrateAPIPagesData instance itself + */ + public MigrateAPIPagesData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MigrateAPIPagesData migrateAPIPagesData = (MigrateAPIPagesData) o; + return Objects.equals(this.migrations, migrateAPIPagesData.migrations)&& + Objects.equals(this.additionalProperties, migrateAPIPagesData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(migrations, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MigrateAPIPagesData {\n"); + sb.append(" migrations: ").append(toIndentedString(migrations)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("migrations")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("migrations")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MigrateAPIPagesData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MigrateAPIPagesData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MigrateAPIPagesData is not found in the empty JSON string", MigrateAPIPagesData.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MigrateAPIPagesData.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("migrations") != null) { + if (!jsonObj.get("migrations").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `migrations` to be an array in the JSON string but got `%s`", jsonObj.get("migrations").toString())); + } + JsonArray jsonArraymigrations = jsonObj.getAsJsonArray("migrations"); + // validate the required field `migrations` (array) + for (int i = 0; i < jsonArraymigrations.size(); i++) { + PageMigration.validateJsonElement(jsonArraymigrations.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MigrateAPIPagesData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MigrateAPIPagesData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MigrateAPIPagesData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MigrateAPIPagesData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MigrateAPIPagesData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MigrateAPIPagesData instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MigrateAPIPagesData given an JSON string + * + * @param jsonString JSON string + * @return An instance of MigrateAPIPagesData + * @throws IOException if the JSON string is invalid with respect to MigrateAPIPagesData + */ + public static MigrateAPIPagesData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MigrateAPIPagesData.class); + } + + /** + * Convert an instance of MigrateAPIPagesData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/NotificationSkipReason.java b/client/src/main/java/com/fastcomments/model/NotificationSkipReason.java new file mode 100644 index 00000000..8a82085c --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/NotificationSkipReason.java @@ -0,0 +1,106 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets NotificationSkipReason + */ +@JsonAdapter(NotificationSkipReason.Adapter.class) +public enum NotificationSkipReason { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2), + + NUMBER_3(3), + + NUMBER_4(4), + + NUMBER_5(5), + + NUMBER_6(6), + + NUMBER_7(7), + + NUMBER_8(8), + + NUMBER_9(9), + + NUMBER_10(10), + + NUMBER_11(11), + + NUMBER_12(12), + + NUMBER_13(13), + + NUMBER_14(14), + + NUMBER_15(15); + + private Integer value; + + NotificationSkipReason(Integer value) { + this.value = value; + } + + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NotificationSkipReason fromValue(Integer value) { + for (NotificationSkipReason b : NotificationSkipReason.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NotificationSkipReason enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NotificationSkipReason read(final JsonReader jsonReader) throws IOException { + Integer value = jsonReader.nextInt(); + return NotificationSkipReason.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + Integer value = jsonElement.getAsInt(); + NotificationSkipReason.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/NotificationType.java b/client/src/main/java/com/fastcomments/model/NotificationType.java index 95686692..5e944eb0 100644 --- a/client/src/main/java/com/fastcomments/model/NotificationType.java +++ b/client/src/main/java/com/fastcomments/model/NotificationType.java @@ -53,7 +53,11 @@ public enum NotificationType { NUMBER_9(9), - NUMBER_10(10); + NUMBER_10(10), + + NUMBER_11(11), + + NUMBER_12(12); private Integer value; diff --git a/client/src/main/java/com/fastcomments/model/OAuthScope.java b/client/src/main/java/com/fastcomments/model/OAuthScope.java new file mode 100644 index 00000000..322b1863 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/OAuthScope.java @@ -0,0 +1,78 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets OAuthScope + */ +@JsonAdapter(OAuthScope.Adapter.class) +public enum OAuthScope { + + READ("read"), + + WRITE("write"); + + private String value; + + OAuthScope(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OAuthScope fromValue(String value) { + for (OAuthScope b : OAuthScope.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OAuthScope enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OAuthScope read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OAuthScope.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OAuthScope.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PageCustomReactUser.java b/client/src/main/java/com/fastcomments/model/PageCustomReactUser.java new file mode 100644 index 00000000..410da71b --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PageCustomReactUser.java @@ -0,0 +1,406 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * PageCustomReactUser + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class PageCustomReactUser { + public static final String SERIALIZED_NAME_AVATAR_SRC = "avatarSrc"; + @SerializedName(SERIALIZED_NAME_AVATAR_SRC) + @javax.annotation.Nullable + private String avatarSrc; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull + private String userId; + + public static final String SERIALIZED_NAME_REACT_ID = "reactId"; + @SerializedName(SERIALIZED_NAME_REACT_ID) + @javax.annotation.Nonnull + private String reactId; + + public PageCustomReactUser() { + } + + public PageCustomReactUser avatarSrc(@javax.annotation.Nullable String avatarSrc) { + this.avatarSrc = avatarSrc; + return this; + } + + /** + * Get avatarSrc + * @return avatarSrc + */ + @javax.annotation.Nullable + public String getAvatarSrc() { + return avatarSrc; + } + + public void setAvatarSrc(@javax.annotation.Nullable String avatarSrc) { + this.avatarSrc = avatarSrc; + } + + + public PageCustomReactUser displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public PageCustomReactUser username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + + public PageCustomReactUser userId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + } + + + public PageCustomReactUser reactId(@javax.annotation.Nonnull String reactId) { + this.reactId = reactId; + return this; + } + + /** + * Get reactId + * @return reactId + */ + @javax.annotation.Nonnull + public String getReactId() { + return reactId; + } + + public void setReactId(@javax.annotation.Nonnull String reactId) { + this.reactId = reactId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PageCustomReactUser instance itself + */ + public PageCustomReactUser putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageCustomReactUser pageCustomReactUser = (PageCustomReactUser) o; + return Objects.equals(this.avatarSrc, pageCustomReactUser.avatarSrc) && + Objects.equals(this.displayName, pageCustomReactUser.displayName) && + Objects.equals(this.username, pageCustomReactUser.username) && + Objects.equals(this.userId, pageCustomReactUser.userId) && + Objects.equals(this.reactId, pageCustomReactUser.reactId)&& + Objects.equals(this.additionalProperties, pageCustomReactUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(avatarSrc, displayName, username, userId, reactId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageCustomReactUser {\n"); + sb.append(" avatarSrc: ").append(toIndentedString(avatarSrc)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" reactId: ").append(toIndentedString(reactId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("avatarSrc", "displayName", "username", "userId", "reactId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("username", "userId", "reactId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PageCustomReactUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PageCustomReactUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PageCustomReactUser is not found in the empty JSON string", PageCustomReactUser.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PageCustomReactUser.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("avatarSrc") != null && !jsonObj.get("avatarSrc").isJsonNull()) && !jsonObj.get("avatarSrc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `avatarSrc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatarSrc").toString())); + } + if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (!jsonObj.get("userId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + if (!jsonObj.get("reactId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reactId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reactId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PageCustomReactUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PageCustomReactUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PageCustomReactUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PageCustomReactUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PageCustomReactUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PageCustomReactUser instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PageCustomReactUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of PageCustomReactUser + * @throws IOException if the JSON string is invalid with respect to PageCustomReactUser + */ + public static PageCustomReactUser fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PageCustomReactUser.class); + } + + /** + * Convert an instance of PageCustomReactUser to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PageMigration.java b/client/src/main/java/com/fastcomments/model/PageMigration.java new file mode 100644 index 00000000..43972f3e --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PageMigration.java @@ -0,0 +1,267 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.PageMigrationType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * PageMigration + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class PageMigration { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_TO = "to"; + @SerializedName(SERIALIZED_NAME_TO) + @javax.annotation.Nonnull + private String to; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private PageMigrationType type; + + public PageMigration() { + } + + public PageMigration from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * Get from + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public PageMigration to(@javax.annotation.Nonnull String to) { + this.to = to; + return this; + } + + /** + * Get to + * @return to + */ + @javax.annotation.Nonnull + public String getTo() { + return to; + } + + public void setTo(@javax.annotation.Nonnull String to) { + this.to = to; + } + + + public PageMigration type(@javax.annotation.Nonnull PageMigrationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public PageMigrationType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull PageMigrationType type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageMigration pageMigration = (PageMigration) o; + return Objects.equals(this.from, pageMigration.from) && + Objects.equals(this.to, pageMigration.to) && + Objects.equals(this.type, pageMigration.type); + } + + @Override + public int hashCode() { + return Objects.hash(from, to, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageMigration {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "to", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "to", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PageMigration + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PageMigration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PageMigration is not found in the empty JSON string", PageMigration.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PageMigration.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PageMigration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PageMigration.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("from").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + } + if (!jsonObj.get("to").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + } + // validate the required field `type` + PageMigrationType.validateJsonElement(jsonObj.get("type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PageMigration.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PageMigration' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PageMigration.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PageMigration value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PageMigration read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PageMigration given an JSON string + * + * @param jsonString JSON string + * @return An instance of PageMigration + * @throws IOException if the JSON string is invalid with respect to PageMigration + */ + public static PageMigration fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PageMigration.class); + } + + /** + * Convert an instance of PageMigration to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PageMigrationFailure.java b/client/src/main/java/com/fastcomments/model/PageMigrationFailure.java new file mode 100644 index 00000000..0e7784d6 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PageMigrationFailure.java @@ -0,0 +1,354 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageMigrationType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * PageMigrationFailure + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class PageMigrationFailure { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_TO = "to"; + @SerializedName(SERIALIZED_NAME_TO) + @javax.annotation.Nonnull + private String to; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private PageMigrationType type; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nonnull + private String code; + + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nonnull + private String reason; + + public PageMigrationFailure() { + } + + public PageMigrationFailure from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * Get from + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public PageMigrationFailure to(@javax.annotation.Nonnull String to) { + this.to = to; + return this; + } + + /** + * Get to + * @return to + */ + @javax.annotation.Nonnull + public String getTo() { + return to; + } + + public void setTo(@javax.annotation.Nonnull String to) { + this.to = to; + } + + + public PageMigrationFailure type(@javax.annotation.Nonnull PageMigrationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public PageMigrationType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull PageMigrationType type) { + this.type = type; + } + + + public PageMigrationFailure status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public PageMigrationFailure code(@javax.annotation.Nonnull String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nonnull String code) { + this.code = code; + } + + + public PageMigrationFailure reason(@javax.annotation.Nonnull String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nonnull + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nonnull String reason) { + this.reason = reason; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageMigrationFailure pageMigrationFailure = (PageMigrationFailure) o; + return Objects.equals(this.from, pageMigrationFailure.from) && + Objects.equals(this.to, pageMigrationFailure.to) && + Objects.equals(this.type, pageMigrationFailure.type) && + Objects.equals(this.status, pageMigrationFailure.status) && + Objects.equals(this.code, pageMigrationFailure.code) && + Objects.equals(this.reason, pageMigrationFailure.reason); + } + + @Override + public int hashCode() { + return Objects.hash(from, to, type, status, code, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageMigrationFailure {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "to", "type", "status", "code", "reason")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "to", "type", "status", "code", "reason")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PageMigrationFailure + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PageMigrationFailure.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PageMigrationFailure is not found in the empty JSON string", PageMigrationFailure.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PageMigrationFailure.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PageMigrationFailure` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PageMigrationFailure.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("from").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + } + if (!jsonObj.get("to").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + } + // validate the required field `type` + PageMigrationType.validateJsonElement(jsonObj.get("type")); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if (!jsonObj.get("reason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PageMigrationFailure.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PageMigrationFailure' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PageMigrationFailure.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PageMigrationFailure value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PageMigrationFailure read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PageMigrationFailure given an JSON string + * + * @param jsonString JSON string + * @return An instance of PageMigrationFailure + * @throws IOException if the JSON string is invalid with respect to PageMigrationFailure + */ + public static PageMigrationFailure fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PageMigrationFailure.class); + } + + /** + * Convert an instance of PageMigrationFailure to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PageMigrationSuccess.java b/client/src/main/java/com/fastcomments/model/PageMigrationSuccess.java new file mode 100644 index 00000000..4177d6f6 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PageMigrationSuccess.java @@ -0,0 +1,322 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageMigrationType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * PageMigrationSuccess + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class PageMigrationSuccess { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_TO = "to"; + @SerializedName(SERIALIZED_NAME_TO) + @javax.annotation.Nonnull + private String to; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private PageMigrationType type; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_COMMENTS_MIGRATED = "commentsMigrated"; + @SerializedName(SERIALIZED_NAME_COMMENTS_MIGRATED) + @javax.annotation.Nonnull + private Integer commentsMigrated; + + public PageMigrationSuccess() { + } + + public PageMigrationSuccess from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * Get from + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public PageMigrationSuccess to(@javax.annotation.Nonnull String to) { + this.to = to; + return this; + } + + /** + * Get to + * @return to + */ + @javax.annotation.Nonnull + public String getTo() { + return to; + } + + public void setTo(@javax.annotation.Nonnull String to) { + this.to = to; + } + + + public PageMigrationSuccess type(@javax.annotation.Nonnull PageMigrationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public PageMigrationType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull PageMigrationType type) { + this.type = type; + } + + + public PageMigrationSuccess status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public PageMigrationSuccess commentsMigrated(@javax.annotation.Nonnull Integer commentsMigrated) { + this.commentsMigrated = commentsMigrated; + return this; + } + + /** + * Get commentsMigrated + * @return commentsMigrated + */ + @javax.annotation.Nonnull + public Integer getCommentsMigrated() { + return commentsMigrated; + } + + public void setCommentsMigrated(@javax.annotation.Nonnull Integer commentsMigrated) { + this.commentsMigrated = commentsMigrated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageMigrationSuccess pageMigrationSuccess = (PageMigrationSuccess) o; + return Objects.equals(this.from, pageMigrationSuccess.from) && + Objects.equals(this.to, pageMigrationSuccess.to) && + Objects.equals(this.type, pageMigrationSuccess.type) && + Objects.equals(this.status, pageMigrationSuccess.status) && + Objects.equals(this.commentsMigrated, pageMigrationSuccess.commentsMigrated); + } + + @Override + public int hashCode() { + return Objects.hash(from, to, type, status, commentsMigrated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageMigrationSuccess {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" commentsMigrated: ").append(toIndentedString(commentsMigrated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "to", "type", "status", "commentsMigrated")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "to", "type", "status", "commentsMigrated")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PageMigrationSuccess + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PageMigrationSuccess.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PageMigrationSuccess is not found in the empty JSON string", PageMigrationSuccess.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PageMigrationSuccess.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PageMigrationSuccess` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PageMigrationSuccess.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("from").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + } + if (!jsonObj.get("to").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + } + // validate the required field `type` + PageMigrationType.validateJsonElement(jsonObj.get("type")); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PageMigrationSuccess.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PageMigrationSuccess' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PageMigrationSuccess.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PageMigrationSuccess value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PageMigrationSuccess read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PageMigrationSuccess given an JSON string + * + * @param jsonString JSON string + * @return An instance of PageMigrationSuccess + * @throws IOException if the JSON string is invalid with respect to PageMigrationSuccess + */ + public static PageMigrationSuccess fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PageMigrationSuccess.class); + } + + /** + * Convert an instance of PageMigrationSuccess to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PageMigrationType.java b/client/src/main/java/com/fastcomments/model/PageMigrationType.java new file mode 100644 index 00000000..569ce196 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PageMigrationType.java @@ -0,0 +1,78 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * \"urlId\" renames exact urlId matches only. \"domain\" find/replaces the value inside every urlId and url. + */ +@JsonAdapter(PageMigrationType.Adapter.class) +public enum PageMigrationType { + + URL_ID("urlId"), + + DOMAIN("domain"); + + private String value; + + PageMigrationType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PageMigrationType fromValue(String value) { + for (PageMigrationType b : PageMigrationType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PageMigrationType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PageMigrationType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PageMigrationType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PageMigrationType.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PageMigrationUndoCounts.java b/client/src/main/java/com/fastcomments/model/PageMigrationUndoCounts.java new file mode 100644 index 00000000..db7b5b5e --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PageMigrationUndoCounts.java @@ -0,0 +1,258 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * PageMigrationUndoCounts + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class PageMigrationUndoCounts { + public static final String SERIALIZED_NAME_RESTORED = "restored"; + @SerializedName(SERIALIZED_NAME_RESTORED) + @javax.annotation.Nonnull + private Integer restored; + + public static final String SERIALIZED_NAME_SKIPPED = "skipped"; + @SerializedName(SERIALIZED_NAME_SKIPPED) + @javax.annotation.Nonnull + private Integer skipped; + + public static final String SERIALIZED_NAME_NOT_RESTORABLE = "notRestorable"; + @SerializedName(SERIALIZED_NAME_NOT_RESTORABLE) + @javax.annotation.Nonnull + private Integer notRestorable; + + public PageMigrationUndoCounts() { + } + + public PageMigrationUndoCounts restored(@javax.annotation.Nonnull Integer restored) { + this.restored = restored; + return this; + } + + /** + * Records put back to their pre-migration values. + * @return restored + */ + @javax.annotation.Nonnull + public Integer getRestored() { + return restored; + } + + public void setRestored(@javax.annotation.Nonnull Integer restored) { + this.restored = restored; + } + + + public PageMigrationUndoCounts skipped(@javax.annotation.Nonnull Integer skipped) { + this.skipped = skipped; + return this; + } + + /** + * Records left alone because they changed after the migration, or no longer exist. + * @return skipped + */ + @javax.annotation.Nonnull + public Integer getSkipped() { + return skipped; + } + + public void setSkipped(@javax.annotation.Nonnull Integer skipped) { + this.skipped = skipped; + } + + + public PageMigrationUndoCounts notRestorable(@javax.annotation.Nonnull Integer notRestorable) { + this.notRestorable = notRestorable; + return this; + } + + /** + * Records a page merge or duplicate cleanup deleted during the migration. These cannot be brought back. + * @return notRestorable + */ + @javax.annotation.Nonnull + public Integer getNotRestorable() { + return notRestorable; + } + + public void setNotRestorable(@javax.annotation.Nonnull Integer notRestorable) { + this.notRestorable = notRestorable; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageMigrationUndoCounts pageMigrationUndoCounts = (PageMigrationUndoCounts) o; + return Objects.equals(this.restored, pageMigrationUndoCounts.restored) && + Objects.equals(this.skipped, pageMigrationUndoCounts.skipped) && + Objects.equals(this.notRestorable, pageMigrationUndoCounts.notRestorable); + } + + @Override + public int hashCode() { + return Objects.hash(restored, skipped, notRestorable); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageMigrationUndoCounts {\n"); + sb.append(" restored: ").append(toIndentedString(restored)).append("\n"); + sb.append(" skipped: ").append(toIndentedString(skipped)).append("\n"); + sb.append(" notRestorable: ").append(toIndentedString(notRestorable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("restored", "skipped", "notRestorable")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("restored", "skipped", "notRestorable")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PageMigrationUndoCounts + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PageMigrationUndoCounts.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PageMigrationUndoCounts is not found in the empty JSON string", PageMigrationUndoCounts.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PageMigrationUndoCounts.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PageMigrationUndoCounts` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PageMigrationUndoCounts.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PageMigrationUndoCounts.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PageMigrationUndoCounts' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PageMigrationUndoCounts.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PageMigrationUndoCounts value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PageMigrationUndoCounts read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PageMigrationUndoCounts given an JSON string + * + * @param jsonString JSON string + * @return An instance of PageMigrationUndoCounts + * @throws IOException if the JSON string is invalid with respect to PageMigrationUndoCounts + */ + public static PageMigrationUndoCounts fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PageMigrationUndoCounts.class); + } + + /** + * Convert an instance of PageMigrationUndoCounts to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PageReactIncludeUserInfo.java b/client/src/main/java/com/fastcomments/model/PageReactIncludeUserInfo.java new file mode 100644 index 00000000..9b9b2ad6 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PageReactIncludeUserInfo.java @@ -0,0 +1,78 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * public omits users with private profile activity; include-private requires an API key. + */ +@JsonAdapter(PageReactIncludeUserInfo.Adapter.class) +public enum PageReactIncludeUserInfo { + + PUBLIC("public"), + + INCLUDE_PRIVATE("include-private"); + + private String value; + + PageReactIncludeUserInfo(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PageReactIncludeUserInfo fromValue(String value) { + for (PageReactIncludeUserInfo b : PageReactIncludeUserInfo.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PageReactIncludeUserInfo enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PageReactIncludeUserInfo read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PageReactIncludeUserInfo.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PageReactIncludeUserInfo.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PageReactUser.java b/client/src/main/java/com/fastcomments/model/PageReactUser.java new file mode 100644 index 00000000..d4a597c3 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PageReactUser.java @@ -0,0 +1,377 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * PageReactUser + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class PageReactUser { + public static final String SERIALIZED_NAME_AVATAR_SRC = "avatarSrc"; + @SerializedName(SERIALIZED_NAME_AVATAR_SRC) + @javax.annotation.Nullable + private String avatarSrc; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull + private String userId; + + public PageReactUser() { + } + + public PageReactUser avatarSrc(@javax.annotation.Nullable String avatarSrc) { + this.avatarSrc = avatarSrc; + return this; + } + + /** + * Get avatarSrc + * @return avatarSrc + */ + @javax.annotation.Nullable + public String getAvatarSrc() { + return avatarSrc; + } + + public void setAvatarSrc(@javax.annotation.Nullable String avatarSrc) { + this.avatarSrc = avatarSrc; + } + + + public PageReactUser displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public PageReactUser username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + + public PageReactUser userId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PageReactUser instance itself + */ + public PageReactUser putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageReactUser pageReactUser = (PageReactUser) o; + return Objects.equals(this.avatarSrc, pageReactUser.avatarSrc) && + Objects.equals(this.displayName, pageReactUser.displayName) && + Objects.equals(this.username, pageReactUser.username) && + Objects.equals(this.userId, pageReactUser.userId)&& + Objects.equals(this.additionalProperties, pageReactUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(avatarSrc, displayName, username, userId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageReactUser {\n"); + sb.append(" avatarSrc: ").append(toIndentedString(avatarSrc)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("avatarSrc", "displayName", "username", "userId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("username", "userId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PageReactUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PageReactUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PageReactUser is not found in the empty JSON string", PageReactUser.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PageReactUser.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("avatarSrc") != null && !jsonObj.get("avatarSrc").isJsonNull()) && !jsonObj.get("avatarSrc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `avatarSrc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatarSrc").toString())); + } + if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (!jsonObj.get("userId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PageReactUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PageReactUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PageReactUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PageReactUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PageReactUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PageReactUser instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PageReactUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of PageReactUser + * @throws IOException if the JSON string is invalid with respect to PageReactUser + */ + public static PageReactUser fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PageReactUser.class); + } + + /** + * Convert an instance of PageReactUser to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAt.java b/client/src/main/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAt.java new file mode 100644 index 00000000..330db7fe --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAt.java @@ -0,0 +1,361 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.CommentPollOption; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * From T, pick a set of properties whose keys are in the union K + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class PickCommentPollOptionsOrTotalVotesOrClosesAt { + public static final String SERIALIZED_NAME_OPTIONS = "options"; + @SerializedName(SERIALIZED_NAME_OPTIONS) + @javax.annotation.Nonnull + private List options = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TOTAL_VOTES = "totalVotes"; + @SerializedName(SERIALIZED_NAME_TOTAL_VOTES) + @javax.annotation.Nonnull + private Integer totalVotes; + + public static final String SERIALIZED_NAME_CLOSES_AT = "closesAt"; + @SerializedName(SERIALIZED_NAME_CLOSES_AT) + @javax.annotation.Nullable + private OffsetDateTime closesAt; + + public PickCommentPollOptionsOrTotalVotesOrClosesAt() { + } + + public PickCommentPollOptionsOrTotalVotesOrClosesAt options(@javax.annotation.Nonnull List options) { + this.options = options; + return this; + } + + public PickCommentPollOptionsOrTotalVotesOrClosesAt addOptionsItem(CommentPollOption optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * Get options + * @return options + */ + @javax.annotation.Nonnull + public List getOptions() { + return options; + } + + public void setOptions(@javax.annotation.Nonnull List options) { + this.options = options; + } + + + public PickCommentPollOptionsOrTotalVotesOrClosesAt totalVotes(@javax.annotation.Nonnull Integer totalVotes) { + this.totalVotes = totalVotes; + return this; + } + + /** + * Get totalVotes + * @return totalVotes + */ + @javax.annotation.Nonnull + public Integer getTotalVotes() { + return totalVotes; + } + + public void setTotalVotes(@javax.annotation.Nonnull Integer totalVotes) { + this.totalVotes = totalVotes; + } + + + public PickCommentPollOptionsOrTotalVotesOrClosesAt closesAt(@javax.annotation.Nullable OffsetDateTime closesAt) { + this.closesAt = closesAt; + return this; + } + + /** + * Get closesAt + * @return closesAt + */ + @javax.annotation.Nullable + public OffsetDateTime getClosesAt() { + return closesAt; + } + + public void setClosesAt(@javax.annotation.Nullable OffsetDateTime closesAt) { + this.closesAt = closesAt; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PickCommentPollOptionsOrTotalVotesOrClosesAt instance itself + */ + public PickCommentPollOptionsOrTotalVotesOrClosesAt putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PickCommentPollOptionsOrTotalVotesOrClosesAt pickCommentPollOptionsOrTotalVotesOrClosesAt = (PickCommentPollOptionsOrTotalVotesOrClosesAt) o; + return Objects.equals(this.options, pickCommentPollOptionsOrTotalVotesOrClosesAt.options) && + Objects.equals(this.totalVotes, pickCommentPollOptionsOrTotalVotesOrClosesAt.totalVotes) && + Objects.equals(this.closesAt, pickCommentPollOptionsOrTotalVotesOrClosesAt.closesAt)&& + Objects.equals(this.additionalProperties, pickCommentPollOptionsOrTotalVotesOrClosesAt.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(options, totalVotes, closesAt, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PickCommentPollOptionsOrTotalVotesOrClosesAt {\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" totalVotes: ").append(toIndentedString(totalVotes)).append("\n"); + sb.append(" closesAt: ").append(toIndentedString(closesAt)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("options", "totalVotes", "closesAt")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("options", "totalVotes")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PickCommentPollOptionsOrTotalVotesOrClosesAt + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PickCommentPollOptionsOrTotalVotesOrClosesAt.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PickCommentPollOptionsOrTotalVotesOrClosesAt is not found in the empty JSON string", PickCommentPollOptionsOrTotalVotesOrClosesAt.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PickCommentPollOptionsOrTotalVotesOrClosesAt.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("options") != null) { + if (!jsonObj.get("options").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `options` to be an array in the JSON string but got `%s`", jsonObj.get("options").toString())); + } + JsonArray jsonArrayoptions = jsonObj.getAsJsonArray("options"); + // validate the required field `options` (array) + for (int i = 0; i < jsonArrayoptions.size(); i++) { + CommentPollOption.validateJsonElement(jsonArrayoptions.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PickCommentPollOptionsOrTotalVotesOrClosesAt.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PickCommentPollOptionsOrTotalVotesOrClosesAt' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PickCommentPollOptionsOrTotalVotesOrClosesAt.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PickCommentPollOptionsOrTotalVotesOrClosesAt value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PickCommentPollOptionsOrTotalVotesOrClosesAt read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PickCommentPollOptionsOrTotalVotesOrClosesAt instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PickCommentPollOptionsOrTotalVotesOrClosesAt given an JSON string + * + * @param jsonString JSON string + * @return An instance of PickCommentPollOptionsOrTotalVotesOrClosesAt + * @throws IOException if the JSON string is invalid with respect to PickCommentPollOptionsOrTotalVotesOrClosesAt + */ + public static PickCommentPollOptionsOrTotalVotesOrClosesAt fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PickCommentPollOptionsOrTotalVotesOrClosesAt.class); + } + + /** + * Convert an instance of PickCommentPollOptionsOrTotalVotesOrClosesAt to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PollCreationMode.java b/client/src/main/java/com/fastcomments/model/PollCreationMode.java new file mode 100644 index 00000000..fef62817 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PollCreationMode.java @@ -0,0 +1,80 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets PollCreationMode + */ +@JsonAdapter(PollCreationMode.Adapter.class) +public enum PollCreationMode { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + PollCreationMode(Integer value) { + this.value = value; + } + + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PollCreationMode fromValue(Integer value) { + for (PollCreationMode b : PollCreationMode.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PollCreationMode enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PollCreationMode read(final JsonReader jsonReader) throws IOException { + Integer value = jsonReader.nextInt(); + return PollCreationMode.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + Integer value = jsonElement.getAsInt(); + PollCreationMode.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PollPrivacy.java b/client/src/main/java/com/fastcomments/model/PollPrivacy.java new file mode 100644 index 00000000..37694839 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PollPrivacy.java @@ -0,0 +1,80 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Who may see which voter picked which option. Chosen by the poll's author when they build the poll, so it lives on the poll itself rather than in the widget config. Anonymous is the default and is never stored on the poll or sent to the client, so an unset value means Anonymous. + */ +@JsonAdapter(PollPrivacy.Adapter.class) +public enum PollPrivacy { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + PollPrivacy(Integer value) { + this.value = value; + } + + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PollPrivacy fromValue(Integer value) { + for (PollPrivacy b : PollPrivacy.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PollPrivacy enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PollPrivacy read(final JsonReader jsonReader) throws IOException { + Integer value = jsonReader.nextInt(); + return PollPrivacy.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + Integer value = jsonElement.getAsInt(); + PollPrivacy.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PollVotingMode.java b/client/src/main/java/com/fastcomments/model/PollVotingMode.java new file mode 100644 index 00000000..43927aa6 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PollVotingMode.java @@ -0,0 +1,78 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets PollVotingMode + */ +@JsonAdapter(PollVotingMode.Adapter.class) +public enum PollVotingMode { + + NUMBER_0(0), + + NUMBER_1(1); + + private Integer value; + + PollVotingMode(Integer value) { + this.value = value; + } + + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PollVotingMode fromValue(Integer value) { + for (PollVotingMode b : PollVotingMode.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PollVotingMode enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PollVotingMode read(final JsonReader jsonReader) throws IOException { + Integer value = jsonReader.nextInt(); + return PollVotingMode.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + Integer value = jsonElement.getAsInt(); + PollVotingMode.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PubSubComment.java b/client/src/main/java/com/fastcomments/model/PubSubComment.java index ad6c1880..5acef058 100644 --- a/client/src/main/java/com/fastcomments/model/PubSubComment.java +++ b/client/src/main/java/com/fastcomments/model/PubSubComment.java @@ -14,6 +14,7 @@ package com.fastcomments.model; import java.util.Objects; +import com.fastcomments.model.CommentPoll; import com.fastcomments.model.CommentUserBadgeInfo; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -199,6 +200,11 @@ public class PubSubComment { @javax.annotation.Nullable private List feedbackIds = new ArrayList<>(); + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nullable + private CommentPoll poll; + public static final String SERIALIZED_NAME_FLAG_COUNT = "flagCount"; @SerializedName(SERIALIZED_NAME_FLAG_COUNT) @javax.annotation.Nullable @@ -839,6 +845,25 @@ public void setFeedbackIds(@javax.annotation.Nullable List feedbackIds) } + public PubSubComment poll(@javax.annotation.Nullable CommentPoll poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nullable + public CommentPoll getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nullable CommentPoll poll) { + this.poll = poll; + } + + public PubSubComment flagCount(@javax.annotation.Nullable Integer flagCount) { this.flagCount = flagCount; return this; @@ -1196,6 +1221,7 @@ public boolean equals(Object o) { Objects.equals(this.isSpam, pubSubComment.isSpam) && Objects.equals(this.anonUserId, pubSubComment.anonUserId) && Objects.equals(this.feedbackIds, pubSubComment.feedbackIds) && + Objects.equals(this.poll, pubSubComment.poll) && Objects.equals(this.flagCount, pubSubComment.flagCount) && Objects.equals(this.domain, pubSubComment.domain) && Objects.equals(this.url, pubSubComment.url) && @@ -1215,7 +1241,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, tenantId, userId, urlId, commenterName, commenterLink, commentHTML, comment, parentId, votes, votesUp, votesDown, verified, avatarSrc, hasImages, hasLinks, isByAdmin, isByModerator, isPinned, isLocked, displayLabel, rating, badges, viewCount, isDeleted, isDeletedUser, isSpam, anonUserId, feedbackIds, flagCount, domain, url, pageTitle, expireAt, reviewed, hasCode, approved, locale, isBannedUser, groupIds, isLive, hidden, date, additionalProperties); + return Objects.hash(id, tenantId, userId, urlId, commenterName, commenterLink, commentHTML, comment, parentId, votes, votesUp, votesDown, verified, avatarSrc, hasImages, hasLinks, isByAdmin, isByModerator, isPinned, isLocked, displayLabel, rating, badges, viewCount, isDeleted, isDeletedUser, isSpam, anonUserId, feedbackIds, poll, flagCount, domain, url, pageTitle, expireAt, reviewed, hasCode, approved, locale, isBannedUser, groupIds, isLive, hidden, date, additionalProperties); } @Override @@ -1251,6 +1277,7 @@ public String toString() { sb.append(" isSpam: ").append(toIndentedString(isSpam)).append("\n"); sb.append(" anonUserId: ").append(toIndentedString(anonUserId)).append("\n"); sb.append(" feedbackIds: ").append(toIndentedString(feedbackIds)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); sb.append(" flagCount: ").append(toIndentedString(flagCount)).append("\n"); sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); @@ -1284,7 +1311,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "userId", "urlId", "commenterName", "commenterLink", "commentHTML", "comment", "parentId", "votes", "votesUp", "votesDown", "verified", "avatarSrc", "hasImages", "hasLinks", "isByAdmin", "isByModerator", "isPinned", "isLocked", "displayLabel", "rating", "badges", "viewCount", "isDeleted", "isDeletedUser", "isSpam", "anonUserId", "feedbackIds", "flagCount", "domain", "url", "pageTitle", "expireAt", "reviewed", "hasCode", "approved", "locale", "isBannedUser", "groupIds", "isLive", "hidden", "date")); + openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "userId", "urlId", "commenterName", "commenterLink", "commentHTML", "comment", "parentId", "votes", "votesUp", "votesDown", "verified", "avatarSrc", "hasImages", "hasLinks", "isByAdmin", "isByModerator", "isPinned", "isLocked", "displayLabel", "rating", "badges", "viewCount", "isDeleted", "isDeletedUser", "isSpam", "anonUserId", "feedbackIds", "poll", "flagCount", "domain", "url", "pageTitle", "expireAt", "reviewed", "hasCode", "approved", "locale", "isBannedUser", "groupIds", "isLive", "hidden", "date")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("_id", "tenantId", "urlId", "commenterName", "commentHTML", "comment", "verified", "url", "approved", "locale", "date")); @@ -1364,6 +1391,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("feedbackIds") != null && !jsonObj.get("feedbackIds").isJsonNull() && !jsonObj.get("feedbackIds").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `feedbackIds` to be an array in the JSON string but got `%s`", jsonObj.get("feedbackIds").toString())); } + // validate the optional field `poll` + if (jsonObj.get("poll") != null && !jsonObj.get("poll").isJsonNull()) { + CommentPoll.validateJsonElement(jsonObj.get("poll")); + } if ((jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) && !jsonObj.get("domain").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `domain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain").toString())); } diff --git a/client/src/main/java/com/fastcomments/model/PubSubCommentBase.java b/client/src/main/java/com/fastcomments/model/PubSubCommentBase.java index 4eb8a658..8adb4411 100644 --- a/client/src/main/java/com/fastcomments/model/PubSubCommentBase.java +++ b/client/src/main/java/com/fastcomments/model/PubSubCommentBase.java @@ -14,6 +14,7 @@ package com.fastcomments.model; import java.util.Objects; +import com.fastcomments.model.CommentPoll; import com.fastcomments.model.CommentUserBadgeInfo; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -199,6 +200,11 @@ public class PubSubCommentBase { @javax.annotation.Nullable private List feedbackIds = new ArrayList<>(); + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nullable + private CommentPoll poll; + public static final String SERIALIZED_NAME_FLAG_COUNT = "flagCount"; @SerializedName(SERIALIZED_NAME_FLAG_COUNT) @javax.annotation.Nullable @@ -824,6 +830,25 @@ public void setFeedbackIds(@javax.annotation.Nullable List feedbackIds) } + public PubSubCommentBase poll(@javax.annotation.Nullable CommentPoll poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nullable + public CommentPoll getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nullable CommentPoll poll) { + this.poll = poll; + } + + public PubSubCommentBase flagCount(@javax.annotation.Nullable Integer flagCount) { this.flagCount = flagCount; return this; @@ -1080,6 +1105,7 @@ public boolean equals(Object o) { Objects.equals(this.isSpam, pubSubCommentBase.isSpam) && Objects.equals(this.anonUserId, pubSubCommentBase.anonUserId) && Objects.equals(this.feedbackIds, pubSubCommentBase.feedbackIds) && + Objects.equals(this.poll, pubSubCommentBase.poll) && Objects.equals(this.flagCount, pubSubCommentBase.flagCount) && Objects.equals(this.domain, pubSubCommentBase.domain) && Objects.equals(this.url, pubSubCommentBase.url) && @@ -1095,7 +1121,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, tenantId, userId, urlId, commenterName, commenterLink, commentHTML, comment, parentId, votes, votesUp, votesDown, verified, avatarSrc, hasImages, hasLinks, isByAdmin, isByModerator, isPinned, isLocked, displayLabel, rating, badges, viewCount, isDeleted, isDeletedUser, isSpam, anonUserId, feedbackIds, flagCount, domain, url, pageTitle, expireAt, reviewed, hasCode, approved, locale, isBannedUser, groupIds); + return Objects.hash(id, tenantId, userId, urlId, commenterName, commenterLink, commentHTML, comment, parentId, votes, votesUp, votesDown, verified, avatarSrc, hasImages, hasLinks, isByAdmin, isByModerator, isPinned, isLocked, displayLabel, rating, badges, viewCount, isDeleted, isDeletedUser, isSpam, anonUserId, feedbackIds, poll, flagCount, domain, url, pageTitle, expireAt, reviewed, hasCode, approved, locale, isBannedUser, groupIds); } @Override @@ -1131,6 +1157,7 @@ public String toString() { sb.append(" isSpam: ").append(toIndentedString(isSpam)).append("\n"); sb.append(" anonUserId: ").append(toIndentedString(anonUserId)).append("\n"); sb.append(" feedbackIds: ").append(toIndentedString(feedbackIds)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); sb.append(" flagCount: ").append(toIndentedString(flagCount)).append("\n"); sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); @@ -1160,7 +1187,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "userId", "urlId", "commenterName", "commenterLink", "commentHTML", "comment", "parentId", "votes", "votesUp", "votesDown", "verified", "avatarSrc", "hasImages", "hasLinks", "isByAdmin", "isByModerator", "isPinned", "isLocked", "displayLabel", "rating", "badges", "viewCount", "isDeleted", "isDeletedUser", "isSpam", "anonUserId", "feedbackIds", "flagCount", "domain", "url", "pageTitle", "expireAt", "reviewed", "hasCode", "approved", "locale", "isBannedUser", "groupIds")); + openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "userId", "urlId", "commenterName", "commenterLink", "commentHTML", "comment", "parentId", "votes", "votesUp", "votesDown", "verified", "avatarSrc", "hasImages", "hasLinks", "isByAdmin", "isByModerator", "isPinned", "isLocked", "displayLabel", "rating", "badges", "viewCount", "isDeleted", "isDeletedUser", "isSpam", "anonUserId", "feedbackIds", "poll", "flagCount", "domain", "url", "pageTitle", "expireAt", "reviewed", "hasCode", "approved", "locale", "isBannedUser", "groupIds")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("_id", "tenantId", "urlId", "commenterName", "commentHTML", "comment", "verified", "url", "approved", "locale")); @@ -1248,6 +1275,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("feedbackIds") != null && !jsonObj.get("feedbackIds").isJsonNull() && !jsonObj.get("feedbackIds").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `feedbackIds` to be an array in the JSON string but got `%s`", jsonObj.get("feedbackIds").toString())); } + // validate the optional field `poll` + if (jsonObj.get("poll") != null && !jsonObj.get("poll").isJsonNull()) { + CommentPoll.validateJsonElement(jsonObj.get("poll")); + } if ((jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) && !jsonObj.get("domain").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `domain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain").toString())); } diff --git a/client/src/main/java/com/fastcomments/model/PublicComment.java b/client/src/main/java/com/fastcomments/model/PublicComment.java index 90324859..52b2825e 100644 --- a/client/src/main/java/com/fastcomments/model/PublicComment.java +++ b/client/src/main/java/com/fastcomments/model/PublicComment.java @@ -204,6 +204,11 @@ public class PublicComment { @javax.annotation.Nullable private Boolean isUnread; + public static final String SERIALIZED_NAME_MY_POLL_VOTES = "myPollVotes"; + @SerializedName(SERIALIZED_NAME_MY_POLL_VOTES) + @javax.annotation.Nullable + private List myPollVotes = new ArrayList<>(); + public static final String SERIALIZED_NAME_MY_VOTE_ID = "myVoteId"; @SerializedName(SERIALIZED_NAME_MY_VOTE_ID) @javax.annotation.Nullable @@ -838,6 +843,33 @@ public void setIsUnread(@javax.annotation.Nullable Boolean isUnread) { } + public PublicComment myPollVotes(@javax.annotation.Nullable List myPollVotes) { + this.myPollVotes = myPollVotes; + return this; + } + + public PublicComment addMyPollVotesItem(String myPollVotesItem) { + if (this.myPollVotes == null) { + this.myPollVotes = new ArrayList<>(); + } + this.myPollVotes.add(myPollVotesItem); + return this; + } + + /** + * Ids of the options the current viewer voted for on this comment's poll. Only set when polls are enabled and they have voted. + * @return myPollVotes + */ + @javax.annotation.Nullable + public List getMyPollVotes() { + return myPollVotes; + } + + public void setMyPollVotes(@javax.annotation.Nullable List myPollVotes) { + this.myPollVotes = myPollVotes; + } + + public PublicComment myVoteId(@javax.annotation.Nullable String myVoteId) { this.myVoteId = myVoteId; return this; @@ -1101,6 +1133,7 @@ public boolean equals(Object o) { Objects.equals(this.editKey, publicComment.editKey) && Objects.equals(this.approved, publicComment.approved) && Objects.equals(this.isUnread, publicComment.isUnread) && + Objects.equals(this.myPollVotes, publicComment.myPollVotes) && Objects.equals(this.myVoteId, publicComment.myVoteId) && Objects.equals(this.isVotedDown, publicComment.isVotedDown) && Objects.equals(this.isVotedUp, publicComment.isVotedUp) && @@ -1115,7 +1148,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, userId, commenterName, commenterLink, commentHTML, parentId, date, votes, votesUp, votesDown, verified, avatarSrc, hasImages, isByAdmin, isByModerator, isPinned, isLocked, displayLabel, rating, badges, viewCount, isDeleted, isDeletedUser, isSpam, anonUserId, feedbackIds, requiresVerification, editKey, approved, isUnread, myVoteId, isVotedDown, isVotedUp, hasChildren, nestedChildrenCount, childCount, children, isFlagged, isBlocked, additionalProperties); + return Objects.hash(id, userId, commenterName, commenterLink, commentHTML, parentId, date, votes, votesUp, votesDown, verified, avatarSrc, hasImages, isByAdmin, isByModerator, isPinned, isLocked, displayLabel, rating, badges, viewCount, isDeleted, isDeletedUser, isSpam, anonUserId, feedbackIds, requiresVerification, editKey, approved, isUnread, myPollVotes, myVoteId, isVotedDown, isVotedUp, hasChildren, nestedChildrenCount, childCount, children, isFlagged, isBlocked, additionalProperties); } @Override @@ -1152,6 +1185,7 @@ public String toString() { sb.append(" editKey: ").append(toIndentedString(editKey)).append("\n"); sb.append(" approved: ").append(toIndentedString(approved)).append("\n"); sb.append(" isUnread: ").append(toIndentedString(isUnread)).append("\n"); + sb.append(" myPollVotes: ").append(toIndentedString(myPollVotes)).append("\n"); sb.append(" myVoteId: ").append(toIndentedString(myVoteId)).append("\n"); sb.append(" isVotedDown: ").append(toIndentedString(isVotedDown)).append("\n"); sb.append(" isVotedUp: ").append(toIndentedString(isVotedUp)).append("\n"); @@ -1180,7 +1214,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("_id", "userId", "commenterName", "commenterLink", "commentHTML", "parentId", "date", "votes", "votesUp", "votesDown", "verified", "avatarSrc", "hasImages", "isByAdmin", "isByModerator", "isPinned", "isLocked", "displayLabel", "rating", "badges", "viewCount", "isDeleted", "isDeletedUser", "isSpam", "anonUserId", "feedbackIds", "requiresVerification", "editKey", "approved", "isUnread", "myVoteId", "isVotedDown", "isVotedUp", "hasChildren", "nestedChildrenCount", "childCount", "children", "isFlagged", "isBlocked")); + openapiFields = new HashSet(Arrays.asList("_id", "userId", "commenterName", "commenterLink", "commentHTML", "parentId", "date", "votes", "votesUp", "votesDown", "verified", "avatarSrc", "hasImages", "isByAdmin", "isByModerator", "isPinned", "isLocked", "displayLabel", "rating", "badges", "viewCount", "isDeleted", "isDeletedUser", "isSpam", "anonUserId", "feedbackIds", "requiresVerification", "editKey", "approved", "isUnread", "myPollVotes", "myVoteId", "isVotedDown", "isVotedUp", "hasChildren", "nestedChildrenCount", "childCount", "children", "isFlagged", "isBlocked")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("_id", "commenterName", "commentHTML", "date", "verified")); @@ -1254,6 +1288,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("editKey") != null && !jsonObj.get("editKey").isJsonNull()) && !jsonObj.get("editKey").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `editKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("editKey").toString())); } + // ensure the optional json data is an array if present + if (jsonObj.get("myPollVotes") != null && !jsonObj.get("myPollVotes").isJsonNull() && !jsonObj.get("myPollVotes").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `myPollVotes` to be an array in the JSON string but got `%s`", jsonObj.get("myPollVotes").toString())); + } if ((jsonObj.get("myVoteId") != null && !jsonObj.get("myVoteId").isJsonNull()) && !jsonObj.get("myVoteId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `myVoteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("myVoteId").toString())); } diff --git a/client/src/main/java/com/fastcomments/model/PublicPollVote.java b/client/src/main/java/com/fastcomments/model/PublicPollVote.java new file mode 100644 index 00000000..a8a860af --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PublicPollVote.java @@ -0,0 +1,407 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * A single vote cast on a comment's poll. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class PublicPollVote { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenantId"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + @javax.annotation.Nonnull + private String tenantId; + + public static final String SERIALIZED_NAME_COMMENT_ID = "commentId"; + @SerializedName(SERIALIZED_NAME_COMMENT_ID) + @javax.annotation.Nonnull + private String commentId; + + public static final String SERIALIZED_NAME_URL_ID = "urlId"; + @SerializedName(SERIALIZED_NAME_URL_ID) + @javax.annotation.Nonnull + private String urlId; + + public static final String SERIALIZED_NAME_VOTER_ID = "voterId"; + @SerializedName(SERIALIZED_NAME_VOTER_ID) + @javax.annotation.Nonnull + private String voterId; + + public static final String SERIALIZED_NAME_OPTION_ID = "optionId"; + @SerializedName(SERIALIZED_NAME_OPTION_ID) + @javax.annotation.Nonnull + private String optionId; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public PublicPollVote() { + } + + public PublicPollVote id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public PublicPollVote tenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get tenantId + * @return tenantId + */ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + public void setTenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + + public PublicPollVote commentId(@javax.annotation.Nonnull String commentId) { + this.commentId = commentId; + return this; + } + + /** + * Get commentId + * @return commentId + */ + @javax.annotation.Nonnull + public String getCommentId() { + return commentId; + } + + public void setCommentId(@javax.annotation.Nonnull String commentId) { + this.commentId = commentId; + } + + + public PublicPollVote urlId(@javax.annotation.Nonnull String urlId) { + this.urlId = urlId; + return this; + } + + /** + * Get urlId + * @return urlId + */ + @javax.annotation.Nonnull + public String getUrlId() { + return urlId; + } + + public void setUrlId(@javax.annotation.Nonnull String urlId) { + this.urlId = urlId; + } + + + public PublicPollVote voterId(@javax.annotation.Nonnull String voterId) { + this.voterId = voterId; + return this; + } + + /** + * Get voterId + * @return voterId + */ + @javax.annotation.Nonnull + public String getVoterId() { + return voterId; + } + + public void setVoterId(@javax.annotation.Nonnull String voterId) { + this.voterId = voterId; + } + + + public PublicPollVote optionId(@javax.annotation.Nonnull String optionId) { + this.optionId = optionId; + return this; + } + + /** + * Get optionId + * @return optionId + */ + @javax.annotation.Nonnull + public String getOptionId() { + return optionId; + } + + public void setOptionId(@javax.annotation.Nonnull String optionId) { + this.optionId = optionId; + } + + + public PublicPollVote createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public PublicPollVote updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublicPollVote publicPollVote = (PublicPollVote) o; + return Objects.equals(this.id, publicPollVote.id) && + Objects.equals(this.tenantId, publicPollVote.tenantId) && + Objects.equals(this.commentId, publicPollVote.commentId) && + Objects.equals(this.urlId, publicPollVote.urlId) && + Objects.equals(this.voterId, publicPollVote.voterId) && + Objects.equals(this.optionId, publicPollVote.optionId) && + Objects.equals(this.createdAt, publicPollVote.createdAt) && + Objects.equals(this.updatedAt, publicPollVote.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, tenantId, commentId, urlId, voterId, optionId, createdAt, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublicPollVote {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" commentId: ").append(toIndentedString(commentId)).append("\n"); + sb.append(" urlId: ").append(toIndentedString(urlId)).append("\n"); + sb.append(" voterId: ").append(toIndentedString(voterId)).append("\n"); + sb.append(" optionId: ").append(toIndentedString(optionId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("id", "tenantId", "commentId", "urlId", "voterId", "optionId", "createdAt", "updatedAt")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("id", "tenantId", "commentId", "urlId", "voterId", "optionId", "createdAt")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PublicPollVote + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PublicPollVote.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PublicPollVote is not found in the empty JSON string", PublicPollVote.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PublicPollVote.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PublicPollVote` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PublicPollVote.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("tenantId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tenantId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenantId").toString())); + } + if (!jsonObj.get("commentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentId").toString())); + } + if (!jsonObj.get("urlId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `urlId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("urlId").toString())); + } + if (!jsonObj.get("voterId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `voterId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("voterId").toString())); + } + if (!jsonObj.get("optionId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `optionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("optionId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PublicPollVote.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PublicPollVote' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PublicPollVote.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PublicPollVote value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PublicPollVote read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PublicPollVote given an JSON string + * + * @param jsonString JSON string + * @return An instance of PublicPollVote + * @throws IOException if the JSON string is invalid with respect to PublicPollVote + */ + public static PublicPollVote fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PublicPollVote.class); + } + + /** + * Convert an instance of PublicPollVote to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/PublicWebhook.java b/client/src/main/java/com/fastcomments/model/PublicWebhook.java new file mode 100644 index 00000000..180db19a --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/PublicWebhook.java @@ -0,0 +1,596 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.WebhookEventName; +import com.fastcomments.model.WebhookHTTPMethod; +import com.fastcomments.model.WebhookSource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * PublicWebhook + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class PublicWebhook { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_EVENT = "event"; + @SerializedName(SERIALIZED_NAME_EVENT) + @javax.annotation.Nonnull + private WebhookEventName event; + + public static final String SERIALIZED_NAME_DOMAIN = "domain"; + @SerializedName(SERIALIZED_NAME_DOMAIN) + @javax.annotation.Nonnull + private String domain; + + public static final String SERIALIZED_NAME_METHOD = "method"; + @SerializedName(SERIALIZED_NAME_METHOD) + @javax.annotation.Nonnull + private WebhookHTTPMethod method; + + public static final String SERIALIZED_NAME_SOURCE = "source"; + @SerializedName(SERIALIZED_NAME_SOURCE) + @javax.annotation.Nonnull + private WebhookSource source; + + public static final String SERIALIZED_NAME_ENABLED = "enabled"; + @SerializedName(SERIALIZED_NAME_ENABLED) + @javax.annotation.Nonnull + private Boolean enabled; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_LAST_SUCCESS_AT = "lastSuccessAt"; + @SerializedName(SERIALIZED_NAME_LAST_SUCCESS_AT) + @javax.annotation.Nullable + private OffsetDateTime lastSuccessAt; + + public static final String SERIALIZED_NAME_LAST_FAILURE_AT = "lastFailureAt"; + @SerializedName(SERIALIZED_NAME_LAST_FAILURE_AT) + @javax.annotation.Nullable + private OffsetDateTime lastFailureAt; + + public static final String SERIALIZED_NAME_FAILING_SINCE = "failingSince"; + @SerializedName(SERIALIZED_NAME_FAILING_SINCE) + @javax.annotation.Nullable + private OffsetDateTime failingSince; + + public static final String SERIALIZED_NAME_DISABLED_AT = "disabledAt"; + @SerializedName(SERIALIZED_NAME_DISABLED_AT) + @javax.annotation.Nullable + private OffsetDateTime disabledAt; + + /** + * Gets or Sets disabledReason + */ + @JsonAdapter(DisabledReasonEnum.Adapter.class) + public enum DisabledReasonEnum { + AUTO("auto"), + + MANUAL("manual"); + + private String value; + + DisabledReasonEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DisabledReasonEnum fromValue(String value) { + for (DisabledReasonEnum b : DisabledReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DisabledReasonEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DisabledReasonEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DisabledReasonEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DisabledReasonEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DISABLED_REASON = "disabledReason"; + @SerializedName(SERIALIZED_NAME_DISABLED_REASON) + @javax.annotation.Nullable + private DisabledReasonEnum disabledReason; + + public PublicWebhook() { + } + + public PublicWebhook id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public PublicWebhook url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + + public PublicWebhook event(@javax.annotation.Nonnull WebhookEventName event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @javax.annotation.Nonnull + public WebhookEventName getEvent() { + return event; + } + + public void setEvent(@javax.annotation.Nonnull WebhookEventName event) { + this.event = event; + } + + + public PublicWebhook domain(@javax.annotation.Nonnull String domain) { + this.domain = domain; + return this; + } + + /** + * Get domain + * @return domain + */ + @javax.annotation.Nonnull + public String getDomain() { + return domain; + } + + public void setDomain(@javax.annotation.Nonnull String domain) { + this.domain = domain; + } + + + public PublicWebhook method(@javax.annotation.Nonnull WebhookHTTPMethod method) { + this.method = method; + return this; + } + + /** + * Get method + * @return method + */ + @javax.annotation.Nonnull + public WebhookHTTPMethod getMethod() { + return method; + } + + public void setMethod(@javax.annotation.Nonnull WebhookHTTPMethod method) { + this.method = method; + } + + + public PublicWebhook source(@javax.annotation.Nonnull WebhookSource source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nonnull + public WebhookSource getSource() { + return source; + } + + public void setSource(@javax.annotation.Nonnull WebhookSource source) { + this.source = source; + } + + + public PublicWebhook enabled(@javax.annotation.Nonnull Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled + * @return enabled + */ + @javax.annotation.Nonnull + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(@javax.annotation.Nonnull Boolean enabled) { + this.enabled = enabled; + } + + + public PublicWebhook createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public PublicWebhook lastSuccessAt(@javax.annotation.Nullable OffsetDateTime lastSuccessAt) { + this.lastSuccessAt = lastSuccessAt; + return this; + } + + /** + * Get lastSuccessAt + * @return lastSuccessAt + */ + @javax.annotation.Nullable + public OffsetDateTime getLastSuccessAt() { + return lastSuccessAt; + } + + public void setLastSuccessAt(@javax.annotation.Nullable OffsetDateTime lastSuccessAt) { + this.lastSuccessAt = lastSuccessAt; + } + + + public PublicWebhook lastFailureAt(@javax.annotation.Nullable OffsetDateTime lastFailureAt) { + this.lastFailureAt = lastFailureAt; + return this; + } + + /** + * Get lastFailureAt + * @return lastFailureAt + */ + @javax.annotation.Nullable + public OffsetDateTime getLastFailureAt() { + return lastFailureAt; + } + + public void setLastFailureAt(@javax.annotation.Nullable OffsetDateTime lastFailureAt) { + this.lastFailureAt = lastFailureAt; + } + + + public PublicWebhook failingSince(@javax.annotation.Nullable OffsetDateTime failingSince) { + this.failingSince = failingSince; + return this; + } + + /** + * Get failingSince + * @return failingSince + */ + @javax.annotation.Nullable + public OffsetDateTime getFailingSince() { + return failingSince; + } + + public void setFailingSince(@javax.annotation.Nullable OffsetDateTime failingSince) { + this.failingSince = failingSince; + } + + + public PublicWebhook disabledAt(@javax.annotation.Nullable OffsetDateTime disabledAt) { + this.disabledAt = disabledAt; + return this; + } + + /** + * Get disabledAt + * @return disabledAt + */ + @javax.annotation.Nullable + public OffsetDateTime getDisabledAt() { + return disabledAt; + } + + public void setDisabledAt(@javax.annotation.Nullable OffsetDateTime disabledAt) { + this.disabledAt = disabledAt; + } + + + public PublicWebhook disabledReason(@javax.annotation.Nullable DisabledReasonEnum disabledReason) { + this.disabledReason = disabledReason; + return this; + } + + /** + * Get disabledReason + * @return disabledReason + */ + @javax.annotation.Nullable + public DisabledReasonEnum getDisabledReason() { + return disabledReason; + } + + public void setDisabledReason(@javax.annotation.Nullable DisabledReasonEnum disabledReason) { + this.disabledReason = disabledReason; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublicWebhook publicWebhook = (PublicWebhook) o; + return Objects.equals(this.id, publicWebhook.id) && + Objects.equals(this.url, publicWebhook.url) && + Objects.equals(this.event, publicWebhook.event) && + Objects.equals(this.domain, publicWebhook.domain) && + Objects.equals(this.method, publicWebhook.method) && + Objects.equals(this.source, publicWebhook.source) && + Objects.equals(this.enabled, publicWebhook.enabled) && + Objects.equals(this.createdAt, publicWebhook.createdAt) && + Objects.equals(this.lastSuccessAt, publicWebhook.lastSuccessAt) && + Objects.equals(this.lastFailureAt, publicWebhook.lastFailureAt) && + Objects.equals(this.failingSince, publicWebhook.failingSince) && + Objects.equals(this.disabledAt, publicWebhook.disabledAt) && + Objects.equals(this.disabledReason, publicWebhook.disabledReason); + } + + @Override + public int hashCode() { + return Objects.hash(id, url, event, domain, method, source, enabled, createdAt, lastSuccessAt, lastFailureAt, failingSince, disabledAt, disabledReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublicWebhook {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" lastSuccessAt: ").append(toIndentedString(lastSuccessAt)).append("\n"); + sb.append(" lastFailureAt: ").append(toIndentedString(lastFailureAt)).append("\n"); + sb.append(" failingSince: ").append(toIndentedString(failingSince)).append("\n"); + sb.append(" disabledAt: ").append(toIndentedString(disabledAt)).append("\n"); + sb.append(" disabledReason: ").append(toIndentedString(disabledReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("id", "url", "event", "domain", "method", "source", "enabled", "createdAt", "lastSuccessAt", "lastFailureAt", "failingSince", "disabledAt", "disabledReason")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("id", "url", "event", "domain", "method", "source", "enabled", "createdAt")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PublicWebhook + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PublicWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PublicWebhook is not found in the empty JSON string", PublicWebhook.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PublicWebhook.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PublicWebhook` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PublicWebhook.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + // validate the required field `event` + WebhookEventName.validateJsonElement(jsonObj.get("event")); + if (!jsonObj.get("domain").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `domain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain").toString())); + } + // validate the required field `method` + WebhookHTTPMethod.validateJsonElement(jsonObj.get("method")); + // validate the required field `source` + WebhookSource.validateJsonElement(jsonObj.get("source")); + if ((jsonObj.get("disabledReason") != null && !jsonObj.get("disabledReason").isJsonNull()) && !jsonObj.get("disabledReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `disabledReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disabledReason").toString())); + } + // validate the optional field `disabledReason` + if (jsonObj.get("disabledReason") != null && !jsonObj.get("disabledReason").isJsonNull()) { + DisabledReasonEnum.validateJsonElement(jsonObj.get("disabledReason")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PublicWebhook.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PublicWebhook' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PublicWebhook.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PublicWebhook value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PublicWebhook read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PublicWebhook given an JSON string + * + * @param jsonString JSON string + * @return An instance of PublicWebhook + * @throws IOException if the JSON string is invalid with respect to PublicWebhook + */ + public static PublicWebhook fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PublicWebhook.class); + } + + /** + * Convert an instance of PublicWebhook to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/QuestionCondition.java b/client/src/main/java/com/fastcomments/model/QuestionCondition.java new file mode 100644 index 00000000..f7572f08 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/QuestionCondition.java @@ -0,0 +1,235 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.QuestionConditionOperator; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * A rule evaluated against a question's answer. value is the score for nps/slider/star/emoji/scale, 1 or 0 for thumbs, and the option index for choice/multi. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class QuestionCondition { + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nonnull + private QuestionConditionOperator operator; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private Double value; + + public QuestionCondition() { + } + + public QuestionCondition operator(@javax.annotation.Nonnull QuestionConditionOperator operator) { + this.operator = operator; + return this; + } + + /** + * Get operator + * @return operator + */ + @javax.annotation.Nonnull + public QuestionConditionOperator getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nonnull QuestionConditionOperator operator) { + this.operator = operator; + } + + + public QuestionCondition value(@javax.annotation.Nonnull Double value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + public Double getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull Double value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuestionCondition questionCondition = (QuestionCondition) o; + return Objects.equals(this.operator, questionCondition.operator) && + Objects.equals(this.value, questionCondition.value); + } + + @Override + public int hashCode() { + return Objects.hash(operator, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuestionCondition {\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("operator", "value")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("operator", "value")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuestionCondition + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuestionCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in QuestionCondition is not found in the empty JSON string", QuestionCondition.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuestionCondition.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `QuestionCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : QuestionCondition.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `operator` + QuestionConditionOperator.validateJsonElement(jsonObj.get("operator")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuestionCondition.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuestionCondition' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuestionCondition.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuestionCondition value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuestionCondition read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuestionCondition given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuestionCondition + * @throws IOException if the JSON string is invalid with respect to QuestionCondition + */ + public static QuestionCondition fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuestionCondition.class); + } + + /** + * Convert an instance of QuestionCondition to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/QuestionConditionOperator.java b/client/src/main/java/com/fastcomments/model/QuestionConditionOperator.java new file mode 100644 index 00000000..aa135893 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/QuestionConditionOperator.java @@ -0,0 +1,90 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets QuestionConditionOperator + */ +@JsonAdapter(QuestionConditionOperator.Adapter.class) +public enum QuestionConditionOperator { + + LT("lt"), + + LTE("lte"), + + GT("gt"), + + GTE("gte"), + + EQ("eq"), + + NEQ("neq"), + + INCLUDES("includes"), + + EXCLUDES("excludes"); + + private String value; + + QuestionConditionOperator(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static QuestionConditionOperator fromValue(String value) { + for (QuestionConditionOperator b : QuestionConditionOperator.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final QuestionConditionOperator enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public QuestionConditionOperator read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return QuestionConditionOperator.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + QuestionConditionOperator.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/QuestionConfig.java b/client/src/main/java/com/fastcomments/model/QuestionConfig.java index 8af803c8..9eea4f79 100644 --- a/client/src/main/java/com/fastcomments/model/QuestionConfig.java +++ b/client/src/main/java/com/fastcomments/model/QuestionConfig.java @@ -14,7 +14,9 @@ package com.fastcomments.model; import java.util.Objects; +import com.fastcomments.model.QuestionCondition; import com.fastcomments.model.QuestionConfigCustomOptionsInner; +import com.fastcomments.model.SubQuestionCondition; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -154,6 +156,21 @@ public class QuestionConfig { @javax.annotation.Nonnull private Boolean alwaysShowSubQuestions; + public static final String SERIALIZED_NAME_SUB_QUESTION_CONDITIONS = "subQuestionConditions"; + @SerializedName(SERIALIZED_NAME_SUB_QUESTION_CONDITIONS) + @javax.annotation.Nullable + private List subQuestionConditions = new ArrayList<>(); + + public static final String SERIALIZED_NAME_COMMENT_BOX_CONDITION = "commentBoxCondition"; + @SerializedName(SERIALIZED_NAME_COMMENT_BOX_CONDITION) + @javax.annotation.Nullable + private QuestionCondition commentBoxCondition; + + public static final String SERIALIZED_NAME_COMMENT_BOX_PROMPT = "commentBoxPrompt"; + @SerializedName(SERIALIZED_NAME_COMMENT_BOX_PROMPT) + @javax.annotation.Nullable + private String commentBoxPrompt; + public static final String SERIALIZED_NAME_REPORTING_ORDER = "reportingOrder"; @SerializedName(SERIALIZED_NAME_REPORTING_ORDER) @javax.annotation.Nonnull @@ -358,7 +375,7 @@ public QuestionConfig type(@javax.annotation.Nonnull String type) { } /** - * Get type + * One of nps, slider, star, thumbs, choice, multi, emoji, scale. Answers: nps 0-10, slider min-max, star 1-numStars, thumbs 1 (up) or 0 (down), choice = option index, multi = option indexes (values), emoji/scale = option index + 1. * @return type */ @javax.annotation.Nonnull @@ -499,7 +516,7 @@ public QuestionConfig addCustomOptionsItem(QuestionConfigCustomOptionsInner cust } /** - * Get customOptions + * Option labels for choice, multi, emoji and scale questions. * @return customOptions */ @javax.annotation.Nonnull @@ -558,6 +575,71 @@ public void setAlwaysShowSubQuestions(@javax.annotation.Nonnull Boolean alwaysSh } + public QuestionConfig subQuestionConditions(@javax.annotation.Nullable List subQuestionConditions) { + this.subQuestionConditions = subQuestionConditions; + return this; + } + + public QuestionConfig addSubQuestionConditionsItem(SubQuestionCondition subQuestionConditionsItem) { + if (this.subQuestionConditions == null) { + this.subQuestionConditions = new ArrayList<>(); + } + this.subQuestionConditions.add(subQuestionConditionsItem); + return this; + } + + /** + * Sub-questions listed here only show when this question's answer matches. Others always show. + * @return subQuestionConditions + */ + @javax.annotation.Nullable + public List getSubQuestionConditions() { + return subQuestionConditions; + } + + public void setSubQuestionConditions(@javax.annotation.Nullable List subQuestionConditions) { + this.subQuestionConditions = subQuestionConditions; + } + + + public QuestionConfig commentBoxCondition(@javax.annotation.Nullable QuestionCondition commentBoxCondition) { + this.commentBoxCondition = commentBoxCondition; + return this; + } + + /** + * Get commentBoxCondition + * @return commentBoxCondition + */ + @javax.annotation.Nullable + public QuestionCondition getCommentBoxCondition() { + return commentBoxCondition; + } + + public void setCommentBoxCondition(@javax.annotation.Nullable QuestionCondition commentBoxCondition) { + this.commentBoxCondition = commentBoxCondition; + } + + + public QuestionConfig commentBoxPrompt(@javax.annotation.Nullable String commentBoxPrompt) { + this.commentBoxPrompt = commentBoxPrompt; + return this; + } + + /** + * Placeholder for the comment box when commentBoxCondition reveals it. + * @return commentBoxPrompt + */ + @javax.annotation.Nullable + public String getCommentBoxPrompt() { + return commentBoxPrompt; + } + + public void setCommentBoxPrompt(@javax.annotation.Nullable String commentBoxPrompt) { + this.commentBoxPrompt = commentBoxPrompt; + } + + public QuestionConfig reportingOrder(@javax.annotation.Nonnull Double reportingOrder) { this.reportingOrder = reportingOrder; return this; @@ -607,12 +689,15 @@ public boolean equals(Object o) { Objects.equals(this.customOptions, questionConfig.customOptions) && Objects.equals(this.subQuestionIds, questionConfig.subQuestionIds) && Objects.equals(this.alwaysShowSubQuestions, questionConfig.alwaysShowSubQuestions) && + Objects.equals(this.subQuestionConditions, questionConfig.subQuestionConditions) && + Objects.equals(this.commentBoxCondition, questionConfig.commentBoxCondition) && + Objects.equals(this.commentBoxPrompt, questionConfig.commentBoxPrompt) && Objects.equals(this.reportingOrder, questionConfig.reportingOrder); } @Override public int hashCode() { - return Objects.hash(id, tenantId, name, question, summaryLabel, helpText, createdAt, createdBy, usedCount, lastUsed, type, numStars, min, max, defaultValue, labelNegative, labelPositive, customOptions, subQuestionIds, alwaysShowSubQuestions, reportingOrder); + return Objects.hash(id, tenantId, name, question, summaryLabel, helpText, createdAt, createdBy, usedCount, lastUsed, type, numStars, min, max, defaultValue, labelNegative, labelPositive, customOptions, subQuestionIds, alwaysShowSubQuestions, subQuestionConditions, commentBoxCondition, commentBoxPrompt, reportingOrder); } @Override @@ -639,6 +724,9 @@ public String toString() { sb.append(" customOptions: ").append(toIndentedString(customOptions)).append("\n"); sb.append(" subQuestionIds: ").append(toIndentedString(subQuestionIds)).append("\n"); sb.append(" alwaysShowSubQuestions: ").append(toIndentedString(alwaysShowSubQuestions)).append("\n"); + sb.append(" subQuestionConditions: ").append(toIndentedString(subQuestionConditions)).append("\n"); + sb.append(" commentBoxCondition: ").append(toIndentedString(commentBoxCondition)).append("\n"); + sb.append(" commentBoxPrompt: ").append(toIndentedString(commentBoxPrompt)).append("\n"); sb.append(" reportingOrder: ").append(toIndentedString(reportingOrder)).append("\n"); sb.append("}"); return sb.toString(); @@ -658,7 +746,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "name", "question", "summaryLabel", "helpText", "createdAt", "createdBy", "usedCount", "lastUsed", "type", "numStars", "min", "max", "defaultValue", "labelNegative", "labelPositive", "customOptions", "subQuestionIds", "alwaysShowSubQuestions", "reportingOrder")); + openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "name", "question", "summaryLabel", "helpText", "createdAt", "createdBy", "usedCount", "lastUsed", "type", "numStars", "min", "max", "defaultValue", "labelNegative", "labelPositive", "customOptions", "subQuestionIds", "alwaysShowSubQuestions", "subQuestionConditions", "commentBoxCondition", "commentBoxPrompt", "reportingOrder")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("_id", "tenantId", "name", "question", "helpText", "createdAt", "createdBy", "usedCount", "lastUsed", "type", "numStars", "min", "max", "defaultValue", "labelNegative", "labelPositive", "customOptions", "subQuestionIds", "alwaysShowSubQuestions", "reportingOrder")); @@ -738,6 +826,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } else if (!jsonObj.get("subQuestionIds").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subQuestionIds` to be an array in the JSON string but got `%s`", jsonObj.get("subQuestionIds").toString())); } + if (jsonObj.get("subQuestionConditions") != null && !jsonObj.get("subQuestionConditions").isJsonNull()) { + JsonArray jsonArraysubQuestionConditions = jsonObj.getAsJsonArray("subQuestionConditions"); + if (jsonArraysubQuestionConditions != null) { + // ensure the json data is an array + if (!jsonObj.get("subQuestionConditions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subQuestionConditions` to be an array in the JSON string but got `%s`", jsonObj.get("subQuestionConditions").toString())); + } + + // validate the optional field `subQuestionConditions` (array) + for (int i = 0; i < jsonArraysubQuestionConditions.size(); i++) { + SubQuestionCondition.validateJsonElement(jsonArraysubQuestionConditions.get(i)); + }; + } + } + // validate the optional field `commentBoxCondition` + if (jsonObj.get("commentBoxCondition") != null && !jsonObj.get("commentBoxCondition").isJsonNull()) { + QuestionCondition.validateJsonElement(jsonObj.get("commentBoxCondition")); + } + if ((jsonObj.get("commentBoxPrompt") != null && !jsonObj.get("commentBoxPrompt").isJsonNull()) && !jsonObj.get("commentBoxPrompt").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentBoxPrompt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentBoxPrompt").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/java/com/fastcomments/model/QuestionResult.java b/client/src/main/java/com/fastcomments/model/QuestionResult.java index d4df838a..2aaabd24 100644 --- a/client/src/main/java/com/fastcomments/model/QuestionResult.java +++ b/client/src/main/java/com/fastcomments/model/QuestionResult.java @@ -89,6 +89,11 @@ public class QuestionResult { @javax.annotation.Nonnull private Integer value; + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + public static final String SERIALIZED_NAME_COMMENT_ID = "commentId"; @SerializedName(SERIALIZED_NAME_COMMENT_ID) @javax.annotation.Nullable @@ -232,7 +237,7 @@ public QuestionResult value(@javax.annotation.Nonnull Integer value) { } /** - * Get value + * The answer. For multi-choice questions this is the number of selected options and the options are in values. * @return value */ @javax.annotation.Nonnull @@ -245,6 +250,33 @@ public void setValue(@javax.annotation.Nonnull Integer value) { } + public QuestionResult values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public QuestionResult addValuesItem(Double valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Selected option indexes, multi-choice questions only. + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + public QuestionResult commentId(@javax.annotation.Nullable String commentId) { this.commentId = commentId; return this; @@ -346,6 +378,7 @@ public boolean equals(Object o) { Objects.equals(this.userId, questionResult.userId) && Objects.equals(this.createdAt, questionResult.createdAt) && Objects.equals(this.value, questionResult.value) && + Objects.equals(this.values, questionResult.values) && Objects.equals(this.commentId, questionResult.commentId) && Objects.equals(this.questionId, questionResult.questionId) && Objects.equals(this.meta, questionResult.meta) && @@ -354,7 +387,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, tenantId, urlId, anonUserId, userId, createdAt, value, commentId, questionId, meta, ipHash); + return Objects.hash(id, tenantId, urlId, anonUserId, userId, createdAt, value, values, commentId, questionId, meta, ipHash); } @Override @@ -368,6 +401,7 @@ public String toString() { sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); sb.append(" commentId: ").append(toIndentedString(commentId)).append("\n"); sb.append(" questionId: ").append(toIndentedString(questionId)).append("\n"); sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); @@ -390,7 +424,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "urlId", "anonUserId", "userId", "createdAt", "value", "commentId", "questionId", "meta", "ipHash")); + openapiFields = new HashSet(Arrays.asList("_id", "tenantId", "urlId", "anonUserId", "userId", "createdAt", "value", "values", "commentId", "questionId", "meta", "ipHash")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("_id", "tenantId", "urlId", "anonUserId", "userId", "createdAt", "value", "questionId", "ipHash")); @@ -439,6 +473,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("userId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } if ((jsonObj.get("commentId") != null && !jsonObj.get("commentId").isJsonNull()) && !jsonObj.get("commentId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentId").toString())); } diff --git a/client/src/main/java/com/fastcomments/model/QueuePageMigrationJobAPIResponse.java b/client/src/main/java/com/fastcomments/model/QueuePageMigrationJobAPIResponse.java new file mode 100644 index 00000000..14203de6 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/QueuePageMigrationJobAPIResponse.java @@ -0,0 +1,377 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * QueuePageMigrationJobAPIResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class QueuePageMigrationJobAPIResponse { + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nullable + private String reason; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nullable + private String code; + + public static final String SERIALIZED_NAME_BATCH_JOB_ID = "batchJobId"; + @SerializedName(SERIALIZED_NAME_BATCH_JOB_ID) + @javax.annotation.Nullable + private String batchJobId; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private String status; + + public QueuePageMigrationJobAPIResponse() { + } + + public QueuePageMigrationJobAPIResponse reason(@javax.annotation.Nullable String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nullable + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nullable String reason) { + this.reason = reason; + } + + + public QueuePageMigrationJobAPIResponse code(@javax.annotation.Nullable String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = code; + } + + + public QueuePageMigrationJobAPIResponse batchJobId(@javax.annotation.Nullable String batchJobId) { + this.batchJobId = batchJobId; + return this; + } + + /** + * Poll GET /api/v1/batch-jobs/{batchJobId} for progress and the result. + * @return batchJobId + */ + @javax.annotation.Nullable + public String getBatchJobId() { + return batchJobId; + } + + public void setBatchJobId(@javax.annotation.Nullable String batchJobId) { + this.batchJobId = batchJobId; + } + + + public QueuePageMigrationJobAPIResponse status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the QueuePageMigrationJobAPIResponse instance itself + */ + public QueuePageMigrationJobAPIResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueuePageMigrationJobAPIResponse queuePageMigrationJobAPIResponse = (QueuePageMigrationJobAPIResponse) o; + return Objects.equals(this.reason, queuePageMigrationJobAPIResponse.reason) && + Objects.equals(this.code, queuePageMigrationJobAPIResponse.code) && + Objects.equals(this.batchJobId, queuePageMigrationJobAPIResponse.batchJobId) && + Objects.equals(this.status, queuePageMigrationJobAPIResponse.status)&& + Objects.equals(this.additionalProperties, queuePageMigrationJobAPIResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(reason, code, batchJobId, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueuePageMigrationJobAPIResponse {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" batchJobId: ").append(toIndentedString(batchJobId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("reason", "code", "batchJobId", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QueuePageMigrationJobAPIResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueuePageMigrationJobAPIResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in QueuePageMigrationJobAPIResponse is not found in the empty JSON string", QueuePageMigrationJobAPIResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : QueuePageMigrationJobAPIResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("batchJobId") != null && !jsonObj.get("batchJobId").isJsonNull()) && !jsonObj.get("batchJobId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `batchJobId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("batchJobId").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QueuePageMigrationJobAPIResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QueuePageMigrationJobAPIResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QueuePageMigrationJobAPIResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QueuePageMigrationJobAPIResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public QueuePageMigrationJobAPIResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + QueuePageMigrationJobAPIResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QueuePageMigrationJobAPIResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueuePageMigrationJobAPIResponse + * @throws IOException if the JSON string is invalid with respect to QueuePageMigrationJobAPIResponse + */ + public static QueuePageMigrationJobAPIResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QueuePageMigrationJobAPIResponse.class); + } + + /** + * Convert an instance of QueuePageMigrationJobAPIResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValue.java b/client/src/main/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValue.java new file mode 100644 index 00000000..7ac001a5 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValue.java @@ -0,0 +1,336 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.fastcomments.invoker.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class RecordStringStringOrNumberOrNumberArrayValue extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(RecordStringStringOrNumberOrNumberArrayValue.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RecordStringStringOrNumberOrNumberArrayValue.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RecordStringStringOrNumberOrNumberArrayValue' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterString = gson.getDelegateAdapter(this, TypeToken.get(String.class)); + final TypeAdapter adapterDouble = gson.getDelegateAdapter(this, TypeToken.get(Double.class)); + + final Type typeInstanceListDouble = new TypeToken>(){}.getType(); + final TypeAdapter> adapterListDouble = (TypeAdapter>) gson.getDelegateAdapter(this, TypeToken.get(typeInstanceListDouble)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RecordStringStringOrNumberOrNumberArrayValue value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `String` + if (value.getActualInstance() instanceof String) { + JsonPrimitive primitive = adapterString.toJsonTree((String)value.getActualInstance()).getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `Double` + if (value.getActualInstance() instanceof Double) { + JsonPrimitive primitive = adapterDouble.toJsonTree((Double)value.getActualInstance()).getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `List` + if (value.getActualInstance() instanceof List) { + JsonPrimitive primitive = adapterListDouble.toJsonTree((List)value.getActualInstance()).getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: Double, List, String"); + } + + @Override + public RecordStringStringOrNumberOrNumberArrayValue read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize String + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be of type String in the JSON string but got `%s`", jsonElement.toString())); + } + actualAdapter = adapterString; + RecordStringStringOrNumberOrNumberArrayValue ret = new RecordStringStringOrNumberOrNumberArrayValue(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for String failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + // deserialize Double + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + actualAdapter = adapterDouble; + RecordStringStringOrNumberOrNumberArrayValue ret = new RecordStringStringOrNumberOrNumberArrayValue(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for Double failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + // deserialize List + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be a array type in the JSON string but got `%s`", jsonElement.toString())); + } + + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for(JsonElement element : array) { + if (!element.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected array items to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + } + actualAdapter = adapterListDouble; + RecordStringStringOrNumberOrNumberArrayValue ret = new RecordStringStringOrNumberOrNumberArrayValue(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for List failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'List'", e); + } + + throw new IOException(String.format(java.util.Locale.ROOT, "Failed deserialization for RecordStringStringOrNumberOrNumberArrayValue: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public RecordStringStringOrNumberOrNumberArrayValue() { + super("anyOf", Boolean.FALSE); + } + + public RecordStringStringOrNumberOrNumberArrayValue(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("String", String.class); + schemas.put("Double", Double.class); + schemas.put("List", List.class); + } + + @Override + public Map> getSchemas() { + return RecordStringStringOrNumberOrNumberArrayValue.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * Double, List<Double>, String + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof String) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Double) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof List) { + List list = (List) instance; + if (!list.isEmpty() && list.get(0) instanceof Double) { + super.setActualInstance(instance); + return; + } + } + + throw new RuntimeException("Invalid instance type. Must be Double, List, String"); + } + + /** + * Get the actual instance, which can be the following: + * Double, List<Double>, String + * + * @return The actual instance (Double, List<Double>, String) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } + + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } + + /** + * Get the actual instance of `List<Double>`. If the actual instance is not `List<Double>`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `List<Double>` + * @throws ClassCastException if the instance is not `List<Double>` + */ + public List getListDouble() throws ClassCastException { + return (List)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RecordStringStringOrNumberOrNumberArrayValue + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with String + try { + if (!jsonElement.getAsJsonPrimitive().isString()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be of type String in the JSON string but got `%s`", jsonElement.toString())); + } + return; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for String failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Double + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + return; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for Double failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with List + try { + if (!jsonElement.isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be a array type in the JSON string but got `%s`", jsonElement.toString())); + } + JsonArray array = jsonElement.getAsJsonArray(); + // validate array items + for(JsonElement element : array) { + if (!element.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected array items to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + } + return; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for List failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(java.util.Locale.ROOT, "The JSON string is invalid for RecordStringStringOrNumberOrNumberArrayValue with anyOf schemas: Double, List, String. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of RecordStringStringOrNumberOrNumberArrayValue given an JSON string + * + * @param jsonString JSON string + * @return An instance of RecordStringStringOrNumberOrNumberArrayValue + * @throws IOException if the JSON string is invalid with respect to RecordStringStringOrNumberOrNumberArrayValue + */ + public static RecordStringStringOrNumberOrNumberArrayValue fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RecordStringStringOrNumberOrNumberArrayValue.class); + } + + /** + * Convert an instance of RecordStringStringOrNumberOrNumberArrayValue to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/SavePollResponse.java b/client/src/main/java/com/fastcomments/model/SavePollResponse.java new file mode 100644 index 00000000..0717fe5f --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/SavePollResponse.java @@ -0,0 +1,238 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentPoll; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * SavePollResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class SavePollResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private APIStatus status; + + public static final String SERIALIZED_NAME_POLL = "poll"; + @SerializedName(SERIALIZED_NAME_POLL) + @javax.annotation.Nonnull + private CommentPoll poll; + + public SavePollResponse() { + } + + public SavePollResponse status(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public APIStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull APIStatus status) { + this.status = status; + } + + + public SavePollResponse poll(@javax.annotation.Nonnull CommentPoll poll) { + this.poll = poll; + return this; + } + + /** + * Get poll + * @return poll + */ + @javax.annotation.Nonnull + public CommentPoll getPoll() { + return poll; + } + + public void setPoll(@javax.annotation.Nonnull CommentPoll poll) { + this.poll = poll; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SavePollResponse savePollResponse = (SavePollResponse) o; + return Objects.equals(this.status, savePollResponse.status) && + Objects.equals(this.poll, savePollResponse.poll); + } + + @Override + public int hashCode() { + return Objects.hash(status, poll); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SavePollResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" poll: ").append(toIndentedString(poll)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "poll")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("status", "poll")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SavePollResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SavePollResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SavePollResponse is not found in the empty JSON string", SavePollResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SavePollResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `SavePollResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SavePollResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `status` + APIStatus.validateJsonElement(jsonObj.get("status")); + // validate the required field `poll` + CommentPoll.validateJsonElement(jsonObj.get("poll")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SavePollResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SavePollResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SavePollResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SavePollResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SavePollResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SavePollResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SavePollResponse + * @throws IOException if the JSON string is invalid with respect to SavePollResponse + */ + public static SavePollResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SavePollResponse.class); + } + + /** + * Convert an instance of SavePollResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/SubQuestionCondition.java b/client/src/main/java/com/fastcomments/model/SubQuestionCondition.java new file mode 100644 index 00000000..4dd0265f --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/SubQuestionCondition.java @@ -0,0 +1,264 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.QuestionConditionOperator; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * SubQuestionCondition + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class SubQuestionCondition { + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nonnull + private QuestionConditionOperator operator; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private Double value; + + public static final String SERIALIZED_NAME_SUB_QUESTION_ID = "subQuestionId"; + @SerializedName(SERIALIZED_NAME_SUB_QUESTION_ID) + @javax.annotation.Nonnull + private String subQuestionId; + + public SubQuestionCondition() { + } + + public SubQuestionCondition operator(@javax.annotation.Nonnull QuestionConditionOperator operator) { + this.operator = operator; + return this; + } + + /** + * Get operator + * @return operator + */ + @javax.annotation.Nonnull + public QuestionConditionOperator getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nonnull QuestionConditionOperator operator) { + this.operator = operator; + } + + + public SubQuestionCondition value(@javax.annotation.Nonnull Double value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + public Double getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull Double value) { + this.value = value; + } + + + public SubQuestionCondition subQuestionId(@javax.annotation.Nonnull String subQuestionId) { + this.subQuestionId = subQuestionId; + return this; + } + + /** + * Get subQuestionId + * @return subQuestionId + */ + @javax.annotation.Nonnull + public String getSubQuestionId() { + return subQuestionId; + } + + public void setSubQuestionId(@javax.annotation.Nonnull String subQuestionId) { + this.subQuestionId = subQuestionId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubQuestionCondition subQuestionCondition = (SubQuestionCondition) o; + return Objects.equals(this.operator, subQuestionCondition.operator) && + Objects.equals(this.value, subQuestionCondition.value) && + Objects.equals(this.subQuestionId, subQuestionCondition.subQuestionId); + } + + @Override + public int hashCode() { + return Objects.hash(operator, value, subQuestionId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubQuestionCondition {\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" subQuestionId: ").append(toIndentedString(subQuestionId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("operator", "value", "subQuestionId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("operator", "value", "subQuestionId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SubQuestionCondition + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SubQuestionCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SubQuestionCondition is not found in the empty JSON string", SubQuestionCondition.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SubQuestionCondition.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `SubQuestionCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SubQuestionCondition.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `operator` + QuestionConditionOperator.validateJsonElement(jsonObj.get("operator")); + if (!jsonObj.get("subQuestionId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subQuestionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subQuestionId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SubQuestionCondition.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SubQuestionCondition' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SubQuestionCondition.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SubQuestionCondition value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SubQuestionCondition read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SubQuestionCondition given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubQuestionCondition + * @throws IOException if the JSON string is invalid with respect to SubQuestionCondition + */ + public static SubQuestionCondition fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SubQuestionCondition.class); + } + + /** + * Convert an instance of SubQuestionCondition to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/TenantPackage.java b/client/src/main/java/com/fastcomments/model/TenantPackage.java index d67f32bf..293404be 100644 --- a/client/src/main/java/com/fastcomments/model/TenantPackage.java +++ b/client/src/main/java/com/fastcomments/model/TenantPackage.java @@ -333,6 +333,11 @@ public class TenantPackage { @javax.annotation.Nullable private Double flexSSOModeratorUnit; + public static final String SERIALIZED_NAME_FLEX_FREE_MODERATORS = "flexFreeModerators"; + @SerializedName(SERIALIZED_NAME_FLEX_FREE_MODERATORS) + @javax.annotation.Nullable + private Double flexFreeModerators; + public static final String SERIALIZED_NAME_IS_S_S_O_BILLING_MONTHLY_ACTIVE_USERS = "isSSOBillingMonthlyActiveUsers"; @SerializedName(SERIALIZED_NAME_IS_S_S_O_BILLING_MONTHLY_ACTIVE_USERS) @javax.annotation.Nullable @@ -1433,6 +1438,25 @@ public void setFlexSSOModeratorUnit(@javax.annotation.Nullable Double flexSSOMod } + public TenantPackage flexFreeModerators(@javax.annotation.Nullable Double flexFreeModerators) { + this.flexFreeModerators = flexFreeModerators; + return this; + } + + /** + * Get flexFreeModerators + * @return flexFreeModerators + */ + @javax.annotation.Nullable + public Double getFlexFreeModerators() { + return flexFreeModerators; + } + + public void setFlexFreeModerators(@javax.annotation.Nullable Double flexFreeModerators) { + this.flexFreeModerators = flexFreeModerators; + } + + public TenantPackage isSSOBillingMonthlyActiveUsers(@javax.annotation.Nullable Boolean isSSOBillingMonthlyActiveUsers) { this.isSSOBillingMonthlyActiveUsers = isSSOBillingMonthlyActiveUsers; return this; @@ -1594,6 +1618,7 @@ public boolean equals(Object o) { Objects.equals(this.flexSSOAdminUnit, tenantPackage.flexSSOAdminUnit) && Objects.equals(this.flexSSOModeratorCostCents, tenantPackage.flexSSOModeratorCostCents) && Objects.equals(this.flexSSOModeratorUnit, tenantPackage.flexSSOModeratorUnit) && + Objects.equals(this.flexFreeModerators, tenantPackage.flexFreeModerators) && Objects.equals(this.isSSOBillingMonthlyActiveUsers, tenantPackage.isSSOBillingMonthlyActiveUsers) && Objects.equals(this.hasAIAgents, tenantPackage.hasAIAgents) && Objects.equals(this.maxAIAgents, tenantPackage.maxAIAgents) && @@ -1603,7 +1628,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, name, tenantId, createdAt, templateId, monthlyCostUSD, yearlyCostUSD, monthlyStripePlanId, yearlyStripePlanId, maxMonthlyPageLoads, maxMonthlyAPICredits, maxMonthlySmallWidgetsCredits, maxMonthlyComments, maxConcurrentUsers, maxTenantUsers, maxSSOUsers, maxModerators, maxDomains, maxWhiteLabeledTenants, maxMonthlyEventLogRequests, maxCustomCollectionSize, hasWhiteLabeling, hasDebranding, hasLLMSpamDetection, forWhoText, featureTaglines, hasAuditing, hasFlexPricing, enableSAML, enableCanvasLTI, flexPageLoadCostCents, flexPageLoadUnit, flexCommentCostCents, flexCommentUnit, flexSSOUserCostCents, flexSSOUserUnit, flexAPICreditCostCents, flexAPICreditUnit, flexSmallWidgetsCreditCostCents, flexSmallWidgetsCreditUnit, flexModeratorCostCents, flexModeratorUnit, flexAdminCostCents, flexAdminUnit, flexDomainCostCents, flexDomainUnit, flexChatGPTCostCents, flexChatGPTUnit, flexLLMCostCents, flexLLMUnit, flexMinimumCostCents, flexManagedTenantCostCents, flexSSOAdminCostCents, flexSSOAdminUnit, flexSSOModeratorCostCents, flexSSOModeratorUnit, isSSOBillingMonthlyActiveUsers, hasAIAgents, maxAIAgents, aiAgentDailyBudgetCents, aiAgentMonthlyBudgetCents); + return Objects.hash(id, name, tenantId, createdAt, templateId, monthlyCostUSD, yearlyCostUSD, monthlyStripePlanId, yearlyStripePlanId, maxMonthlyPageLoads, maxMonthlyAPICredits, maxMonthlySmallWidgetsCredits, maxMonthlyComments, maxConcurrentUsers, maxTenantUsers, maxSSOUsers, maxModerators, maxDomains, maxWhiteLabeledTenants, maxMonthlyEventLogRequests, maxCustomCollectionSize, hasWhiteLabeling, hasDebranding, hasLLMSpamDetection, forWhoText, featureTaglines, hasAuditing, hasFlexPricing, enableSAML, enableCanvasLTI, flexPageLoadCostCents, flexPageLoadUnit, flexCommentCostCents, flexCommentUnit, flexSSOUserCostCents, flexSSOUserUnit, flexAPICreditCostCents, flexAPICreditUnit, flexSmallWidgetsCreditCostCents, flexSmallWidgetsCreditUnit, flexModeratorCostCents, flexModeratorUnit, flexAdminCostCents, flexAdminUnit, flexDomainCostCents, flexDomainUnit, flexChatGPTCostCents, flexChatGPTUnit, flexLLMCostCents, flexLLMUnit, flexMinimumCostCents, flexManagedTenantCostCents, flexSSOAdminCostCents, flexSSOAdminUnit, flexSSOModeratorCostCents, flexSSOModeratorUnit, flexFreeModerators, isSSOBillingMonthlyActiveUsers, hasAIAgents, maxAIAgents, aiAgentDailyBudgetCents, aiAgentMonthlyBudgetCents); } @Override @@ -1666,6 +1691,7 @@ public String toString() { sb.append(" flexSSOAdminUnit: ").append(toIndentedString(flexSSOAdminUnit)).append("\n"); sb.append(" flexSSOModeratorCostCents: ").append(toIndentedString(flexSSOModeratorCostCents)).append("\n"); sb.append(" flexSSOModeratorUnit: ").append(toIndentedString(flexSSOModeratorUnit)).append("\n"); + sb.append(" flexFreeModerators: ").append(toIndentedString(flexFreeModerators)).append("\n"); sb.append(" isSSOBillingMonthlyActiveUsers: ").append(toIndentedString(isSSOBillingMonthlyActiveUsers)).append("\n"); sb.append(" hasAIAgents: ").append(toIndentedString(hasAIAgents)).append("\n"); sb.append(" maxAIAgents: ").append(toIndentedString(maxAIAgents)).append("\n"); @@ -1689,7 +1715,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("_id", "name", "tenantId", "createdAt", "templateId", "monthlyCostUSD", "yearlyCostUSD", "monthlyStripePlanId", "yearlyStripePlanId", "maxMonthlyPageLoads", "maxMonthlyAPICredits", "maxMonthlySmallWidgetsCredits", "maxMonthlyComments", "maxConcurrentUsers", "maxTenantUsers", "maxSSOUsers", "maxModerators", "maxDomains", "maxWhiteLabeledTenants", "maxMonthlyEventLogRequests", "maxCustomCollectionSize", "hasWhiteLabeling", "hasDebranding", "hasLLMSpamDetection", "forWhoText", "featureTaglines", "hasAuditing", "hasFlexPricing", "enableSAML", "enableCanvasLTI", "flexPageLoadCostCents", "flexPageLoadUnit", "flexCommentCostCents", "flexCommentUnit", "flexSSOUserCostCents", "flexSSOUserUnit", "flexAPICreditCostCents", "flexAPICreditUnit", "flexSmallWidgetsCreditCostCents", "flexSmallWidgetsCreditUnit", "flexModeratorCostCents", "flexModeratorUnit", "flexAdminCostCents", "flexAdminUnit", "flexDomainCostCents", "flexDomainUnit", "flexChatGPTCostCents", "flexChatGPTUnit", "flexLLMCostCents", "flexLLMUnit", "flexMinimumCostCents", "flexManagedTenantCostCents", "flexSSOAdminCostCents", "flexSSOAdminUnit", "flexSSOModeratorCostCents", "flexSSOModeratorUnit", "isSSOBillingMonthlyActiveUsers", "hasAIAgents", "maxAIAgents", "aiAgentDailyBudgetCents", "aiAgentMonthlyBudgetCents")); + openapiFields = new HashSet(Arrays.asList("_id", "name", "tenantId", "createdAt", "templateId", "monthlyCostUSD", "yearlyCostUSD", "monthlyStripePlanId", "yearlyStripePlanId", "maxMonthlyPageLoads", "maxMonthlyAPICredits", "maxMonthlySmallWidgetsCredits", "maxMonthlyComments", "maxConcurrentUsers", "maxTenantUsers", "maxSSOUsers", "maxModerators", "maxDomains", "maxWhiteLabeledTenants", "maxMonthlyEventLogRequests", "maxCustomCollectionSize", "hasWhiteLabeling", "hasDebranding", "hasLLMSpamDetection", "forWhoText", "featureTaglines", "hasAuditing", "hasFlexPricing", "enableSAML", "enableCanvasLTI", "flexPageLoadCostCents", "flexPageLoadUnit", "flexCommentCostCents", "flexCommentUnit", "flexSSOUserCostCents", "flexSSOUserUnit", "flexAPICreditCostCents", "flexAPICreditUnit", "flexSmallWidgetsCreditCostCents", "flexSmallWidgetsCreditUnit", "flexModeratorCostCents", "flexModeratorUnit", "flexAdminCostCents", "flexAdminUnit", "flexDomainCostCents", "flexDomainUnit", "flexChatGPTCostCents", "flexChatGPTUnit", "flexLLMCostCents", "flexLLMUnit", "flexMinimumCostCents", "flexManagedTenantCostCents", "flexSSOAdminCostCents", "flexSSOAdminUnit", "flexSSOModeratorCostCents", "flexSSOModeratorUnit", "flexFreeModerators", "isSSOBillingMonthlyActiveUsers", "hasAIAgents", "maxAIAgents", "aiAgentDailyBudgetCents", "aiAgentMonthlyBudgetCents")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("_id", "name", "tenantId", "createdAt", "monthlyCostUSD", "yearlyCostUSD", "monthlyStripePlanId", "yearlyStripePlanId", "maxMonthlyPageLoads", "maxMonthlyAPICredits", "maxMonthlySmallWidgetsCredits", "maxMonthlyComments", "maxConcurrentUsers", "maxTenantUsers", "maxSSOUsers", "maxModerators", "maxDomains", "maxWhiteLabeledTenants", "maxMonthlyEventLogRequests", "maxCustomCollectionSize", "hasWhiteLabeling", "hasDebranding", "hasLLMSpamDetection", "forWhoText", "featureTaglines", "hasAuditing", "hasFlexPricing")); diff --git a/client/src/main/java/com/fastcomments/model/UpdateQuestionConfigBody.java b/client/src/main/java/com/fastcomments/model/UpdateQuestionConfigBody.java index 7b8248ce..4dcd184b 100644 --- a/client/src/main/java/com/fastcomments/model/UpdateQuestionConfigBody.java +++ b/client/src/main/java/com/fastcomments/model/UpdateQuestionConfigBody.java @@ -14,7 +14,9 @@ package com.fastcomments.model; import java.util.Objects; +import com.fastcomments.model.QuestionCondition; import com.fastcomments.model.QuestionConfigCustomOptionsInner; +import com.fastcomments.model.SubQuestionCondition; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -118,6 +120,21 @@ public class UpdateQuestionConfigBody { @javax.annotation.Nullable private Boolean alwaysShowSubQuestions; + public static final String SERIALIZED_NAME_SUB_QUESTION_CONDITIONS = "subQuestionConditions"; + @SerializedName(SERIALIZED_NAME_SUB_QUESTION_CONDITIONS) + @javax.annotation.Nullable + private List subQuestionConditions = new ArrayList<>(); + + public static final String SERIALIZED_NAME_COMMENT_BOX_CONDITION = "commentBoxCondition"; + @SerializedName(SERIALIZED_NAME_COMMENT_BOX_CONDITION) + @javax.annotation.Nullable + private QuestionCondition commentBoxCondition; + + public static final String SERIALIZED_NAME_COMMENT_BOX_PROMPT = "commentBoxPrompt"; + @SerializedName(SERIALIZED_NAME_COMMENT_BOX_PROMPT) + @javax.annotation.Nullable + private String commentBoxPrompt; + public static final String SERIALIZED_NAME_REPORTING_ORDER = "reportingOrder"; @SerializedName(SERIALIZED_NAME_REPORTING_ORDER) @javax.annotation.Nullable @@ -189,7 +206,7 @@ public UpdateQuestionConfigBody type(@javax.annotation.Nullable String type) { } /** - * Get type + * One of nps, slider, star, thumbs, choice, multi, emoji, scale. * @return type */ @javax.annotation.Nullable @@ -389,6 +406,71 @@ public void setAlwaysShowSubQuestions(@javax.annotation.Nullable Boolean alwaysS } + public UpdateQuestionConfigBody subQuestionConditions(@javax.annotation.Nullable List subQuestionConditions) { + this.subQuestionConditions = subQuestionConditions; + return this; + } + + public UpdateQuestionConfigBody addSubQuestionConditionsItem(SubQuestionCondition subQuestionConditionsItem) { + if (this.subQuestionConditions == null) { + this.subQuestionConditions = new ArrayList<>(); + } + this.subQuestionConditions.add(subQuestionConditionsItem); + return this; + } + + /** + * Get subQuestionConditions + * @return subQuestionConditions + */ + @javax.annotation.Nullable + public List getSubQuestionConditions() { + return subQuestionConditions; + } + + public void setSubQuestionConditions(@javax.annotation.Nullable List subQuestionConditions) { + this.subQuestionConditions = subQuestionConditions; + } + + + public UpdateQuestionConfigBody commentBoxCondition(@javax.annotation.Nullable QuestionCondition commentBoxCondition) { + this.commentBoxCondition = commentBoxCondition; + return this; + } + + /** + * Get commentBoxCondition + * @return commentBoxCondition + */ + @javax.annotation.Nullable + public QuestionCondition getCommentBoxCondition() { + return commentBoxCondition; + } + + public void setCommentBoxCondition(@javax.annotation.Nullable QuestionCondition commentBoxCondition) { + this.commentBoxCondition = commentBoxCondition; + } + + + public UpdateQuestionConfigBody commentBoxPrompt(@javax.annotation.Nullable String commentBoxPrompt) { + this.commentBoxPrompt = commentBoxPrompt; + return this; + } + + /** + * Get commentBoxPrompt + * @return commentBoxPrompt + */ + @javax.annotation.Nullable + public String getCommentBoxPrompt() { + return commentBoxPrompt; + } + + public void setCommentBoxPrompt(@javax.annotation.Nullable String commentBoxPrompt) { + this.commentBoxPrompt = commentBoxPrompt; + } + + public UpdateQuestionConfigBody reportingOrder(@javax.annotation.Nullable Double reportingOrder) { this.reportingOrder = reportingOrder; return this; @@ -475,13 +557,16 @@ public boolean equals(Object o) { Objects.equals(this.customOptions, updateQuestionConfigBody.customOptions) && Objects.equals(this.subQuestionIds, updateQuestionConfigBody.subQuestionIds) && Objects.equals(this.alwaysShowSubQuestions, updateQuestionConfigBody.alwaysShowSubQuestions) && + Objects.equals(this.subQuestionConditions, updateQuestionConfigBody.subQuestionConditions) && + Objects.equals(this.commentBoxCondition, updateQuestionConfigBody.commentBoxCondition) && + Objects.equals(this.commentBoxPrompt, updateQuestionConfigBody.commentBoxPrompt) && Objects.equals(this.reportingOrder, updateQuestionConfigBody.reportingOrder)&& Objects.equals(this.additionalProperties, updateQuestionConfigBody.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, question, helpText, type, numStars, min, max, defaultValue, labelNegative, labelPositive, customOptions, subQuestionIds, alwaysShowSubQuestions, reportingOrder, additionalProperties); + return Objects.hash(name, question, helpText, type, numStars, min, max, defaultValue, labelNegative, labelPositive, customOptions, subQuestionIds, alwaysShowSubQuestions, subQuestionConditions, commentBoxCondition, commentBoxPrompt, reportingOrder, additionalProperties); } @Override @@ -501,6 +586,9 @@ public String toString() { sb.append(" customOptions: ").append(toIndentedString(customOptions)).append("\n"); sb.append(" subQuestionIds: ").append(toIndentedString(subQuestionIds)).append("\n"); sb.append(" alwaysShowSubQuestions: ").append(toIndentedString(alwaysShowSubQuestions)).append("\n"); + sb.append(" subQuestionConditions: ").append(toIndentedString(subQuestionConditions)).append("\n"); + sb.append(" commentBoxCondition: ").append(toIndentedString(commentBoxCondition)).append("\n"); + sb.append(" commentBoxPrompt: ").append(toIndentedString(commentBoxPrompt)).append("\n"); sb.append(" reportingOrder: ").append(toIndentedString(reportingOrder)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -521,7 +609,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "question", "helpText", "type", "numStars", "min", "max", "defaultValue", "labelNegative", "labelPositive", "customOptions", "subQuestionIds", "alwaysShowSubQuestions", "reportingOrder")); + openapiFields = new HashSet(Arrays.asList("name", "question", "helpText", "type", "numStars", "min", "max", "defaultValue", "labelNegative", "labelPositive", "customOptions", "subQuestionIds", "alwaysShowSubQuestions", "subQuestionConditions", "commentBoxCondition", "commentBoxPrompt", "reportingOrder")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -576,6 +664,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("subQuestionIds") != null && !jsonObj.get("subQuestionIds").isJsonNull() && !jsonObj.get("subQuestionIds").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subQuestionIds` to be an array in the JSON string but got `%s`", jsonObj.get("subQuestionIds").toString())); } + if (jsonObj.get("subQuestionConditions") != null && !jsonObj.get("subQuestionConditions").isJsonNull()) { + JsonArray jsonArraysubQuestionConditions = jsonObj.getAsJsonArray("subQuestionConditions"); + if (jsonArraysubQuestionConditions != null) { + // ensure the json data is an array + if (!jsonObj.get("subQuestionConditions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subQuestionConditions` to be an array in the JSON string but got `%s`", jsonObj.get("subQuestionConditions").toString())); + } + + // validate the optional field `subQuestionConditions` (array) + for (int i = 0; i < jsonArraysubQuestionConditions.size(); i++) { + SubQuestionCondition.validateJsonElement(jsonArraysubQuestionConditions.get(i)); + }; + } + } + // validate the optional field `commentBoxCondition` + if (jsonObj.get("commentBoxCondition") != null && !jsonObj.get("commentBoxCondition").isJsonNull()) { + QuestionCondition.validateJsonElement(jsonObj.get("commentBoxCondition")); + } + if ((jsonObj.get("commentBoxPrompt") != null && !jsonObj.get("commentBoxPrompt").isJsonNull()) && !jsonObj.get("commentBoxPrompt").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentBoxPrompt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentBoxPrompt").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/java/com/fastcomments/model/UpdateQuestionResultBody.java b/client/src/main/java/com/fastcomments/model/UpdateQuestionResultBody.java index a127eaf0..1e33794c 100644 --- a/client/src/main/java/com/fastcomments/model/UpdateQuestionResultBody.java +++ b/client/src/main/java/com/fastcomments/model/UpdateQuestionResultBody.java @@ -73,6 +73,11 @@ public class UpdateQuestionResultBody { @javax.annotation.Nullable private Double value; + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + public static final String SERIALIZED_NAME_COMMENT_ID = "commentId"; @SerializedName(SERIALIZED_NAME_COMMENT_ID) @javax.annotation.Nullable @@ -167,6 +172,33 @@ public void setValue(@javax.annotation.Nullable Double value) { } + public UpdateQuestionResultBody values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public UpdateQuestionResultBody addValuesItem(Double valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Selected option indexes for multi-choice questions. + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + public UpdateQuestionResultBody commentId(@javax.annotation.Nullable String commentId) { this.commentId = commentId; return this; @@ -290,6 +322,7 @@ public boolean equals(Object o) { Objects.equals(this.anonUserId, updateQuestionResultBody.anonUserId) && Objects.equals(this.userId, updateQuestionResultBody.userId) && Objects.equals(this.value, updateQuestionResultBody.value) && + Objects.equals(this.values, updateQuestionResultBody.values) && Objects.equals(this.commentId, updateQuestionResultBody.commentId) && Objects.equals(this.questionId, updateQuestionResultBody.questionId) && Objects.equals(this.meta, updateQuestionResultBody.meta)&& @@ -298,7 +331,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(urlId, anonUserId, userId, value, commentId, questionId, meta, additionalProperties); + return Objects.hash(urlId, anonUserId, userId, value, values, commentId, questionId, meta, additionalProperties); } @Override @@ -309,6 +342,7 @@ public String toString() { sb.append(" anonUserId: ").append(toIndentedString(anonUserId)).append("\n"); sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); sb.append(" commentId: ").append(toIndentedString(commentId)).append("\n"); sb.append(" questionId: ").append(toIndentedString(questionId)).append("\n"); sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); @@ -331,7 +365,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("urlId", "anonUserId", "userId", "value", "commentId", "questionId", "meta")); + openapiFields = new HashSet(Arrays.asList("urlId", "anonUserId", "userId", "value", "values", "commentId", "questionId", "meta")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -359,6 +393,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("userId") != null && !jsonObj.get("userId").isJsonNull()) && !jsonObj.get("userId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } if ((jsonObj.get("commentId") != null && !jsonObj.get("commentId").isJsonNull()) && !jsonObj.get("commentId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentId").toString())); } diff --git a/client/src/main/java/com/fastcomments/model/UpdateTenantBody.java b/client/src/main/java/com/fastcomments/model/UpdateTenantBody.java index 70a58714..145ce506 100644 --- a/client/src/main/java/com/fastcomments/model/UpdateTenantBody.java +++ b/client/src/main/java/com/fastcomments/model/UpdateTenantBody.java @@ -91,11 +91,6 @@ public class UpdateTenantBody { @javax.annotation.Nullable private Boolean billingHandledExternally; - public static final String SERIALIZED_NAME_CREATED_BY = "createdBy"; - @SerializedName(SERIALIZED_NAME_CREATED_BY) - @javax.annotation.Nullable - private String createdBy; - public static final String SERIALIZED_NAME_IS_SETUP = "isSetup"; @SerializedName(SERIALIZED_NAME_IS_SETUP) @javax.annotation.Nullable @@ -312,25 +307,6 @@ public void setBillingHandledExternally(@javax.annotation.Nullable Boolean billi } - public UpdateTenantBody createdBy(@javax.annotation.Nullable String createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get createdBy - * @return createdBy - */ - @javax.annotation.Nullable - public String getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(@javax.annotation.Nullable String createdBy) { - this.createdBy = createdBy; - } - - public UpdateTenantBody isSetup(@javax.annotation.Nullable Boolean isSetup) { this.isSetup = isSetup; return this; @@ -668,7 +644,6 @@ public boolean equals(Object o) { Objects.equals(this.paymentFrequency, updateTenantBody.paymentFrequency) && Objects.equals(this.billingInfoValid, updateTenantBody.billingInfoValid) && Objects.equals(this.billingHandledExternally, updateTenantBody.billingHandledExternally) && - Objects.equals(this.createdBy, updateTenantBody.createdBy) && Objects.equals(this.isSetup, updateTenantBody.isSetup) && Objects.equals(this.domainConfiguration, updateTenantBody.domainConfiguration) && Objects.equals(this.billingInfo, updateTenantBody.billingInfo) && @@ -689,7 +664,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(name, email, signUpDate, packageId, paymentFrequency, billingInfoValid, billingHandledExternally, createdBy, isSetup, domainConfiguration, billingInfo, stripeCustomerId, stripeSubscriptionId, stripePlanId, enableProfanityFilter, enableSpamFilter, removeUnverifiedComments, unverifiedCommentsTTLms, commentsRequireApproval, autoApproveCommentOnVerification, sendProfaneToSpam, deAnonIpAddr, meta, managedByTenantId); + return Objects.hash(name, email, signUpDate, packageId, paymentFrequency, billingInfoValid, billingHandledExternally, isSetup, domainConfiguration, billingInfo, stripeCustomerId, stripeSubscriptionId, stripePlanId, enableProfanityFilter, enableSpamFilter, removeUnverifiedComments, unverifiedCommentsTTLms, commentsRequireApproval, autoApproveCommentOnVerification, sendProfaneToSpam, deAnonIpAddr, meta, managedByTenantId); } @Override @@ -703,7 +678,6 @@ public String toString() { sb.append(" paymentFrequency: ").append(toIndentedString(paymentFrequency)).append("\n"); sb.append(" billingInfoValid: ").append(toIndentedString(billingInfoValid)).append("\n"); sb.append(" billingHandledExternally: ").append(toIndentedString(billingHandledExternally)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); sb.append(" isSetup: ").append(toIndentedString(isSetup)).append("\n"); sb.append(" domainConfiguration: ").append(toIndentedString(domainConfiguration)).append("\n"); sb.append(" billingInfo: ").append(toIndentedString(billingInfo)).append("\n"); @@ -738,7 +712,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "email", "signUpDate", "packageId", "paymentFrequency", "billingInfoValid", "billingHandledExternally", "createdBy", "isSetup", "domainConfiguration", "billingInfo", "stripeCustomerId", "stripeSubscriptionId", "stripePlanId", "enableProfanityFilter", "enableSpamFilter", "removeUnverifiedComments", "unverifiedCommentsTTLms", "commentsRequireApproval", "autoApproveCommentOnVerification", "sendProfaneToSpam", "deAnonIpAddr", "meta", "managedByTenantId")); + openapiFields = new HashSet(Arrays.asList("name", "email", "signUpDate", "packageId", "paymentFrequency", "billingInfoValid", "billingHandledExternally", "isSetup", "domainConfiguration", "billingInfo", "stripeCustomerId", "stripeSubscriptionId", "stripePlanId", "enableProfanityFilter", "enableSpamFilter", "removeUnverifiedComments", "unverifiedCommentsTTLms", "commentsRequireApproval", "autoApproveCommentOnVerification", "sendProfaneToSpam", "deAnonIpAddr", "meta", "managedByTenantId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -774,9 +748,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("packageId") != null && !jsonObj.get("packageId").isJsonNull()) && !jsonObj.get("packageId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `packageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("packageId").toString())); } - if ((jsonObj.get("createdBy") != null && !jsonObj.get("createdBy").isJsonNull()) && !jsonObj.get("createdBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `createdBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdBy").toString())); - } if (jsonObj.get("domainConfiguration") != null && !jsonObj.get("domainConfiguration").isJsonNull()) { JsonArray jsonArraydomainConfiguration = jsonObj.getAsJsonArray("domainConfiguration"); if (jsonArraydomainConfiguration != null) { diff --git a/client/src/main/java/com/fastcomments/model/WebhookComment.java b/client/src/main/java/com/fastcomments/model/WebhookComment.java new file mode 100644 index 00000000..297f600d --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/WebhookComment.java @@ -0,0 +1,1014 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.fastcomments.model.CommentUserMentionInfo; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.fastcomments.invoker.JSON; + +/** + * WebhookComment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class WebhookComment { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_URL_ID = "urlId"; + @SerializedName(SERIALIZED_NAME_URL_ID) + @javax.annotation.Nonnull + private String urlId; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nullable + private String url; + + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nullable + private String userId; + + public static final String SERIALIZED_NAME_COMMENTER_EMAIL = "commenterEmail"; + @SerializedName(SERIALIZED_NAME_COMMENTER_EMAIL) + @javax.annotation.Nullable + private String commenterEmail; + + public static final String SERIALIZED_NAME_COMMENTER_NAME = "commenterName"; + @SerializedName(SERIALIZED_NAME_COMMENTER_NAME) + @javax.annotation.Nonnull + private String commenterName; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nonnull + private String comment; + + public static final String SERIALIZED_NAME_COMMENT_H_T_M_L = "commentHTML"; + @SerializedName(SERIALIZED_NAME_COMMENT_H_T_M_L) + @javax.annotation.Nonnull + private String commentHTML; + + public static final String SERIALIZED_NAME_EXTERNAL_ID = "externalId"; + @SerializedName(SERIALIZED_NAME_EXTERNAL_ID) + @javax.annotation.Nullable + private String externalId; + + public static final String SERIALIZED_NAME_PARENT_ID = "parentId"; + @SerializedName(SERIALIZED_NAME_PARENT_ID) + @javax.annotation.Nullable + private String parentId; + + public static final String SERIALIZED_NAME_DATE = "date"; + @SerializedName(SERIALIZED_NAME_DATE) + @javax.annotation.Nonnull + private String date; + + public static final String SERIALIZED_NAME_VOTES = "votes"; + @SerializedName(SERIALIZED_NAME_VOTES) + @javax.annotation.Nonnull + private Double votes; + + public static final String SERIALIZED_NAME_VOTES_UP = "votesUp"; + @SerializedName(SERIALIZED_NAME_VOTES_UP) + @javax.annotation.Nonnull + private Double votesUp; + + public static final String SERIALIZED_NAME_VOTES_DOWN = "votesDown"; + @SerializedName(SERIALIZED_NAME_VOTES_DOWN) + @javax.annotation.Nonnull + private Double votesDown; + + public static final String SERIALIZED_NAME_VERIFIED = "verified"; + @SerializedName(SERIALIZED_NAME_VERIFIED) + @javax.annotation.Nonnull + private Boolean verified; + + public static final String SERIALIZED_NAME_VERIFIED_DATE = "verifiedDate"; + @SerializedName(SERIALIZED_NAME_VERIFIED_DATE) + @javax.annotation.Nullable + private String verifiedDate; + + public static final String SERIALIZED_NAME_REVIEWED = "reviewed"; + @SerializedName(SERIALIZED_NAME_REVIEWED) + @javax.annotation.Nonnull + private Boolean reviewed; + + public static final String SERIALIZED_NAME_AVATAR_SRC = "avatarSrc"; + @SerializedName(SERIALIZED_NAME_AVATAR_SRC) + @javax.annotation.Nullable + private String avatarSrc; + + public static final String SERIALIZED_NAME_IS_SPAM = "isSpam"; + @SerializedName(SERIALIZED_NAME_IS_SPAM) + @javax.annotation.Nonnull + private Boolean isSpam; + + public static final String SERIALIZED_NAME_AI_DETERMINED_SPAM = "aiDeterminedSpam"; + @SerializedName(SERIALIZED_NAME_AI_DETERMINED_SPAM) + @javax.annotation.Nonnull + private Boolean aiDeterminedSpam; + + public static final String SERIALIZED_NAME_HAS_IMAGES = "hasImages"; + @SerializedName(SERIALIZED_NAME_HAS_IMAGES) + @javax.annotation.Nonnull + private Boolean hasImages; + + public static final String SERIALIZED_NAME_PAGE_NUMBER = "pageNumber"; + @SerializedName(SERIALIZED_NAME_PAGE_NUMBER) + @javax.annotation.Nullable + private Double pageNumber; + + public static final String SERIALIZED_NAME_PAGE_NUMBER_O_F = "pageNumberOF"; + @SerializedName(SERIALIZED_NAME_PAGE_NUMBER_O_F) + @javax.annotation.Nullable + private Double pageNumberOF; + + public static final String SERIALIZED_NAME_PAGE_NUMBER_N_F = "pageNumberNF"; + @SerializedName(SERIALIZED_NAME_PAGE_NUMBER_N_F) + @javax.annotation.Nullable + private Double pageNumberNF; + + public static final String SERIALIZED_NAME_APPROVED = "approved"; + @SerializedName(SERIALIZED_NAME_APPROVED) + @javax.annotation.Nonnull + private Boolean approved; + + public static final String SERIALIZED_NAME_LOCALE = "locale"; + @SerializedName(SERIALIZED_NAME_LOCALE) + @javax.annotation.Nullable + private String locale; + + public static final String SERIALIZED_NAME_MENTIONS = "mentions"; + @SerializedName(SERIALIZED_NAME_MENTIONS) + @javax.annotation.Nonnull + private List mentions = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DOMAIN = "domain"; + @SerializedName(SERIALIZED_NAME_DOMAIN) + @javax.annotation.Nullable + private String domain; + + public static final String SERIALIZED_NAME_MODERATION_GROUP_IDS = "moderationGroupIds"; + @SerializedName(SERIALIZED_NAME_MODERATION_GROUP_IDS) + @javax.annotation.Nonnull + private List moderationGroupIds = new ArrayList<>(); + + public WebhookComment() { + } + + public WebhookComment id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public WebhookComment urlId(@javax.annotation.Nonnull String urlId) { + this.urlId = urlId; + return this; + } + + /** + * Get urlId + * @return urlId + */ + @javax.annotation.Nonnull + public String getUrlId() { + return urlId; + } + + public void setUrlId(@javax.annotation.Nonnull String urlId) { + this.urlId = urlId; + } + + + public WebhookComment url(@javax.annotation.Nullable String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + */ + @javax.annotation.Nullable + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nullable String url) { + this.url = url; + } + + + public WebhookComment userId(@javax.annotation.Nullable String userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nullable + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nullable String userId) { + this.userId = userId; + } + + + public WebhookComment commenterEmail(@javax.annotation.Nullable String commenterEmail) { + this.commenterEmail = commenterEmail; + return this; + } + + /** + * Get commenterEmail + * @return commenterEmail + */ + @javax.annotation.Nullable + public String getCommenterEmail() { + return commenterEmail; + } + + public void setCommenterEmail(@javax.annotation.Nullable String commenterEmail) { + this.commenterEmail = commenterEmail; + } + + + public WebhookComment commenterName(@javax.annotation.Nonnull String commenterName) { + this.commenterName = commenterName; + return this; + } + + /** + * Get commenterName + * @return commenterName + */ + @javax.annotation.Nonnull + public String getCommenterName() { + return commenterName; + } + + public void setCommenterName(@javax.annotation.Nonnull String commenterName) { + this.commenterName = commenterName; + } + + + public WebhookComment comment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + return this; + } + + /** + * Get comment + * @return comment + */ + @javax.annotation.Nonnull + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + } + + + public WebhookComment commentHTML(@javax.annotation.Nonnull String commentHTML) { + this.commentHTML = commentHTML; + return this; + } + + /** + * Get commentHTML + * @return commentHTML + */ + @javax.annotation.Nonnull + public String getCommentHTML() { + return commentHTML; + } + + public void setCommentHTML(@javax.annotation.Nonnull String commentHTML) { + this.commentHTML = commentHTML; + } + + + public WebhookComment externalId(@javax.annotation.Nullable String externalId) { + this.externalId = externalId; + return this; + } + + /** + * Get externalId + * @return externalId + */ + @javax.annotation.Nullable + public String getExternalId() { + return externalId; + } + + public void setExternalId(@javax.annotation.Nullable String externalId) { + this.externalId = externalId; + } + + + public WebhookComment parentId(@javax.annotation.Nullable String parentId) { + this.parentId = parentId; + return this; + } + + /** + * Get parentId + * @return parentId + */ + @javax.annotation.Nullable + public String getParentId() { + return parentId; + } + + public void setParentId(@javax.annotation.Nullable String parentId) { + this.parentId = parentId; + } + + + public WebhookComment date(@javax.annotation.Nonnull String date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @javax.annotation.Nonnull + public String getDate() { + return date; + } + + public void setDate(@javax.annotation.Nonnull String date) { + this.date = date; + } + + + public WebhookComment votes(@javax.annotation.Nonnull Double votes) { + this.votes = votes; + return this; + } + + /** + * Get votes + * @return votes + */ + @javax.annotation.Nonnull + public Double getVotes() { + return votes; + } + + public void setVotes(@javax.annotation.Nonnull Double votes) { + this.votes = votes; + } + + + public WebhookComment votesUp(@javax.annotation.Nonnull Double votesUp) { + this.votesUp = votesUp; + return this; + } + + /** + * Get votesUp + * @return votesUp + */ + @javax.annotation.Nonnull + public Double getVotesUp() { + return votesUp; + } + + public void setVotesUp(@javax.annotation.Nonnull Double votesUp) { + this.votesUp = votesUp; + } + + + public WebhookComment votesDown(@javax.annotation.Nonnull Double votesDown) { + this.votesDown = votesDown; + return this; + } + + /** + * Get votesDown + * @return votesDown + */ + @javax.annotation.Nonnull + public Double getVotesDown() { + return votesDown; + } + + public void setVotesDown(@javax.annotation.Nonnull Double votesDown) { + this.votesDown = votesDown; + } + + + public WebhookComment verified(@javax.annotation.Nonnull Boolean verified) { + this.verified = verified; + return this; + } + + /** + * Get verified + * @return verified + */ + @javax.annotation.Nonnull + public Boolean getVerified() { + return verified; + } + + public void setVerified(@javax.annotation.Nonnull Boolean verified) { + this.verified = verified; + } + + + public WebhookComment verifiedDate(@javax.annotation.Nullable String verifiedDate) { + this.verifiedDate = verifiedDate; + return this; + } + + /** + * Get verifiedDate + * @return verifiedDate + */ + @javax.annotation.Nullable + public String getVerifiedDate() { + return verifiedDate; + } + + public void setVerifiedDate(@javax.annotation.Nullable String verifiedDate) { + this.verifiedDate = verifiedDate; + } + + + public WebhookComment reviewed(@javax.annotation.Nonnull Boolean reviewed) { + this.reviewed = reviewed; + return this; + } + + /** + * Get reviewed + * @return reviewed + */ + @javax.annotation.Nonnull + public Boolean getReviewed() { + return reviewed; + } + + public void setReviewed(@javax.annotation.Nonnull Boolean reviewed) { + this.reviewed = reviewed; + } + + + public WebhookComment avatarSrc(@javax.annotation.Nullable String avatarSrc) { + this.avatarSrc = avatarSrc; + return this; + } + + /** + * Get avatarSrc + * @return avatarSrc + */ + @javax.annotation.Nullable + public String getAvatarSrc() { + return avatarSrc; + } + + public void setAvatarSrc(@javax.annotation.Nullable String avatarSrc) { + this.avatarSrc = avatarSrc; + } + + + public WebhookComment isSpam(@javax.annotation.Nonnull Boolean isSpam) { + this.isSpam = isSpam; + return this; + } + + /** + * Get isSpam + * @return isSpam + */ + @javax.annotation.Nonnull + public Boolean getIsSpam() { + return isSpam; + } + + public void setIsSpam(@javax.annotation.Nonnull Boolean isSpam) { + this.isSpam = isSpam; + } + + + public WebhookComment aiDeterminedSpam(@javax.annotation.Nonnull Boolean aiDeterminedSpam) { + this.aiDeterminedSpam = aiDeterminedSpam; + return this; + } + + /** + * Get aiDeterminedSpam + * @return aiDeterminedSpam + */ + @javax.annotation.Nonnull + public Boolean getAiDeterminedSpam() { + return aiDeterminedSpam; + } + + public void setAiDeterminedSpam(@javax.annotation.Nonnull Boolean aiDeterminedSpam) { + this.aiDeterminedSpam = aiDeterminedSpam; + } + + + public WebhookComment hasImages(@javax.annotation.Nonnull Boolean hasImages) { + this.hasImages = hasImages; + return this; + } + + /** + * Get hasImages + * @return hasImages + */ + @javax.annotation.Nonnull + public Boolean getHasImages() { + return hasImages; + } + + public void setHasImages(@javax.annotation.Nonnull Boolean hasImages) { + this.hasImages = hasImages; + } + + + public WebhookComment pageNumber(@javax.annotation.Nullable Double pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Get pageNumber + * @return pageNumber + */ + @javax.annotation.Nullable + public Double getPageNumber() { + return pageNumber; + } + + public void setPageNumber(@javax.annotation.Nullable Double pageNumber) { + this.pageNumber = pageNumber; + } + + + public WebhookComment pageNumberOF(@javax.annotation.Nullable Double pageNumberOF) { + this.pageNumberOF = pageNumberOF; + return this; + } + + /** + * Get pageNumberOF + * @return pageNumberOF + */ + @javax.annotation.Nullable + public Double getPageNumberOF() { + return pageNumberOF; + } + + public void setPageNumberOF(@javax.annotation.Nullable Double pageNumberOF) { + this.pageNumberOF = pageNumberOF; + } + + + public WebhookComment pageNumberNF(@javax.annotation.Nullable Double pageNumberNF) { + this.pageNumberNF = pageNumberNF; + return this; + } + + /** + * Get pageNumberNF + * @return pageNumberNF + */ + @javax.annotation.Nullable + public Double getPageNumberNF() { + return pageNumberNF; + } + + public void setPageNumberNF(@javax.annotation.Nullable Double pageNumberNF) { + this.pageNumberNF = pageNumberNF; + } + + + public WebhookComment approved(@javax.annotation.Nonnull Boolean approved) { + this.approved = approved; + return this; + } + + /** + * Get approved + * @return approved + */ + @javax.annotation.Nonnull + public Boolean getApproved() { + return approved; + } + + public void setApproved(@javax.annotation.Nonnull Boolean approved) { + this.approved = approved; + } + + + public WebhookComment locale(@javax.annotation.Nullable String locale) { + this.locale = locale; + return this; + } + + /** + * Get locale + * @return locale + */ + @javax.annotation.Nullable + public String getLocale() { + return locale; + } + + public void setLocale(@javax.annotation.Nullable String locale) { + this.locale = locale; + } + + + public WebhookComment mentions(@javax.annotation.Nonnull List mentions) { + this.mentions = mentions; + return this; + } + + public WebhookComment addMentionsItem(CommentUserMentionInfo mentionsItem) { + if (this.mentions == null) { + this.mentions = new ArrayList<>(); + } + this.mentions.add(mentionsItem); + return this; + } + + /** + * Get mentions + * @return mentions + */ + @javax.annotation.Nonnull + public List getMentions() { + return mentions; + } + + public void setMentions(@javax.annotation.Nonnull List mentions) { + this.mentions = mentions; + } + + + public WebhookComment domain(@javax.annotation.Nullable String domain) { + this.domain = domain; + return this; + } + + /** + * Get domain + * @return domain + */ + @javax.annotation.Nullable + public String getDomain() { + return domain; + } + + public void setDomain(@javax.annotation.Nullable String domain) { + this.domain = domain; + } + + + public WebhookComment moderationGroupIds(@javax.annotation.Nonnull List moderationGroupIds) { + this.moderationGroupIds = moderationGroupIds; + return this; + } + + public WebhookComment addModerationGroupIdsItem(String moderationGroupIdsItem) { + if (this.moderationGroupIds == null) { + this.moderationGroupIds = new ArrayList<>(); + } + this.moderationGroupIds.add(moderationGroupIdsItem); + return this; + } + + /** + * Get moderationGroupIds + * @return moderationGroupIds + */ + @javax.annotation.Nonnull + public List getModerationGroupIds() { + return moderationGroupIds; + } + + public void setModerationGroupIds(@javax.annotation.Nonnull List moderationGroupIds) { + this.moderationGroupIds = moderationGroupIds; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookComment webhookComment = (WebhookComment) o; + return Objects.equals(this.id, webhookComment.id) && + Objects.equals(this.urlId, webhookComment.urlId) && + Objects.equals(this.url, webhookComment.url) && + Objects.equals(this.userId, webhookComment.userId) && + Objects.equals(this.commenterEmail, webhookComment.commenterEmail) && + Objects.equals(this.commenterName, webhookComment.commenterName) && + Objects.equals(this.comment, webhookComment.comment) && + Objects.equals(this.commentHTML, webhookComment.commentHTML) && + Objects.equals(this.externalId, webhookComment.externalId) && + Objects.equals(this.parentId, webhookComment.parentId) && + Objects.equals(this.date, webhookComment.date) && + Objects.equals(this.votes, webhookComment.votes) && + Objects.equals(this.votesUp, webhookComment.votesUp) && + Objects.equals(this.votesDown, webhookComment.votesDown) && + Objects.equals(this.verified, webhookComment.verified) && + Objects.equals(this.verifiedDate, webhookComment.verifiedDate) && + Objects.equals(this.reviewed, webhookComment.reviewed) && + Objects.equals(this.avatarSrc, webhookComment.avatarSrc) && + Objects.equals(this.isSpam, webhookComment.isSpam) && + Objects.equals(this.aiDeterminedSpam, webhookComment.aiDeterminedSpam) && + Objects.equals(this.hasImages, webhookComment.hasImages) && + Objects.equals(this.pageNumber, webhookComment.pageNumber) && + Objects.equals(this.pageNumberOF, webhookComment.pageNumberOF) && + Objects.equals(this.pageNumberNF, webhookComment.pageNumberNF) && + Objects.equals(this.approved, webhookComment.approved) && + Objects.equals(this.locale, webhookComment.locale) && + Objects.equals(this.mentions, webhookComment.mentions) && + Objects.equals(this.domain, webhookComment.domain) && + Objects.equals(this.moderationGroupIds, webhookComment.moderationGroupIds); + } + + @Override + public int hashCode() { + return Objects.hash(id, urlId, url, userId, commenterEmail, commenterName, comment, commentHTML, externalId, parentId, date, votes, votesUp, votesDown, verified, verifiedDate, reviewed, avatarSrc, isSpam, aiDeterminedSpam, hasImages, pageNumber, pageNumberOF, pageNumberNF, approved, locale, mentions, domain, moderationGroupIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookComment {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" urlId: ").append(toIndentedString(urlId)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" commenterEmail: ").append(toIndentedString(commenterEmail)).append("\n"); + sb.append(" commenterName: ").append(toIndentedString(commenterName)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commentHTML: ").append(toIndentedString(commentHTML)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" votes: ").append(toIndentedString(votes)).append("\n"); + sb.append(" votesUp: ").append(toIndentedString(votesUp)).append("\n"); + sb.append(" votesDown: ").append(toIndentedString(votesDown)).append("\n"); + sb.append(" verified: ").append(toIndentedString(verified)).append("\n"); + sb.append(" verifiedDate: ").append(toIndentedString(verifiedDate)).append("\n"); + sb.append(" reviewed: ").append(toIndentedString(reviewed)).append("\n"); + sb.append(" avatarSrc: ").append(toIndentedString(avatarSrc)).append("\n"); + sb.append(" isSpam: ").append(toIndentedString(isSpam)).append("\n"); + sb.append(" aiDeterminedSpam: ").append(toIndentedString(aiDeterminedSpam)).append("\n"); + sb.append(" hasImages: ").append(toIndentedString(hasImages)).append("\n"); + sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n"); + sb.append(" pageNumberOF: ").append(toIndentedString(pageNumberOF)).append("\n"); + sb.append(" pageNumberNF: ").append(toIndentedString(pageNumberNF)).append("\n"); + sb.append(" approved: ").append(toIndentedString(approved)).append("\n"); + sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); + sb.append(" mentions: ").append(toIndentedString(mentions)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" moderationGroupIds: ").append(toIndentedString(moderationGroupIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("id", "urlId", "url", "userId", "commenterEmail", "commenterName", "comment", "commentHTML", "externalId", "parentId", "date", "votes", "votesUp", "votesDown", "verified", "verifiedDate", "reviewed", "avatarSrc", "isSpam", "aiDeterminedSpam", "hasImages", "pageNumber", "pageNumberOF", "pageNumberNF", "approved", "locale", "mentions", "domain", "moderationGroupIds")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("id", "urlId", "url", "userId", "commenterEmail", "commenterName", "comment", "commentHTML", "externalId", "parentId", "date", "votes", "votesUp", "votesDown", "verified", "verifiedDate", "reviewed", "avatarSrc", "isSpam", "aiDeterminedSpam", "hasImages", "pageNumber", "pageNumberOF", "pageNumberNF", "approved", "locale", "mentions", "domain", "moderationGroupIds")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookComment + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookComment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in WebhookComment is not found in the empty JSON string", WebhookComment.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookComment.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `WebhookComment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookComment.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("urlId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `urlId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("urlId").toString())); + } + if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + if ((jsonObj.get("userId") != null && !jsonObj.get("userId").isJsonNull()) && !jsonObj.get("userId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + if ((jsonObj.get("commenterEmail") != null && !jsonObj.get("commenterEmail").isJsonNull()) && !jsonObj.get("commenterEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commenterEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commenterEmail").toString())); + } + if (!jsonObj.get("commenterName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commenterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commenterName").toString())); + } + if (!jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); + } + if (!jsonObj.get("commentHTML").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commentHTML` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commentHTML").toString())); + } + if ((jsonObj.get("externalId") != null && !jsonObj.get("externalId").isJsonNull()) && !jsonObj.get("externalId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `externalId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("externalId").toString())); + } + if ((jsonObj.get("parentId") != null && !jsonObj.get("parentId").isJsonNull()) && !jsonObj.get("parentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); + } + if (!jsonObj.get("date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("date").toString())); + } + if ((jsonObj.get("verifiedDate") != null && !jsonObj.get("verifiedDate").isJsonNull()) && !jsonObj.get("verifiedDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `verifiedDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verifiedDate").toString())); + } + if ((jsonObj.get("avatarSrc") != null && !jsonObj.get("avatarSrc").isJsonNull()) && !jsonObj.get("avatarSrc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `avatarSrc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatarSrc").toString())); + } + if ((jsonObj.get("locale") != null && !jsonObj.get("locale").isJsonNull()) && !jsonObj.get("locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locale").toString())); + } + if (jsonObj.get("mentions") != null) { + if (!jsonObj.get("mentions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mentions` to be an array in the JSON string but got `%s`", jsonObj.get("mentions").toString())); + } + JsonArray jsonArraymentions = jsonObj.getAsJsonArray("mentions"); + // validate the required field `mentions` (array) + for (int i = 0; i < jsonArraymentions.size(); i++) { + CommentUserMentionInfo.validateJsonElement(jsonArraymentions.get(i)); + } + } + if ((jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) && !jsonObj.get("domain").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `domain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain").toString())); + } + // ensure the required json array is present + if (jsonObj.get("moderationGroupIds") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("moderationGroupIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `moderationGroupIds` to be an array in the JSON string but got `%s`", jsonObj.get("moderationGroupIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookComment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookComment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(WebhookComment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookComment value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookComment read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookComment given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookComment + * @throws IOException if the JSON string is invalid with respect to WebhookComment + */ + public static WebhookComment fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookComment.class); + } + + /** + * Convert an instance of WebhookComment to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/WebhookEventName.java b/client/src/main/java/com/fastcomments/model/WebhookEventName.java new file mode 100644 index 00000000..02d09d8e --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/WebhookEventName.java @@ -0,0 +1,80 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets WebhookEventName + */ +@JsonAdapter(WebhookEventName.Adapter.class) +public enum WebhookEventName { + + COMMENT_CREATED("comment-created"), + + COMMENT_UPDATED("comment-updated"), + + COMMENT_DELETED("comment-deleted"); + + private String value; + + WebhookEventName(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WebhookEventName fromValue(String value) { + for (WebhookEventName b : WebhookEventName.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WebhookEventName enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WebhookEventName read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WebhookEventName.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WebhookEventName.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/WebhookHTTPMethod.java b/client/src/main/java/com/fastcomments/model/WebhookHTTPMethod.java new file mode 100644 index 00000000..9933eaf0 --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/WebhookHTTPMethod.java @@ -0,0 +1,80 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets WebhookHTTPMethod + */ +@JsonAdapter(WebhookHTTPMethod.Adapter.class) +public enum WebhookHTTPMethod { + + PUT("PUT"), + + DELETE("DELETE"), + + POST("POST"); + + private String value; + + WebhookHTTPMethod(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WebhookHTTPMethod fromValue(String value) { + for (WebhookHTTPMethod b : WebhookHTTPMethod.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WebhookHTTPMethod enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WebhookHTTPMethod read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WebhookHTTPMethod.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WebhookHTTPMethod.fromValue(value); + } +} + diff --git a/client/src/main/java/com/fastcomments/model/WebhookSource.java b/client/src/main/java/com/fastcomments/model/WebhookSource.java new file mode 100644 index 00000000..fdd900ba --- /dev/null +++ b/client/src/main/java/com/fastcomments/model/WebhookSource.java @@ -0,0 +1,78 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets WebhookSource + */ +@JsonAdapter(WebhookSource.Adapter.class) +public enum WebhookSource { + + DASHBOARD("dashboard"), + + API("api"); + + private String value; + + WebhookSource(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WebhookSource fromValue(String value) { + for (WebhookSource b : WebhookSource.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WebhookSource enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WebhookSource read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WebhookSource.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WebhookSource.fromValue(value); + } +} + diff --git a/client/src/test/java/com/fastcomments/api/DefaultApiTest.java b/client/src/test/java/com/fastcomments/api/DefaultApiTest.java index faa35125..3d3c7bfa 100644 --- a/client/src/test/java/com/fastcomments/api/DefaultApiTest.java +++ b/client/src/test/java/com/fastcomments/api/DefaultApiTest.java @@ -42,9 +42,13 @@ import com.fastcomments.model.ChangeTicketStateBody; import com.fastcomments.model.ChangeTicketStateResponse; import com.fastcomments.model.CombineQuestionResultsWithCommentsResponse; +import com.fastcomments.model.CommentPollPatch; +import com.fastcomments.model.CommentPollPutInput; import com.fastcomments.model.CreateAPIPageData; import com.fastcomments.model.CreateAPISSOUserData; import com.fastcomments.model.CreateAPIUserSubscriptionData; +import com.fastcomments.model.CreateAgentTenantBody; +import com.fastcomments.model.CreateAgentTenantResponse; import com.fastcomments.model.CreateCommentParams; import com.fastcomments.model.CreateEmailTemplateBody; import com.fastcomments.model.CreateEmailTemplateResponse; @@ -54,6 +58,8 @@ import com.fastcomments.model.CreateHashTagResponse; import com.fastcomments.model.CreateModeratorBody; import com.fastcomments.model.CreateModeratorResponse; +import com.fastcomments.model.CreatePollVoteBody; +import com.fastcomments.model.CreatePollVoteResponse; import com.fastcomments.model.CreateQuestionConfigBody; import com.fastcomments.model.CreateQuestionConfigResponse; import com.fastcomments.model.CreateQuestionResultBody; @@ -68,15 +74,20 @@ import com.fastcomments.model.CreateTicketBody; import com.fastcomments.model.CreateTicketResponse; import com.fastcomments.model.CreateUserBadgeParams; +import com.fastcomments.model.CreateWebhookParams; +import com.fastcomments.model.CreateWebhookResponse; import com.fastcomments.model.DeleteCommentResult; import com.fastcomments.model.DeleteDomainConfigResponse; import com.fastcomments.model.DeleteHashTagRequestBody; import com.fastcomments.model.DeletePageAPIResponse; +import com.fastcomments.model.DeletePollVoteResponse; import com.fastcomments.model.DeleteSSOUserAPIResponse; import com.fastcomments.model.DeleteSubscriptionAPIResponse; import com.fastcomments.model.FeedPost; import com.fastcomments.model.FlagCommentResponse; import com.fastcomments.model.GetAuditLogsResponse; +import com.fastcomments.model.GetBatchJobAPIResponse; +import com.fastcomments.model.GetBatchJobsAPIResponse; import com.fastcomments.model.GetCachedNotificationCountResponse; import com.fastcomments.model.GetDomainConfigResponse; import com.fastcomments.model.GetDomainConfigsResponse; @@ -86,14 +97,20 @@ import com.fastcomments.model.GetEmailTemplatesResponse; import com.fastcomments.model.GetFeedPostsResponse; import com.fastcomments.model.GetHashTagsResponse; +import com.fastcomments.model.GetMeResponse; import com.fastcomments.model.GetModeratorResponse; import com.fastcomments.model.GetModeratorsResponse; import com.fastcomments.model.GetNotificationCountResponse; import com.fastcomments.model.GetNotificationsResponse; import com.fastcomments.model.GetPageByURLIdAPIResponse; +import com.fastcomments.model.GetPageLikesAPIResponse; +import com.fastcomments.model.GetPageReactsAPIResponse; import com.fastcomments.model.GetPagesAPIResponse; import com.fastcomments.model.GetPendingWebhookEventCountResponse; import com.fastcomments.model.GetPendingWebhookEventsResponse; +import com.fastcomments.model.GetPollResponse; +import com.fastcomments.model.GetPollVoteResponse; +import com.fastcomments.model.GetPollVotesResponse; import com.fastcomments.model.GetQuestionConfigResponse; import com.fastcomments.model.GetQuestionConfigsResponse; import com.fastcomments.model.GetQuestionResultResponse; @@ -114,19 +131,25 @@ import com.fastcomments.model.GetUserResponse; import com.fastcomments.model.GetVotesForUserResponse; import com.fastcomments.model.GetVotesResponse; +import com.fastcomments.model.GetWebhookSamplePayloadsResponse; +import com.fastcomments.model.GetWebhooksResponse; +import com.fastcomments.model.MigrateAPIPagesData; import java.time.OffsetDateTime; +import com.fastcomments.model.PageReactIncludeUserInfo; import com.fastcomments.model.PatchDomainConfigParams; import com.fastcomments.model.PatchDomainConfigResponse; import com.fastcomments.model.PatchPageAPIResponse; import com.fastcomments.model.PatchSSOUserAPIResponse; import com.fastcomments.model.PutDomainConfigResponse; import com.fastcomments.model.PutSSOUserAPIResponse; +import com.fastcomments.model.QueuePageMigrationJobAPIResponse; import com.fastcomments.model.RenderEmailTemplateBody; import com.fastcomments.model.RenderEmailTemplateResponse; import com.fastcomments.model.ReplaceTenantPackageBody; import com.fastcomments.model.ReplaceTenantUserBody; import com.fastcomments.model.SORTDIR; import com.fastcomments.model.SaveCommentsBulkResponse; +import com.fastcomments.model.SavePollResponse; import com.fastcomments.model.SortDirections; import com.fastcomments.model.UnBlockFromCommentParams; import com.fastcomments.model.UnblockSuccess; @@ -149,6 +172,8 @@ import com.fastcomments.model.UpdateUserBadgeParams; import com.fastcomments.model.VoteDeleteResponse; import com.fastcomments.model.VoteResponse; +import com.fastcomments.model.WebhookEventName; +import com.fastcomments.model.WebhookSource; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -340,6 +365,19 @@ public void combineCommentsWithQuestionResultsTest() throws ApiException { // TODO: test validations } + /** + * Creates a new trial account for an AI agent without a human signup. No API key is needed to call this. The response contains the tenant id, an API key that works immediately against the REST API and the MCP server, and a claim URL. Give the claim URL to the human you are working for: opening it while logged in to FastComments attaches the account to them. Unclaimed accounts, and their keys, are deleted 72 hours after creation. Until claimed, the account has the standard trial limits. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createAgentTenantTest() throws ApiException { + CreateAgentTenantBody createAgentTenantBody = null; + CreateAgentTenantResponse response = api.createAgentTenant(createAgentTenantBody) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -384,6 +422,20 @@ public void createModeratorTest() throws ApiException { // TODO: test validations } + /** + * Record a vote on a poll, or move an existing one to a different option. A voter has at most one vote per poll, so calling this again for the same voter moves their vote rather than adding one. This obeys the site's poll settings: if voting is set to logged-in users only, a vote with just an anonUserId is rejected, and anonymous votes are rate limited per IP per poll. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createPollVoteTest() throws ApiException { + String tenantId = null; + CreatePollVoteBody createPollVoteBody = null; + CreatePollVoteResponse response = api.createPollVote(tenantId, createPollVoteBody) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -498,6 +550,20 @@ public void createVoteTest() throws ApiException { // TODO: test validations } + /** + * Subscribes a URL to a comment event (REST hook subscribe). Subscribing the same URL to the same event and domain again returns the existing subscription. Deliveries are HMAC signed, see the webhooks guide; the legacy `token` header is never sent to API subscriptions. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createWebhookTest() throws ApiException { + String tenantId = null; + CreateWebhookParams createWebhookParams = null; + CreateWebhookResponse response = api.createWebhook(tenantId, createWebhookParams) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -615,6 +681,34 @@ public void deletePendingWebhookEventTest() throws ApiException { // TODO: test validations } + /** + * Remove a poll from its comment, along with every vote cast on it. The comment itself is left alone. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deletePollTest() throws ApiException { + String tenantId = null; + String commentId = null; + APIEmptyResponse response = api.deletePoll(tenantId, commentId) + .execute(); + // TODO: test validations + } + + /** + * Retract a vote. The option it was cast on gives its tally back. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deletePollVoteTest() throws ApiException { + String tenantId = null; + String id = null; + DeletePollVoteResponse response = api.deletePollVote(tenantId, id) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -737,6 +831,20 @@ public void deleteVoteTest() throws ApiException { // TODO: test validations } + /** + * Unsubscribes (REST hook unsubscribe). Only subscriptions created through this API can be deleted here; dashboard-managed webhooks are edited in the dashboard. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteWebhookTest() throws ApiException { + String tenantId = null; + String id = null; + APIEmptyResponse response = api.deleteWebhook(tenantId, id) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -759,17 +867,64 @@ public void flagCommentTest() throws ApiException { @Test public void getAuditLogsTest() throws ApiException { String tenantId = null; - Double limit = null; - Double skip = null; + Integer limit = null; + Integer skip = null; SORTDIR order = null; - Double after = null; - Double before = null; + Long after = null; + Long before = null; + String username = null; + String ip = null; + String crudType = null; + String resourceName = null; + String targetId = null; + String target = null; + Boolean includeManagedTenants = null; GetAuditLogsResponse response = api.getAuditLogs(tenantId) .limit(limit) .skip(skip) .order(order) .after(after) .before(before) + .username(username) + .ip(ip) + .crudType(crudType) + .resourceName(resourceName) + .targetId(targetId) + .target(target) + .includeManagedTenants(includeManagedTenants) + .execute(); + // TODO: test validations + } + + /** + * Status, progress and, once done, the result of one batch job. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBatchJobTest() throws ApiException { + String tenantId = null; + String id = null; + GetBatchJobAPIResponse response = api.getBatchJob(tenantId, id) + .execute(); + // TODO: test validations + } + + /** + * The tenant's batch jobs (imports, exports, page migrations...), newest first. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBatchJobsTest() throws ApiException { + String tenantId = null; + String type = null; + String status = null; + Integer skip = null; + GetBatchJobsAPIResponse response = api.getBatchJobs(tenantId) + .type(type) + .status(status) + .skip(skip) .execute(); // TODO: test validations } @@ -946,6 +1101,19 @@ public void getHashTagsTest() throws ApiException { // TODO: test validations } + /** + * Identifies the credential in use: the tenant it belongs to and, for OAuth tokens, the user who authorized it. Integrations use this to test a connection and label it. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getMeTest() throws ApiException { + String tenantId = null; + GetMeResponse response = api.getMe(tenantId) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -1027,6 +1195,38 @@ public void getPageByURLIdTest() throws ApiException { // TODO: test validations } + /** + * Like count for a page, optionally with the users who liked it. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPageLikesTest() throws ApiException { + String tenantId = null; + String urlId = null; + PageReactIncludeUserInfo includeUserInfo = null; + GetPageLikesAPIResponse response = api.getPageLikes(tenantId, urlId) + .includeUserInfo(includeUserInfo) + .execute(); + // TODO: test validations + } + + /** + * Custom react counts for a page, optionally with the users who reacted. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPageReactsTest() throws ApiException { + String tenantId = null; + String urlId = null; + PageReactIncludeUserInfo includeUserInfo = null; + GetPageReactsAPIResponse response = api.getPageReacts(tenantId, urlId) + .includeUserInfo(includeUserInfo) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -1086,6 +1286,50 @@ public void getPendingWebhookEventsTest() throws ApiException { // TODO: test validations } + /** + * @throws ApiException if the Api call fails + */ + @Test + public void getPollTest() throws ApiException { + String tenantId = null; + String commentId = null; + GetPollResponse response = api.getPoll(tenantId, commentId) + .execute(); + // TODO: test validations + } + + /** + * @throws ApiException if the Api call fails + */ + @Test + public void getPollVoteTest() throws ApiException { + String tenantId = null; + String id = null; + GetPollVoteResponse response = api.getPollVote(tenantId, id) + .execute(); + // TODO: test validations + } + + /** + * The individual votes behind one poll's tallies, oldest first. A poll belongs to a comment, so votes are always read one poll at a time - commentId is required. That keeps every query on the indexes the collection already has. Obeys the poll's privacy: an anonymous poll's votes cannot be read (poll-anonymous), here or by id. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPollVotesTest() throws ApiException { + String tenantId = null; + String commentId = null; + String voterId = null; + String optionId = null; + Integer skip = null; + GetPollVotesResponse response = api.getPollVotes(tenantId, commentId) + .voterId(voterId) + .optionId(optionId) + .skip(skip) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -1441,6 +1685,58 @@ public void getVotesForUserTest() throws ApiException { // TODO: test validations } + /** + * Recent comments in exactly the shape webhook deliveries use, for building integrations (for example Zapier sample data). Every event delivers the same comment object, so `event` only has to be valid. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getWebhookSamplePayloadsTest() throws ApiException { + String tenantId = null; + WebhookEventName event = null; + Double limit = null; + GetWebhookSamplePayloadsResponse response = api.getWebhookSamplePayloads(tenantId) + .event(event) + .limit(limit) + .execute(); + // TODO: test validations + } + + /** + * Lists the webhooks configured for the tenant, both dashboard-managed rows and API subscriptions. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getWebhooksTest() throws ApiException { + String tenantId = null; + WebhookEventName event = null; + String domain = null; + WebhookSource source = null; + Double skip = null; + GetWebhooksResponse response = api.getWebhooks(tenantId) + .event(event) + .domain(domain) + .source(source) + .skip(skip) + .execute(); + // TODO: test validations + } + + /** + * Queues a batch job that moves comments, pages and related records from one urlId or domain to another. \"urlId\" migrations only match the exact urlId. \"domain\" migrations find/replace the value inside every urlId and url. Poll GET /api/v1/batch-jobs/{batchJobId}: once it is done it carries per-migration results and an undoId. + * + * @throws ApiException if the Api call fails + */ + @Test + public void migratePagesTest() throws ApiException { + String tenantId = null; + MigrateAPIPagesData migrateAPIPagesData = null; + QueuePageMigrationJobAPIResponse response = api.migratePages(tenantId, migrateAPIPagesData) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -1481,6 +1777,21 @@ public void patchPageTest() throws ApiException { // TODO: test validations } + /** + * Edit a poll in place, keeping its tallies: change the question, relabel an option, close or reopen it, or change who may see the voters. Options are addressed by id - to add, remove or reorder them, PUT the full list. + * + * @throws ApiException if the Api call fails + */ + @Test + public void patchPollTest() throws ApiException { + String tenantId = null; + String commentId = null; + CommentPollPatch commentPollPatch = null; + SavePollResponse response = api.patchPoll(tenantId, commentId, commentPollPatch) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -1509,6 +1820,23 @@ public void putDomainConfigTest() throws ApiException { // TODO: test validations } + /** + * Attach a poll to a comment, or set the full state of the poll it already has. Options are matched by id: an option sent with the id of an existing option keeps its votes (and takes the new label and position), an option sent without an id is added, and existing options left out of the list are removed along with the votes cast on them. Keeping no existing option ids on a poll that has votes deletes all of them, so that needs replaceVotes=true. + * + * @throws ApiException if the Api call fails + */ + @Test + public void putPollTest() throws ApiException { + String tenantId = null; + String commentId = null; + CommentPollPutInput commentPollPutInput = null; + Boolean replaceVotes = null; + SavePollResponse response = api.putPoll(tenantId, commentId, commentPollPutInput) + .replaceVotes(replaceVotes) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ @@ -1666,6 +1994,20 @@ public void unFlagCommentTest() throws ApiException { // TODO: test validations } + /** + * Queues a batch job that reverses every migration from one migrate-pages job, newest first. Available for 90 days. Records changed since the migration are left alone, so a later edit is never overwritten. Poll GET /api/v1/batch-jobs/{batchJobId} for the restored/skipped counts. + * + * @throws ApiException if the Api call fails + */ + @Test + public void undoPageMigrationsTest() throws ApiException { + String tenantId = null; + String undoId = null; + QueuePageMigrationJobAPIResponse response = api.undoPageMigrations(tenantId, undoId) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ diff --git a/client/src/test/java/com/fastcomments/api/PublicApiTest.java b/client/src/test/java/com/fastcomments/api/PublicApiTest.java index 05eb90e0..0b62d343 100644 --- a/client/src/test/java/com/fastcomments/api/PublicApiTest.java +++ b/client/src/test/java/com/fastcomments/api/PublicApiTest.java @@ -21,6 +21,8 @@ import com.fastcomments.model.CheckBlockedCommentsResponse; import com.fastcomments.model.CommentData; import com.fastcomments.model.CommentTextUpdateRequest; +import com.fastcomments.model.CommentTranslationsRequest; +import com.fastcomments.model.CommentTranslationsResponse; import com.fastcomments.model.CreateFeedPostParams; import com.fastcomments.model.CreateFeedPostResponse; import com.fastcomments.model.CreateV1PageReact; @@ -42,6 +44,7 @@ import com.fastcomments.model.GetV2PageReactUsersResponse; import com.fastcomments.model.GetV2PageReacts; import com.fastcomments.model.GifGetLargeResponse; +import com.fastcomments.model.PageReactIncludeUserInfo; import com.fastcomments.model.PageUsersInfoResponse; import com.fastcomments.model.PageUsersOfflineResponse; import com.fastcomments.model.PageUsersOnlineResponse; @@ -124,9 +127,11 @@ public void createCommentPublicTest() throws ApiException { CommentData commentData = null; String sessionId = null; String sso = null; + String locale = null; SaveCommentsResponseWithPresence response = api.createCommentPublic(tenantId, urlId, broadcastId, commentData) .sessionId(sessionId) .sso(sso) + .locale(locale) .execute(); // TODO: test validations } @@ -155,8 +160,10 @@ public void createV1PageReactTest() throws ApiException { String tenantId = null; String urlId = null; String title = null; + String sso = null; CreateV1PageReact response = api.createV1PageReact(tenantId, urlId) .title(title) + .sso(sso) .execute(); // TODO: test validations } @@ -170,8 +177,10 @@ public void createV2PageReactTest() throws ApiException { String urlId = null; String id = null; String title = null; + String sso = null; CreateV1PageReact response = api.createV2PageReact(tenantId, urlId, id) .title(title) + .sso(sso) .execute(); // TODO: test validations } @@ -235,7 +244,9 @@ public void deleteFeedPostPublicTest() throws ApiException { public void deleteV1PageReactTest() throws ApiException { String tenantId = null; String urlId = null; + String sso = null; CreateV1PageReact response = api.deleteV1PageReact(tenantId, urlId) + .sso(sso) .execute(); // TODO: test validations } @@ -248,7 +259,9 @@ public void deleteV2PageReactTest() throws ApiException { String tenantId = null; String urlId = null; String id = null; + String sso = null; CreateV1PageReact response = api.deleteV2PageReact(tenantId, urlId, id) + .sso(sso) .execute(); // TODO: test validations } @@ -358,6 +371,8 @@ public void getCommentsPublicTest() throws ApiException { String customConfigStr = null; String afterCommentId = null; String beforeCommentId = null; + String questionId = null; + Integer questionValue = null; GetCommentsResponseWithPresencePublicComment response = api.getCommentsPublic(tenantId, urlId) .page(page) .direction(direction) @@ -385,6 +400,8 @@ public void getCommentsPublicTest() throws ApiException { .customConfigStr(customConfigStr) .afterCommentId(afterCommentId) .beforeCommentId(beforeCommentId) + .questionId(questionId) + .questionValue(questionValue) .execute(); // TODO: test validations } @@ -681,7 +698,11 @@ public void getUsersInfoTest() throws ApiException { public void getV1PageLikesTest() throws ApiException { String tenantId = null; String urlId = null; + String sso = null; + PageReactIncludeUserInfo includeUserInfo = null; GetV1PageLikes response = api.getV1PageLikes(tenantId, urlId) + .sso(sso) + .includeUserInfo(includeUserInfo) .execute(); // TODO: test validations } @@ -694,7 +715,9 @@ public void getV2PageReactUsersTest() throws ApiException { String tenantId = null; String urlId = null; String id = null; + String sso = null; GetV2PageReactUsersResponse response = api.getV2PageReactUsers(tenantId, urlId, id) + .sso(sso) .execute(); // TODO: test validations } @@ -706,7 +729,11 @@ public void getV2PageReactUsersTest() throws ApiException { public void getV2PageReactsTest() throws ApiException { String tenantId = null; String urlId = null; + String sso = null; + PageReactIncludeUserInfo includeUserInfo = null; GetV2PageReacts response = api.getV2PageReacts(tenantId, urlId) + .sso(sso) + .includeUserInfo(includeUserInfo) .execute(); // TODO: test validations } @@ -844,6 +871,25 @@ public void setCommentTextTest() throws ApiException { // TODO: test validations } + /** + * Translates the given comments into the widget locale. Only available when the matching widget customization rule has Comment Translation set to Automatic or Manual. + * + * @throws ApiException if the Api call fails + */ + @Test + public void translateCommentsTest() throws ApiException { + String tenantId = null; + String urlId = null; + CommentTranslationsRequest commentTranslationsRequest = null; + String sso = null; + String locale = null; + CommentTranslationsResponse response = api.translateComments(tenantId, urlId, commentTranslationsRequest) + .sso(sso) + .locale(locale) + .execute(); + // TODO: test validations + } + /** * @throws ApiException if the Api call fails */ diff --git a/client/src/test/java/com/fastcomments/model/APIAuditLogTest.java b/client/src/test/java/com/fastcomments/model/APIAuditLogTest.java index 49631b69..7a986057 100644 --- a/client/src/test/java/com/fastcomments/model/APIAuditLogTest.java +++ b/client/src/test/java/com/fastcomments/model/APIAuditLogTest.java @@ -136,4 +136,36 @@ public void objectDetailsTest() { // TODO: test objectDetails } + /** + * Test the property 'targetId' + */ + @Test + public void targetIdTest() { + // TODO: test targetId + } + + /** + * Test the property 'targetLabel' + */ + @Test + public void targetLabelTest() { + // TODO: test targetLabel + } + + /** + * Test the property 'ua' + */ + @Test + public void uaTest() { + // TODO: test ua + } + + /** + * Test the property 'sIdHashed' + */ + @Test + public void sIdHashedTest() { + // TODO: test sIdHashed + } + } diff --git a/client/src/test/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInnerTest.java b/client/src/test/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInnerTest.java new file mode 100644 index 00000000..4636bf20 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/APIBatchJobPageMigrationResultsInnerTest.java @@ -0,0 +1,100 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageMigrationFailure; +import com.fastcomments.model.PageMigrationSuccess; +import com.fastcomments.model.PageMigrationType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for APIBatchJobPageMigrationResultsInner + */ +public class APIBatchJobPageMigrationResultsInnerTest { + private final APIBatchJobPageMigrationResultsInner model = new APIBatchJobPageMigrationResultsInner(); + + /** + * Model tests for APIBatchJobPageMigrationResultsInner + */ + @Test + public void testAPIBatchJobPageMigrationResultsInner() { + // TODO: test APIBatchJobPageMigrationResultsInner + } + + /** + * Test the property 'from' + */ + @Test + public void fromTest() { + // TODO: test from + } + + /** + * Test the property 'to' + */ + @Test + public void toTest() { + // TODO: test to + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'commentsMigrated' + */ + @Test + public void commentsMigratedTest() { + // TODO: test commentsMigrated + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + +} diff --git a/client/src/test/java/com/fastcomments/model/APIBatchJobTest.java b/client/src/test/java/com/fastcomments/model/APIBatchJobTest.java new file mode 100644 index 00000000..e98f87a4 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/APIBatchJobTest.java @@ -0,0 +1,125 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIBatchJobPageMigrationResultsInner; +import com.fastcomments.model.PageMigrationUndoCounts; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for APIBatchJob + */ +public class APIBatchJobTest { + private final APIBatchJob model = new APIBatchJob(); + + /** + * Model tests for APIBatchJob + */ + @Test + public void testAPIBatchJob() { + // TODO: test APIBatchJob + } + + /** + * Test the property 'pageMigrationUndoResult' + */ + @Test + public void pageMigrationUndoResultTest() { + // TODO: test pageMigrationUndoResult + } + + /** + * Test the property 'undoId' + */ + @Test + public void undoIdTest() { + // TODO: test undoId + } + + /** + * Test the property 'pageMigrationResults' + */ + @Test + public void pageMigrationResultsTest() { + // TODO: test pageMigrationResults + } + + /** + * Test the property 'totalCount' + */ + @Test + public void totalCountTest() { + // TODO: test totalCount + } + + /** + * Test the property 'processedCount' + */ + @Test + public void processedCountTest() { + // TODO: test processedCount + } + + /** + * Test the property 'completedAt' + */ + @Test + public void completedAtTest() { + // TODO: test completedAt + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/client/src/test/java/com/fastcomments/model/APITenantTest.java b/client/src/test/java/com/fastcomments/model/APITenantTest.java index 42744d4a..a35dbb30 100644 --- a/client/src/test/java/com/fastcomments/model/APITenantTest.java +++ b/client/src/test/java/com/fastcomments/model/APITenantTest.java @@ -244,6 +244,14 @@ public void hasAuditingTest() { // TODO: test hasAuditing } + /** + * Test the property 'hasDebranding' + */ + @Test + public void hasDebrandingTest() { + // TODO: test hasDebranding + } + /** * Test the property 'flexLastBilledAmount' */ diff --git a/client/src/test/java/com/fastcomments/model/BillingInfoTest.java b/client/src/test/java/com/fastcomments/model/BillingInfoTest.java index bdecc804..87df0059 100644 --- a/client/src/test/java/com/fastcomments/model/BillingInfoTest.java +++ b/client/src/test/java/com/fastcomments/model/BillingInfoTest.java @@ -101,4 +101,12 @@ public void emailTest() { // TODO: test email } + /** + * Test the property 'vatId' + */ + @Test + public void vatIdTest() { + // TODO: test vatId + } + } diff --git a/client/src/test/java/com/fastcomments/model/CommentDataTest.java b/client/src/test/java/com/fastcomments/model/CommentDataTest.java index ebe4e77c..e5378507 100644 --- a/client/src/test/java/com/fastcomments/model/CommentDataTest.java +++ b/client/src/test/java/com/fastcomments/model/CommentDataTest.java @@ -13,9 +13,10 @@ package com.fastcomments.model; +import com.fastcomments.model.CommentPollInput; import com.fastcomments.model.CommentUserHashTagInfo; import com.fastcomments.model.CommentUserMentionInfo; -import com.fastcomments.model.GifSearchResponseImagesInnerInner; +import com.fastcomments.model.RecordStringStringOrNumberOrNumberArrayValue; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -236,6 +237,14 @@ public void questionValuesTest() { // TODO: test questionValues } + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + /** * Test the property 'tos' */ diff --git a/client/src/test/java/com/fastcomments/model/CommentLogDataTest.java b/client/src/test/java/com/fastcomments/model/CommentLogDataTest.java index 3de9ad85..a54fa9ad 100644 --- a/client/src/test/java/com/fastcomments/model/CommentLogDataTest.java +++ b/client/src/test/java/com/fastcomments/model/CommentLogDataTest.java @@ -13,6 +13,7 @@ package com.fastcomments.model; +import com.fastcomments.model.NotificationSkipReason; import com.fastcomments.model.RepeatCommentCheckIgnoredReason; import com.fastcomments.model.RepeatCommentHandlingAction; import com.fastcomments.model.SpamRule; @@ -265,6 +266,14 @@ public void reasonTest() { // TODO: test reason } + /** + * Test the property 'skipReason' + */ + @Test + public void skipReasonTest() { + // TODO: test skipReason + } + /** * Test the property 'otherData' */ @@ -417,4 +426,28 @@ public void detectedLanguageTest() { // TODO: test detectedLanguage } + /** + * Test the property 'recipientUserId' + */ + @Test + public void recipientUserIdTest() { + // TODO: test recipientUserId + } + + /** + * Test the property 'notifySkipReason' + */ + @Test + public void notifySkipReasonTest() { + // TODO: test notifySkipReason + } + + /** + * Test the property 'emailQueued' + */ + @Test + public void emailQueuedTest() { + // TODO: test emailQueued + } + } diff --git a/client/src/test/java/com/fastcomments/model/CommentPollInputTest.java b/client/src/test/java/com/fastcomments/model/CommentPollInputTest.java new file mode 100644 index 00000000..694b5d9c --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentPollInputTest.java @@ -0,0 +1,82 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentPollInput + */ +public class CommentPollInputTest { + private final CommentPollInput model = new CommentPollInput(); + + /** + * Model tests for CommentPollInput + */ + @Test + public void testCommentPollInput() { + // TODO: test CommentPollInput + } + + /** + * Test the property 'question' + */ + @Test + public void questionTest() { + // TODO: test question + } + + /** + * Test the property 'options' + */ + @Test + public void optionsTest() { + // TODO: test options + } + + /** + * Test the property 'closesAt' + */ + @Test + public void closesAtTest() { + // TODO: test closesAt + } + + /** + * Test the property 'privacy' + */ + @Test + public void privacyTest() { + // TODO: test privacy + } + + /** + * Test the property 'requireVoteToSeeResults' + */ + @Test + public void requireVoteToSeeResultsTest() { + // TODO: test requireVoteToSeeResults + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentPollOptionInputTest.java b/client/src/test/java/com/fastcomments/model/CommentPollOptionInputTest.java new file mode 100644 index 00000000..d7d9abd7 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentPollOptionInputTest.java @@ -0,0 +1,56 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentPollOptionInput + */ +public class CommentPollOptionInputTest { + private final CommentPollOptionInput model = new CommentPollOptionInput(); + + /** + * Model tests for CommentPollOptionInput + */ + @Test + public void testCommentPollOptionInput() { + // TODO: test CommentPollOptionInput + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'label' + */ + @Test + public void labelTest() { + // TODO: test label + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentPollOptionTest.java b/client/src/test/java/com/fastcomments/model/CommentPollOptionTest.java new file mode 100644 index 00000000..9372251b --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentPollOptionTest.java @@ -0,0 +1,64 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentPollOption + */ +public class CommentPollOptionTest { + private final CommentPollOption model = new CommentPollOption(); + + /** + * Model tests for CommentPollOption + */ + @Test + public void testCommentPollOption() { + // TODO: test CommentPollOption + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'label' + */ + @Test + public void labelTest() { + // TODO: test label + } + + /** + * Test the property 'votes' + */ + @Test + public void votesTest() { + // TODO: test votes + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentPollPatchOptionsInnerTest.java b/client/src/test/java/com/fastcomments/model/CommentPollPatchOptionsInnerTest.java new file mode 100644 index 00000000..670230e8 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentPollPatchOptionsInnerTest.java @@ -0,0 +1,56 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentPollPatchOptionsInner + */ +public class CommentPollPatchOptionsInnerTest { + private final CommentPollPatchOptionsInner model = new CommentPollPatchOptionsInner(); + + /** + * Model tests for CommentPollPatchOptionsInner + */ + @Test + public void testCommentPollPatchOptionsInner() { + // TODO: test CommentPollPatchOptionsInner + } + + /** + * Test the property 'label' + */ + @Test + public void labelTest() { + // TODO: test label + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentPollPatchTest.java b/client/src/test/java/com/fastcomments/model/CommentPollPatchTest.java new file mode 100644 index 00000000..88b1de52 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentPollPatchTest.java @@ -0,0 +1,83 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.CommentPollPatchOptionsInner; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentPollPatch + */ +public class CommentPollPatchTest { + private final CommentPollPatch model = new CommentPollPatch(); + + /** + * Model tests for CommentPollPatch + */ + @Test + public void testCommentPollPatch() { + // TODO: test CommentPollPatch + } + + /** + * Test the property 'question' + */ + @Test + public void questionTest() { + // TODO: test question + } + + /** + * Test the property 'options' + */ + @Test + public void optionsTest() { + // TODO: test options + } + + /** + * Test the property 'closesAt' + */ + @Test + public void closesAtTest() { + // TODO: test closesAt + } + + /** + * Test the property 'privacy' + */ + @Test + public void privacyTest() { + // TODO: test privacy + } + + /** + * Test the property 'requireVoteToSeeResults' + */ + @Test + public void requireVoteToSeeResultsTest() { + // TODO: test requireVoteToSeeResults + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentPollPutInputTest.java b/client/src/test/java/com/fastcomments/model/CommentPollPutInputTest.java new file mode 100644 index 00000000..da01f929 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentPollPutInputTest.java @@ -0,0 +1,83 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.CommentPollOptionInput; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentPollPutInput + */ +public class CommentPollPutInputTest { + private final CommentPollPutInput model = new CommentPollPutInput(); + + /** + * Model tests for CommentPollPutInput + */ + @Test + public void testCommentPollPutInput() { + // TODO: test CommentPollPutInput + } + + /** + * Test the property 'question' + */ + @Test + public void questionTest() { + // TODO: test question + } + + /** + * Test the property 'options' + */ + @Test + public void optionsTest() { + // TODO: test options + } + + /** + * Test the property 'closesAt' + */ + @Test + public void closesAtTest() { + // TODO: test closesAt + } + + /** + * Test the property 'privacy' + */ + @Test + public void privacyTest() { + // TODO: test privacy + } + + /** + * Test the property 'requireVoteToSeeResults' + */ + @Test + public void requireVoteToSeeResultsTest() { + // TODO: test requireVoteToSeeResults + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentPollTest.java b/client/src/test/java/com/fastcomments/model/CommentPollTest.java new file mode 100644 index 00000000..61e6d59a --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentPollTest.java @@ -0,0 +1,93 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.CommentPollOption; +import com.fastcomments.model.PollPrivacy; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentPoll + */ +public class CommentPollTest { + private final CommentPoll model = new CommentPoll(); + + /** + * Model tests for CommentPoll + */ + @Test + public void testCommentPoll() { + // TODO: test CommentPoll + } + + /** + * Test the property 'question' + */ + @Test + public void questionTest() { + // TODO: test question + } + + /** + * Test the property 'options' + */ + @Test + public void optionsTest() { + // TODO: test options + } + + /** + * Test the property 'totalVotes' + */ + @Test + public void totalVotesTest() { + // TODO: test totalVotes + } + + /** + * Test the property 'closesAt' + */ + @Test + public void closesAtTest() { + // TODO: test closesAt + } + + /** + * Test the property 'privacy' + */ + @Test + public void privacyTest() { + // TODO: test privacy + } + + /** + * Test the property 'requireVoteToSeeResults' + */ + @Test + public void requireVoteToSeeResultsTest() { + // TODO: test requireVoteToSeeResults + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentTranslationModeTest.java b/client/src/test/java/com/fastcomments/model/CommentTranslationModeTest.java new file mode 100644 index 00000000..a3c0cd96 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentTranslationModeTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentTranslationMode + */ +public class CommentTranslationModeTest { + /** + * Model tests for CommentTranslationMode + */ + @Test + public void testCommentTranslationMode() { + // TODO: test CommentTranslationMode + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentTranslationPublicTest.java b/client/src/test/java/com/fastcomments/model/CommentTranslationPublicTest.java new file mode 100644 index 00000000..66b109e4 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentTranslationPublicTest.java @@ -0,0 +1,56 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentTranslationPublic + */ +public class CommentTranslationPublicTest { + private final CommentTranslationPublic model = new CommentTranslationPublic(); + + /** + * Model tests for CommentTranslationPublic + */ + @Test + public void testCommentTranslationPublic() { + // TODO: test CommentTranslationPublic + } + + /** + * Test the property 'commentHTML' + */ + @Test + public void commentHTMLTest() { + // TODO: test commentHTML + } + + /** + * Test the property 'sourceLanguage' + */ + @Test + public void sourceLanguageTest() { + // TODO: test sourceLanguage + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentTranslationTest.java b/client/src/test/java/com/fastcomments/model/CommentTranslationTest.java new file mode 100644 index 00000000..615ff2bf --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentTranslationTest.java @@ -0,0 +1,81 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentTranslation + */ +public class CommentTranslationTest { + private final CommentTranslation model = new CommentTranslation(); + + /** + * Model tests for CommentTranslation + */ + @Test + public void testCommentTranslation() { + // TODO: test CommentTranslation + } + + /** + * Test the property 'comment' + */ + @Test + public void commentTest() { + // TODO: test comment + } + + /** + * Test the property 'commentHTML' + */ + @Test + public void commentHTMLTest() { + // TODO: test commentHTML + } + + /** + * Test the property 'sourceLanguage' + */ + @Test + public void sourceLanguageTest() { + // TODO: test sourceLanguage + } + + /** + * Test the property 'model' + */ + @Test + public void modelTest() { + // TODO: test model + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentTranslationsRequestTest.java b/client/src/test/java/com/fastcomments/model/CommentTranslationsRequestTest.java new file mode 100644 index 00000000..d7f2516f --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentTranslationsRequestTest.java @@ -0,0 +1,50 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentTranslationsRequest + */ +public class CommentTranslationsRequestTest { + private final CommentTranslationsRequest model = new CommentTranslationsRequest(); + + /** + * Model tests for CommentTranslationsRequest + */ + @Test + public void testCommentTranslationsRequest() { + // TODO: test CommentTranslationsRequest + } + + /** + * Test the property 'commentIds' + */ + @Test + public void commentIdsTest() { + // TODO: test commentIds + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CommentTranslationsResponseTest.java b/client/src/test/java/com/fastcomments/model/CommentTranslationsResponseTest.java new file mode 100644 index 00000000..5adb0fea --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CommentTranslationsResponseTest.java @@ -0,0 +1,78 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentTranslationPublic; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CommentTranslationsResponse + */ +public class CommentTranslationsResponseTest { + private final CommentTranslationsResponse model = new CommentTranslationsResponse(); + + /** + * Model tests for CommentTranslationsResponse + */ + @Test + public void testCommentTranslationsResponse() { + // TODO: test CommentTranslationsResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'translations' + */ + @Test + public void translationsTest() { + // TODO: test translations + } + + /** + * Test the property 'failed' + */ + @Test + public void failedTest() { + // TODO: test failed + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CreateAgentTenantBodyTest.java b/client/src/test/java/com/fastcomments/model/CreateAgentTenantBodyTest.java new file mode 100644 index 00000000..aaea9d59 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CreateAgentTenantBodyTest.java @@ -0,0 +1,66 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateAgentTenantBody + */ +public class CreateAgentTenantBodyTest { + private final CreateAgentTenantBody model = new CreateAgentTenantBody(); + + /** + * Model tests for CreateAgentTenantBody + */ + @Test + public void testCreateAgentTenantBody() { + // TODO: test CreateAgentTenantBody + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'domains' + */ + @Test + public void domainsTest() { + // TODO: test domains + } + + /** + * Test the property 'agent' + */ + @Test + public void agentTest() { + // TODO: test agent + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CreateAgentTenantResponseTest.java b/client/src/test/java/com/fastcomments/model/CreateAgentTenantResponseTest.java new file mode 100644 index 00000000..36551de3 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CreateAgentTenantResponseTest.java @@ -0,0 +1,97 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateAgentTenantResponse + */ +public class CreateAgentTenantResponseTest { + private final CreateAgentTenantResponse model = new CreateAgentTenantResponse(); + + /** + * Model tests for CreateAgentTenantResponse + */ + @Test + public void testCreateAgentTenantResponse() { + // TODO: test CreateAgentTenantResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'apiKey' + */ + @Test + public void apiKeyTest() { + // TODO: test apiKey + } + + /** + * Test the property 'claimUrl' + */ + @Test + public void claimUrlTest() { + // TODO: test claimUrl + } + + /** + * Test the property 'expiresAt' + */ + @Test + public void expiresAtTest() { + // TODO: test expiresAt + } + + /** + * Test the property 'apiBaseUrl' + */ + @Test + public void apiBaseUrlTest() { + // TODO: test apiBaseUrl + } + + /** + * Test the property 'mcpUrl' + */ + @Test + public void mcpUrlTest() { + // TODO: test mcpUrl + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CreateCommentParamsTest.java b/client/src/test/java/com/fastcomments/model/CreateCommentParamsTest.java index 84de8675..29cacb39 100644 --- a/client/src/test/java/com/fastcomments/model/CreateCommentParamsTest.java +++ b/client/src/test/java/com/fastcomments/model/CreateCommentParamsTest.java @@ -13,9 +13,10 @@ package com.fastcomments.model; +import com.fastcomments.model.CommentPollInput; import com.fastcomments.model.CommentUserHashTagInfo; import com.fastcomments.model.CommentUserMentionInfo; -import com.fastcomments.model.GifSearchResponseImagesInnerInner; +import com.fastcomments.model.RecordStringStringOrNumberOrNumberArrayValue; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -236,6 +237,14 @@ public void questionValuesTest() { // TODO: test questionValues } + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + /** * Test the property 'tos' */ diff --git a/client/src/test/java/com/fastcomments/model/CreatePollVoteBodyTest.java b/client/src/test/java/com/fastcomments/model/CreatePollVoteBodyTest.java new file mode 100644 index 00000000..6b25a3a3 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CreatePollVoteBodyTest.java @@ -0,0 +1,80 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreatePollVoteBody + */ +public class CreatePollVoteBodyTest { + private final CreatePollVoteBody model = new CreatePollVoteBody(); + + /** + * Model tests for CreatePollVoteBody + */ + @Test + public void testCreatePollVoteBody() { + // TODO: test CreatePollVoteBody + } + + /** + * Test the property 'commentId' + */ + @Test + public void commentIdTest() { + // TODO: test commentId + } + + /** + * Test the property 'optionId' + */ + @Test + public void optionIdTest() { + // TODO: test optionId + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'anonUserId' + */ + @Test + public void anonUserIdTest() { + // TODO: test anonUserId + } + + /** + * Test the property 'ip' + */ + @Test + public void ipTest() { + // TODO: test ip + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CreatePollVoteResponseTest.java b/client/src/test/java/com/fastcomments/model/CreatePollVoteResponseTest.java new file mode 100644 index 00000000..2cde8c39 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CreatePollVoteResponseTest.java @@ -0,0 +1,67 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentPoll; +import com.fastcomments.model.PublicPollVote; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreatePollVoteResponse + */ +public class CreatePollVoteResponseTest { + private final CreatePollVoteResponse model = new CreatePollVoteResponse(); + + /** + * Model tests for CreatePollVoteResponse + */ + @Test + public void testCreatePollVoteResponse() { + // TODO: test CreatePollVoteResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'pollVote' + */ + @Test + public void pollVoteTest() { + // TODO: test pollVote + } + + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CreateQuestionConfigBodyTest.java b/client/src/test/java/com/fastcomments/model/CreateQuestionConfigBodyTest.java index 36ba440a..fcd198a5 100644 --- a/client/src/test/java/com/fastcomments/model/CreateQuestionConfigBodyTest.java +++ b/client/src/test/java/com/fastcomments/model/CreateQuestionConfigBodyTest.java @@ -13,7 +13,9 @@ package com.fastcomments.model; +import com.fastcomments.model.QuestionCondition; import com.fastcomments.model.QuestionConfigCustomOptionsInner; +import com.fastcomments.model.SubQuestionCondition; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -144,6 +146,30 @@ public void alwaysShowSubQuestionsTest() { // TODO: test alwaysShowSubQuestions } + /** + * Test the property 'subQuestionConditions' + */ + @Test + public void subQuestionConditionsTest() { + // TODO: test subQuestionConditions + } + + /** + * Test the property 'commentBoxCondition' + */ + @Test + public void commentBoxConditionTest() { + // TODO: test commentBoxCondition + } + + /** + * Test the property 'commentBoxPrompt' + */ + @Test + public void commentBoxPromptTest() { + // TODO: test commentBoxPrompt + } + /** * Test the property 'reportingOrder' */ diff --git a/client/src/test/java/com/fastcomments/model/CreateQuestionResultBodyTest.java b/client/src/test/java/com/fastcomments/model/CreateQuestionResultBodyTest.java index 1d10753d..973da883 100644 --- a/client/src/test/java/com/fastcomments/model/CreateQuestionResultBodyTest.java +++ b/client/src/test/java/com/fastcomments/model/CreateQuestionResultBodyTest.java @@ -56,6 +56,14 @@ public void valueTest() { // TODO: test value } + /** + * Test the property 'values' + */ + @Test + public void valuesTest() { + // TODO: test values + } + /** * Test the property 'questionId' */ diff --git a/client/src/test/java/com/fastcomments/model/CreateTenantBodyTest.java b/client/src/test/java/com/fastcomments/model/CreateTenantBodyTest.java index f9e66f6a..8adf6aa8 100644 --- a/client/src/test/java/com/fastcomments/model/CreateTenantBodyTest.java +++ b/client/src/test/java/com/fastcomments/model/CreateTenantBodyTest.java @@ -107,14 +107,6 @@ public void billingHandledExternallyTest() { // TODO: test billingHandledExternally } - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - /** * Test the property 'isSetup' */ diff --git a/client/src/test/java/com/fastcomments/model/CreateWebhookParamsTest.java b/client/src/test/java/com/fastcomments/model/CreateWebhookParamsTest.java new file mode 100644 index 00000000..985fef0a --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CreateWebhookParamsTest.java @@ -0,0 +1,74 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.WebhookEventName; +import com.fastcomments.model.WebhookHTTPMethod; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateWebhookParams + */ +public class CreateWebhookParamsTest { + private final CreateWebhookParams model = new CreateWebhookParams(); + + /** + * Model tests for CreateWebhookParams + */ + @Test + public void testCreateWebhookParams() { + // TODO: test CreateWebhookParams + } + + /** + * Test the property 'url' + */ + @Test + public void urlTest() { + // TODO: test url + } + + /** + * Test the property 'event' + */ + @Test + public void eventTest() { + // TODO: test event + } + + /** + * Test the property 'domain' + */ + @Test + public void domainTest() { + // TODO: test domain + } + + /** + * Test the property 'method' + */ + @Test + public void methodTest() { + // TODO: test method + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CreateWebhookResponseTest.java b/client/src/test/java/com/fastcomments/model/CreateWebhookResponseTest.java new file mode 100644 index 00000000..df5429a3 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/CreateWebhookResponseTest.java @@ -0,0 +1,58 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PublicWebhook; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateWebhookResponse + */ +public class CreateWebhookResponseTest { + private final CreateWebhookResponse model = new CreateWebhookResponse(); + + /** + * Model tests for CreateWebhookResponse + */ + @Test + public void testCreateWebhookResponse() { + // TODO: test CreateWebhookResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'webhook' + */ + @Test + public void webhookTest() { + // TODO: test webhook + } + +} diff --git a/client/src/test/java/com/fastcomments/model/CustomConfigParametersTest.java b/client/src/test/java/com/fastcomments/model/CustomConfigParametersTest.java index 5a05b5b1..07384724 100644 --- a/client/src/test/java/com/fastcomments/model/CustomConfigParametersTest.java +++ b/client/src/test/java/com/fastcomments/model/CustomConfigParametersTest.java @@ -17,10 +17,13 @@ import com.fastcomments.model.CommentQuestionResultsRenderingType; import com.fastcomments.model.CommentQuestionsRequired; import com.fastcomments.model.CommentThreadDeletionMode; +import com.fastcomments.model.CommentTranslationMode; import com.fastcomments.model.CommenterNameFormats; import com.fastcomments.model.GifRating; import com.fastcomments.model.ImageContentProfanityLevel; import com.fastcomments.model.MentionAutoCompleteMode; +import com.fastcomments.model.PollCreationMode; +import com.fastcomments.model.PollVotingMode; import com.fastcomments.model.QuestionRenderingType; import com.fastcomments.model.QuestionSubQuestionVisibility; import com.fastcomments.model.QuestionWhenSave; @@ -106,6 +109,14 @@ public void allowedLanguagesTest() { // TODO: test allowedLanguages } + /** + * Test the property 'autoGenerateUsername' + */ + @Test + public void autoGenerateUsernameTest() { + // TODO: test autoGenerateUsername + } + /** * Test the property 'collapseReplies' */ @@ -130,6 +141,14 @@ public void commentHTMLRenderingModeTest() { // TODO: test commentHTMLRenderingMode } + /** + * Test the property 'commentsRequireApproval' + */ + @Test + public void commentsRequireApprovalTest() { + // TODO: test commentsRequireApproval + } + /** * Test the property 'commentThreadDeleteMode' */ @@ -138,6 +157,22 @@ public void commentThreadDeleteModeTest() { // TODO: test commentThreadDeleteMode } + /** + * Test the property 'pollCreation' + */ + @Test + public void pollCreationTest() { + // TODO: test pollCreation + } + + /** + * Test the property 'pollVoting' + */ + @Test + public void pollVotingTest() { + // TODO: test pollVoting + } + /** * Test the property 'commenterNameFormat' */ @@ -762,4 +797,12 @@ public void tosTest() { // TODO: test tos } + /** + * Test the property 'commentTranslation' + */ + @Test + public void commentTranslationTest() { + // TODO: test commentTranslation + } + } diff --git a/client/src/test/java/com/fastcomments/model/DeletePollVoteResponseTest.java b/client/src/test/java/com/fastcomments/model/DeletePollVoteResponseTest.java new file mode 100644 index 00000000..248cf450 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/DeletePollVoteResponseTest.java @@ -0,0 +1,58 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentPoll; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DeletePollVoteResponse + */ +public class DeletePollVoteResponseTest { + private final DeletePollVoteResponse model = new DeletePollVoteResponse(); + + /** + * Model tests for DeletePollVoteResponse + */ + @Test + public void testDeletePollVoteResponse() { + // TODO: test DeletePollVoteResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + +} diff --git a/client/src/test/java/com/fastcomments/model/EventLogEntryTest.java b/client/src/test/java/com/fastcomments/model/EventLogEntryTest.java index 9c59d826..b7a2a9ac 100644 --- a/client/src/test/java/com/fastcomments/model/EventLogEntryTest.java +++ b/client/src/test/java/com/fastcomments/model/EventLogEntryTest.java @@ -86,4 +86,12 @@ public void dataTest() { // TODO: test data } + /** + * Test the property 'domain' + */ + @Test + public void domainTest() { + // TODO: test domain + } + } diff --git a/client/src/test/java/com/fastcomments/model/FCommentTest.java b/client/src/test/java/com/fastcomments/model/FCommentTest.java index 9263cddc..a980e1a0 100644 --- a/client/src/test/java/com/fastcomments/model/FCommentTest.java +++ b/client/src/test/java/com/fastcomments/model/FCommentTest.java @@ -14,6 +14,8 @@ package com.fastcomments.model; import com.fastcomments.model.CommentLogEntry; +import com.fastcomments.model.CommentPoll; +import com.fastcomments.model.CommentTranslation; import com.fastcomments.model.CommentUserBadgeInfo; import com.fastcomments.model.CommentUserHashTagInfo; import com.fastcomments.model.CommentUserMentionInfo; @@ -27,7 +29,9 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -381,6 +385,22 @@ public void localeTest() { // TODO: test locale } + /** + * Test the property 'detectedLanguage' + */ + @Test + public void detectedLanguageTest() { + // TODO: test detectedLanguage + } + + /** + * Test the property 'translations' + */ + @Test + public void translationsTest() { + // TODO: test translations + } + /** * Test the property 'isDeleted' */ @@ -573,6 +593,14 @@ public void feedbackIdsTest() { // TODO: test feedbackIds } + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + /** * Test the property 'logs' */ diff --git a/client/src/test/java/com/fastcomments/model/GetBatchJobAPIResponseTest.java b/client/src/test/java/com/fastcomments/model/GetBatchJobAPIResponseTest.java new file mode 100644 index 00000000..0a3809c6 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetBatchJobAPIResponseTest.java @@ -0,0 +1,73 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIBatchJob; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetBatchJobAPIResponse + */ +public class GetBatchJobAPIResponseTest { + private final GetBatchJobAPIResponse model = new GetBatchJobAPIResponse(); + + /** + * Model tests for GetBatchJobAPIResponse + */ + @Test + public void testGetBatchJobAPIResponse() { + // TODO: test GetBatchJobAPIResponse + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'batchJob' + */ + @Test + public void batchJobTest() { + // TODO: test batchJob + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/client/src/test/java/com/fastcomments/model/GetBatchJobsAPIResponseTest.java b/client/src/test/java/com/fastcomments/model/GetBatchJobsAPIResponseTest.java new file mode 100644 index 00000000..678803cd --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetBatchJobsAPIResponseTest.java @@ -0,0 +1,75 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIBatchJob; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetBatchJobsAPIResponse + */ +public class GetBatchJobsAPIResponseTest { + private final GetBatchJobsAPIResponse model = new GetBatchJobsAPIResponse(); + + /** + * Model tests for GetBatchJobsAPIResponse + */ + @Test + public void testGetBatchJobsAPIResponse() { + // TODO: test GetBatchJobsAPIResponse + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'batchJobs' + */ + @Test + public void batchJobsTest() { + // TODO: test batchJobs + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/client/src/test/java/com/fastcomments/model/GetMeResponseTest.java b/client/src/test/java/com/fastcomments/model/GetMeResponseTest.java new file mode 100644 index 00000000..f9bfa7ec --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetMeResponseTest.java @@ -0,0 +1,109 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.MeAuthType; +import com.fastcomments.model.OAuthScope; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetMeResponse + */ +public class GetMeResponseTest { + private final GetMeResponse model = new GetMeResponse(); + + /** + * Model tests for GetMeResponse + */ + @Test + public void testGetMeResponse() { + // TODO: test GetMeResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'tenantName' + */ + @Test + public void tenantNameTest() { + // TODO: test tenantName + } + + /** + * Test the property 'authType' + */ + @Test + public void authTypeTest() { + // TODO: test authType + } + + /** + * Test the property 'scopes' + */ + @Test + public void scopesTest() { + // TODO: test scopes + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/client/src/test/java/com/fastcomments/model/GetPageLikesAPIResponseTest.java b/client/src/test/java/com/fastcomments/model/GetPageLikesAPIResponseTest.java new file mode 100644 index 00000000..baf8c0eb --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetPageLikesAPIResponseTest.java @@ -0,0 +1,83 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.PageReactUser; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetPageLikesAPIResponse + */ +public class GetPageLikesAPIResponseTest { + private final GetPageLikesAPIResponse model = new GetPageLikesAPIResponse(); + + /** + * Model tests for GetPageLikesAPIResponse + */ + @Test + public void testGetPageLikesAPIResponse() { + // TODO: test GetPageLikesAPIResponse + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'users' + */ + @Test + public void usersTest() { + // TODO: test users + } + + /** + * Test the property 'likeCount' + */ + @Test + public void likeCountTest() { + // TODO: test likeCount + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/client/src/test/java/com/fastcomments/model/GetPageReactsAPIResponseTest.java b/client/src/test/java/com/fastcomments/model/GetPageReactsAPIResponseTest.java new file mode 100644 index 00000000..0e7dc4db --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetPageReactsAPIResponseTest.java @@ -0,0 +1,85 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.PageCustomReactUser; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetPageReactsAPIResponse + */ +public class GetPageReactsAPIResponseTest { + private final GetPageReactsAPIResponse model = new GetPageReactsAPIResponse(); + + /** + * Model tests for GetPageReactsAPIResponse + */ + @Test + public void testGetPageReactsAPIResponse() { + // TODO: test GetPageReactsAPIResponse + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'users' + */ + @Test + public void usersTest() { + // TODO: test users + } + + /** + * Test the property 'counts' + */ + @Test + public void countsTest() { + // TODO: test counts + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/client/src/test/java/com/fastcomments/model/GetPollResponseTest.java b/client/src/test/java/com/fastcomments/model/GetPollResponseTest.java new file mode 100644 index 00000000..2b0913d8 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetPollResponseTest.java @@ -0,0 +1,58 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentPoll; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetPollResponse + */ +public class GetPollResponseTest { + private final GetPollResponse model = new GetPollResponse(); + + /** + * Model tests for GetPollResponse + */ + @Test + public void testGetPollResponse() { + // TODO: test GetPollResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + +} diff --git a/client/src/test/java/com/fastcomments/model/GetPollVoteResponseTest.java b/client/src/test/java/com/fastcomments/model/GetPollVoteResponseTest.java new file mode 100644 index 00000000..b81b7a3a --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetPollVoteResponseTest.java @@ -0,0 +1,58 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PublicPollVote; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetPollVoteResponse + */ +public class GetPollVoteResponseTest { + private final GetPollVoteResponse model = new GetPollVoteResponse(); + + /** + * Model tests for GetPollVoteResponse + */ + @Test + public void testGetPollVoteResponse() { + // TODO: test GetPollVoteResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'pollVote' + */ + @Test + public void pollVoteTest() { + // TODO: test pollVote + } + +} diff --git a/client/src/test/java/com/fastcomments/model/GetPollVotesResponseTest.java b/client/src/test/java/com/fastcomments/model/GetPollVotesResponseTest.java new file mode 100644 index 00000000..7acef676 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetPollVotesResponseTest.java @@ -0,0 +1,60 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PublicPollVote; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetPollVotesResponse + */ +public class GetPollVotesResponseTest { + private final GetPollVotesResponse model = new GetPollVotesResponse(); + + /** + * Model tests for GetPollVotesResponse + */ + @Test + public void testGetPollVotesResponse() { + // TODO: test GetPollVotesResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'pollVotes' + */ + @Test + public void pollVotesTest() { + // TODO: test pollVotes + } + +} diff --git a/client/src/test/java/com/fastcomments/model/GetTranslationsResponseTest.java b/client/src/test/java/com/fastcomments/model/GetTranslationsResponseTest.java index 4519dfeb..84db3e91 100644 --- a/client/src/test/java/com/fastcomments/model/GetTranslationsResponseTest.java +++ b/client/src/test/java/com/fastcomments/model/GetTranslationsResponseTest.java @@ -40,6 +40,14 @@ public void testGetTranslationsResponse() { // TODO: test GetTranslationsResponse } + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + /** * Test the property 'translations' */ diff --git a/client/src/test/java/com/fastcomments/model/GetV1PageLikesTest.java b/client/src/test/java/com/fastcomments/model/GetV1PageLikesTest.java index 868b86fa..ef449b06 100644 --- a/client/src/test/java/com/fastcomments/model/GetV1PageLikesTest.java +++ b/client/src/test/java/com/fastcomments/model/GetV1PageLikesTest.java @@ -14,13 +14,16 @@ package com.fastcomments.model; import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageReactUser; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -38,6 +41,14 @@ public void testGetV1PageLikes() { // TODO: test GetV1PageLikes } + /** + * Test the property 'users' + */ + @Test + public void usersTest() { + // TODO: test users + } + /** * Test the property 'urlIdWS' */ diff --git a/client/src/test/java/com/fastcomments/model/GetV2PageReactsTest.java b/client/src/test/java/com/fastcomments/model/GetV2PageReactsTest.java index f03f3e2d..de15e257 100644 --- a/client/src/test/java/com/fastcomments/model/GetV2PageReactsTest.java +++ b/client/src/test/java/com/fastcomments/model/GetV2PageReactsTest.java @@ -14,6 +14,7 @@ package com.fastcomments.model; import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageCustomReactUser; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,6 +43,14 @@ public void testGetV2PageReacts() { // TODO: test GetV2PageReacts } + /** + * Test the property 'users' + */ + @Test + public void usersTest() { + // TODO: test users + } + /** * Test the property 'reactedIds' */ diff --git a/client/src/test/java/com/fastcomments/model/GetWebhookSamplePayloadsResponseTest.java b/client/src/test/java/com/fastcomments/model/GetWebhookSamplePayloadsResponseTest.java new file mode 100644 index 00000000..36705add --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetWebhookSamplePayloadsResponseTest.java @@ -0,0 +1,60 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.WebhookComment; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetWebhookSamplePayloadsResponse + */ +public class GetWebhookSamplePayloadsResponseTest { + private final GetWebhookSamplePayloadsResponse model = new GetWebhookSamplePayloadsResponse(); + + /** + * Model tests for GetWebhookSamplePayloadsResponse + */ + @Test + public void testGetWebhookSamplePayloadsResponse() { + // TODO: test GetWebhookSamplePayloadsResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'payloads' + */ + @Test + public void payloadsTest() { + // TODO: test payloads + } + +} diff --git a/client/src/test/java/com/fastcomments/model/GetWebhooksResponseTest.java b/client/src/test/java/com/fastcomments/model/GetWebhooksResponseTest.java new file mode 100644 index 00000000..9d02b654 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/GetWebhooksResponseTest.java @@ -0,0 +1,60 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PublicWebhook; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetWebhooksResponse + */ +public class GetWebhooksResponseTest { + private final GetWebhooksResponse model = new GetWebhooksResponse(); + + /** + * Model tests for GetWebhooksResponse + */ + @Test + public void testGetWebhooksResponse() { + // TODO: test GetWebhooksResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'webhooks' + */ + @Test + public void webhooksTest() { + // TODO: test webhooks + } + +} diff --git a/client/src/test/java/com/fastcomments/model/LiveEventTest.java b/client/src/test/java/com/fastcomments/model/LiveEventTest.java index 8fe0c7df..0744908a 100644 --- a/client/src/test/java/com/fastcomments/model/LiveEventTest.java +++ b/client/src/test/java/com/fastcomments/model/LiveEventTest.java @@ -17,6 +17,7 @@ import com.fastcomments.model.FeedPost; import com.fastcomments.model.LiveEventExtraInfo; import com.fastcomments.model.LiveEventType; +import com.fastcomments.model.PickCommentPollOptionsOrTotalVotesOrClosesAt; import com.fastcomments.model.PubSubComment; import com.fastcomments.model.PubSubVote; import com.fastcomments.model.UserNotification; @@ -128,6 +129,22 @@ public void feedPostTest() { // TODO: test feedPost } + /** + * Test the property 'commentId' + */ + @Test + public void commentIdTest() { + // TODO: test commentId + } + + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + /** * Test the property 'extraInfo' */ diff --git a/client/src/test/java/com/fastcomments/model/MeAuthTypeTest.java b/client/src/test/java/com/fastcomments/model/MeAuthTypeTest.java new file mode 100644 index 00000000..6862cb7c --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/MeAuthTypeTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MeAuthType + */ +public class MeAuthTypeTest { + /** + * Model tests for MeAuthType + */ + @Test + public void testMeAuthType() { + // TODO: test MeAuthType + } + +} diff --git a/client/src/test/java/com/fastcomments/model/MigrateAPIPagesDataTest.java b/client/src/test/java/com/fastcomments/model/MigrateAPIPagesDataTest.java new file mode 100644 index 00000000..9a53cd9d --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/MigrateAPIPagesDataTest.java @@ -0,0 +1,51 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.PageMigration; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MigrateAPIPagesData + */ +public class MigrateAPIPagesDataTest { + private final MigrateAPIPagesData model = new MigrateAPIPagesData(); + + /** + * Model tests for MigrateAPIPagesData + */ + @Test + public void testMigrateAPIPagesData() { + // TODO: test MigrateAPIPagesData + } + + /** + * Test the property 'migrations' + */ + @Test + public void migrationsTest() { + // TODO: test migrations + } + +} diff --git a/client/src/test/java/com/fastcomments/model/NotificationSkipReasonTest.java b/client/src/test/java/com/fastcomments/model/NotificationSkipReasonTest.java new file mode 100644 index 00000000..13167529 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/NotificationSkipReasonTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NotificationSkipReason + */ +public class NotificationSkipReasonTest { + /** + * Model tests for NotificationSkipReason + */ + @Test + public void testNotificationSkipReason() { + // TODO: test NotificationSkipReason + } + +} diff --git a/client/src/test/java/com/fastcomments/model/OAuthScopeTest.java b/client/src/test/java/com/fastcomments/model/OAuthScopeTest.java new file mode 100644 index 00000000..c71809cc --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/OAuthScopeTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OAuthScope + */ +public class OAuthScopeTest { + /** + * Model tests for OAuthScope + */ + @Test + public void testOAuthScope() { + // TODO: test OAuthScope + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PageCustomReactUserTest.java b/client/src/test/java/com/fastcomments/model/PageCustomReactUserTest.java new file mode 100644 index 00000000..4cf68594 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PageCustomReactUserTest.java @@ -0,0 +1,80 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PageCustomReactUser + */ +public class PageCustomReactUserTest { + private final PageCustomReactUser model = new PageCustomReactUser(); + + /** + * Model tests for PageCustomReactUser + */ + @Test + public void testPageCustomReactUser() { + // TODO: test PageCustomReactUser + } + + /** + * Test the property 'avatarSrc' + */ + @Test + public void avatarSrcTest() { + // TODO: test avatarSrc + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'reactId' + */ + @Test + public void reactIdTest() { + // TODO: test reactId + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PageMigrationFailureTest.java b/client/src/test/java/com/fastcomments/model/PageMigrationFailureTest.java new file mode 100644 index 00000000..2ba54424 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PageMigrationFailureTest.java @@ -0,0 +1,90 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageMigrationType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PageMigrationFailure + */ +public class PageMigrationFailureTest { + private final PageMigrationFailure model = new PageMigrationFailure(); + + /** + * Model tests for PageMigrationFailure + */ + @Test + public void testPageMigrationFailure() { + // TODO: test PageMigrationFailure + } + + /** + * Test the property 'from' + */ + @Test + public void fromTest() { + // TODO: test from + } + + /** + * Test the property 'to' + */ + @Test + public void toTest() { + // TODO: test to + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PageMigrationSuccessTest.java b/client/src/test/java/com/fastcomments/model/PageMigrationSuccessTest.java new file mode 100644 index 00000000..9190500f --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PageMigrationSuccessTest.java @@ -0,0 +1,82 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.PageMigrationType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PageMigrationSuccess + */ +public class PageMigrationSuccessTest { + private final PageMigrationSuccess model = new PageMigrationSuccess(); + + /** + * Model tests for PageMigrationSuccess + */ + @Test + public void testPageMigrationSuccess() { + // TODO: test PageMigrationSuccess + } + + /** + * Test the property 'from' + */ + @Test + public void fromTest() { + // TODO: test from + } + + /** + * Test the property 'to' + */ + @Test + public void toTest() { + // TODO: test to + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'commentsMigrated' + */ + @Test + public void commentsMigratedTest() { + // TODO: test commentsMigrated + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PageMigrationTest.java b/client/src/test/java/com/fastcomments/model/PageMigrationTest.java new file mode 100644 index 00000000..bc517e51 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PageMigrationTest.java @@ -0,0 +1,65 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.PageMigrationType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PageMigration + */ +public class PageMigrationTest { + private final PageMigration model = new PageMigration(); + + /** + * Model tests for PageMigration + */ + @Test + public void testPageMigration() { + // TODO: test PageMigration + } + + /** + * Test the property 'from' + */ + @Test + public void fromTest() { + // TODO: test from + } + + /** + * Test the property 'to' + */ + @Test + public void toTest() { + // TODO: test to + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PageMigrationTypeTest.java b/client/src/test/java/com/fastcomments/model/PageMigrationTypeTest.java new file mode 100644 index 00000000..79ba80d8 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PageMigrationTypeTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PageMigrationType + */ +public class PageMigrationTypeTest { + /** + * Model tests for PageMigrationType + */ + @Test + public void testPageMigrationType() { + // TODO: test PageMigrationType + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PageMigrationUndoCountsTest.java b/client/src/test/java/com/fastcomments/model/PageMigrationUndoCountsTest.java new file mode 100644 index 00000000..8c021239 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PageMigrationUndoCountsTest.java @@ -0,0 +1,64 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PageMigrationUndoCounts + */ +public class PageMigrationUndoCountsTest { + private final PageMigrationUndoCounts model = new PageMigrationUndoCounts(); + + /** + * Model tests for PageMigrationUndoCounts + */ + @Test + public void testPageMigrationUndoCounts() { + // TODO: test PageMigrationUndoCounts + } + + /** + * Test the property 'restored' + */ + @Test + public void restoredTest() { + // TODO: test restored + } + + /** + * Test the property 'skipped' + */ + @Test + public void skippedTest() { + // TODO: test skipped + } + + /** + * Test the property 'notRestorable' + */ + @Test + public void notRestorableTest() { + // TODO: test notRestorable + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PageReactIncludeUserInfoTest.java b/client/src/test/java/com/fastcomments/model/PageReactIncludeUserInfoTest.java new file mode 100644 index 00000000..8486f7bc --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PageReactIncludeUserInfoTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PageReactIncludeUserInfo + */ +public class PageReactIncludeUserInfoTest { + /** + * Model tests for PageReactIncludeUserInfo + */ + @Test + public void testPageReactIncludeUserInfo() { + // TODO: test PageReactIncludeUserInfo + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PageReactUserTest.java b/client/src/test/java/com/fastcomments/model/PageReactUserTest.java new file mode 100644 index 00000000..faa6f6b3 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PageReactUserTest.java @@ -0,0 +1,72 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PageReactUser + */ +public class PageReactUserTest { + private final PageReactUser model = new PageReactUser(); + + /** + * Model tests for PageReactUser + */ + @Test + public void testPageReactUser() { + // TODO: test PageReactUser + } + + /** + * Test the property 'avatarSrc' + */ + @Test + public void avatarSrcTest() { + // TODO: test avatarSrc + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAtTest.java b/client/src/test/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAtTest.java new file mode 100644 index 00000000..0aae2a41 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PickCommentPollOptionsOrTotalVotesOrClosesAtTest.java @@ -0,0 +1,68 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.CommentPollOption; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PickCommentPollOptionsOrTotalVotesOrClosesAt + */ +public class PickCommentPollOptionsOrTotalVotesOrClosesAtTest { + private final PickCommentPollOptionsOrTotalVotesOrClosesAt model = new PickCommentPollOptionsOrTotalVotesOrClosesAt(); + + /** + * Model tests for PickCommentPollOptionsOrTotalVotesOrClosesAt + */ + @Test + public void testPickCommentPollOptionsOrTotalVotesOrClosesAt() { + // TODO: test PickCommentPollOptionsOrTotalVotesOrClosesAt + } + + /** + * Test the property 'options' + */ + @Test + public void optionsTest() { + // TODO: test options + } + + /** + * Test the property 'totalVotes' + */ + @Test + public void totalVotesTest() { + // TODO: test totalVotes + } + + /** + * Test the property 'closesAt' + */ + @Test + public void closesAtTest() { + // TODO: test closesAt + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PollCreationModeTest.java b/client/src/test/java/com/fastcomments/model/PollCreationModeTest.java new file mode 100644 index 00000000..c7506582 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PollCreationModeTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PollCreationMode + */ +public class PollCreationModeTest { + /** + * Model tests for PollCreationMode + */ + @Test + public void testPollCreationMode() { + // TODO: test PollCreationMode + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PollPrivacyTest.java b/client/src/test/java/com/fastcomments/model/PollPrivacyTest.java new file mode 100644 index 00000000..e708c2c8 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PollPrivacyTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PollPrivacy + */ +public class PollPrivacyTest { + /** + * Model tests for PollPrivacy + */ + @Test + public void testPollPrivacy() { + // TODO: test PollPrivacy + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PollVotingModeTest.java b/client/src/test/java/com/fastcomments/model/PollVotingModeTest.java new file mode 100644 index 00000000..c7cb4b16 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PollVotingModeTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PollVotingMode + */ +public class PollVotingModeTest { + /** + * Model tests for PollVotingMode + */ + @Test + public void testPollVotingMode() { + // TODO: test PollVotingMode + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PubSubCommentBaseTest.java b/client/src/test/java/com/fastcomments/model/PubSubCommentBaseTest.java index 41ed8964..0ee8983f 100644 --- a/client/src/test/java/com/fastcomments/model/PubSubCommentBaseTest.java +++ b/client/src/test/java/com/fastcomments/model/PubSubCommentBaseTest.java @@ -13,6 +13,7 @@ package com.fastcomments.model; +import com.fastcomments.model.CommentPoll; import com.fastcomments.model.CommentUserBadgeInfo; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -273,6 +274,14 @@ public void feedbackIdsTest() { // TODO: test feedbackIds } + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + /** * Test the property 'flagCount' */ diff --git a/client/src/test/java/com/fastcomments/model/PubSubCommentTest.java b/client/src/test/java/com/fastcomments/model/PubSubCommentTest.java index fffd6ef9..0acda426 100644 --- a/client/src/test/java/com/fastcomments/model/PubSubCommentTest.java +++ b/client/src/test/java/com/fastcomments/model/PubSubCommentTest.java @@ -13,6 +13,7 @@ package com.fastcomments.model; +import com.fastcomments.model.CommentPoll; import com.fastcomments.model.CommentUserBadgeInfo; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -273,6 +274,14 @@ public void feedbackIdsTest() { // TODO: test feedbackIds } + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + /** * Test the property 'flagCount' */ diff --git a/client/src/test/java/com/fastcomments/model/PublicCommentTest.java b/client/src/test/java/com/fastcomments/model/PublicCommentTest.java index 1aaa082b..1d2f9187 100644 --- a/client/src/test/java/com/fastcomments/model/PublicCommentTest.java +++ b/client/src/test/java/com/fastcomments/model/PublicCommentTest.java @@ -281,6 +281,14 @@ public void isUnreadTest() { // TODO: test isUnread } + /** + * Test the property 'myPollVotes' + */ + @Test + public void myPollVotesTest() { + // TODO: test myPollVotes + } + /** * Test the property 'myVoteId' */ diff --git a/client/src/test/java/com/fastcomments/model/PublicPollVoteTest.java b/client/src/test/java/com/fastcomments/model/PublicPollVoteTest.java new file mode 100644 index 00000000..9d17a9d9 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PublicPollVoteTest.java @@ -0,0 +1,105 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PublicPollVote + */ +public class PublicPollVoteTest { + private final PublicPollVote model = new PublicPollVote(); + + /** + * Model tests for PublicPollVote + */ + @Test + public void testPublicPollVote() { + // TODO: test PublicPollVote + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'commentId' + */ + @Test + public void commentIdTest() { + // TODO: test commentId + } + + /** + * Test the property 'urlId' + */ + @Test + public void urlIdTest() { + // TODO: test urlId + } + + /** + * Test the property 'voterId' + */ + @Test + public void voterIdTest() { + // TODO: test voterId + } + + /** + * Test the property 'optionId' + */ + @Test + public void optionIdTest() { + // TODO: test optionId + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/client/src/test/java/com/fastcomments/model/PublicWebhookTest.java b/client/src/test/java/com/fastcomments/model/PublicWebhookTest.java new file mode 100644 index 00000000..a105f798 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/PublicWebhookTest.java @@ -0,0 +1,148 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.WebhookEventName; +import com.fastcomments.model.WebhookHTTPMethod; +import com.fastcomments.model.WebhookSource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PublicWebhook + */ +public class PublicWebhookTest { + private final PublicWebhook model = new PublicWebhook(); + + /** + * Model tests for PublicWebhook + */ + @Test + public void testPublicWebhook() { + // TODO: test PublicWebhook + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'url' + */ + @Test + public void urlTest() { + // TODO: test url + } + + /** + * Test the property 'event' + */ + @Test + public void eventTest() { + // TODO: test event + } + + /** + * Test the property 'domain' + */ + @Test + public void domainTest() { + // TODO: test domain + } + + /** + * Test the property 'method' + */ + @Test + public void methodTest() { + // TODO: test method + } + + /** + * Test the property 'source' + */ + @Test + public void sourceTest() { + // TODO: test source + } + + /** + * Test the property 'enabled' + */ + @Test + public void enabledTest() { + // TODO: test enabled + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'lastSuccessAt' + */ + @Test + public void lastSuccessAtTest() { + // TODO: test lastSuccessAt + } + + /** + * Test the property 'lastFailureAt' + */ + @Test + public void lastFailureAtTest() { + // TODO: test lastFailureAt + } + + /** + * Test the property 'failingSince' + */ + @Test + public void failingSinceTest() { + // TODO: test failingSince + } + + /** + * Test the property 'disabledAt' + */ + @Test + public void disabledAtTest() { + // TODO: test disabledAt + } + + /** + * Test the property 'disabledReason' + */ + @Test + public void disabledReasonTest() { + // TODO: test disabledReason + } + +} diff --git a/client/src/test/java/com/fastcomments/model/QuestionConditionOperatorTest.java b/client/src/test/java/com/fastcomments/model/QuestionConditionOperatorTest.java new file mode 100644 index 00000000..e9b8c100 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/QuestionConditionOperatorTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuestionConditionOperator + */ +public class QuestionConditionOperatorTest { + /** + * Model tests for QuestionConditionOperator + */ + @Test + public void testQuestionConditionOperator() { + // TODO: test QuestionConditionOperator + } + +} diff --git a/client/src/test/java/com/fastcomments/model/QuestionConditionTest.java b/client/src/test/java/com/fastcomments/model/QuestionConditionTest.java new file mode 100644 index 00000000..b9570e90 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/QuestionConditionTest.java @@ -0,0 +1,57 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.QuestionConditionOperator; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuestionCondition + */ +public class QuestionConditionTest { + private final QuestionCondition model = new QuestionCondition(); + + /** + * Model tests for QuestionCondition + */ + @Test + public void testQuestionCondition() { + // TODO: test QuestionCondition + } + + /** + * Test the property 'operator' + */ + @Test + public void operatorTest() { + // TODO: test operator + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + +} diff --git a/client/src/test/java/com/fastcomments/model/QuestionConfigTest.java b/client/src/test/java/com/fastcomments/model/QuestionConfigTest.java index 747e82fb..913dd267 100644 --- a/client/src/test/java/com/fastcomments/model/QuestionConfigTest.java +++ b/client/src/test/java/com/fastcomments/model/QuestionConfigTest.java @@ -13,7 +13,9 @@ package com.fastcomments.model; +import com.fastcomments.model.QuestionCondition; import com.fastcomments.model.QuestionConfigCustomOptionsInner; +import com.fastcomments.model.SubQuestionCondition; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -201,6 +203,30 @@ public void alwaysShowSubQuestionsTest() { // TODO: test alwaysShowSubQuestions } + /** + * Test the property 'subQuestionConditions' + */ + @Test + public void subQuestionConditionsTest() { + // TODO: test subQuestionConditions + } + + /** + * Test the property 'commentBoxCondition' + */ + @Test + public void commentBoxConditionTest() { + // TODO: test commentBoxCondition + } + + /** + * Test the property 'commentBoxPrompt' + */ + @Test + public void commentBoxPromptTest() { + // TODO: test commentBoxPrompt + } + /** * Test the property 'reportingOrder' */ diff --git a/client/src/test/java/com/fastcomments/model/QuestionResultTest.java b/client/src/test/java/com/fastcomments/model/QuestionResultTest.java index 7f47cc92..ce9c7883 100644 --- a/client/src/test/java/com/fastcomments/model/QuestionResultTest.java +++ b/client/src/test/java/com/fastcomments/model/QuestionResultTest.java @@ -97,6 +97,14 @@ public void valueTest() { // TODO: test value } + /** + * Test the property 'values' + */ + @Test + public void valuesTest() { + // TODO: test values + } + /** * Test the property 'commentId' */ diff --git a/client/src/test/java/com/fastcomments/model/QueuePageMigrationJobAPIResponseTest.java b/client/src/test/java/com/fastcomments/model/QueuePageMigrationJobAPIResponseTest.java new file mode 100644 index 00000000..3688ab03 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/QueuePageMigrationJobAPIResponseTest.java @@ -0,0 +1,72 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QueuePageMigrationJobAPIResponse + */ +public class QueuePageMigrationJobAPIResponseTest { + private final QueuePageMigrationJobAPIResponse model = new QueuePageMigrationJobAPIResponse(); + + /** + * Model tests for QueuePageMigrationJobAPIResponse + */ + @Test + public void testQueuePageMigrationJobAPIResponse() { + // TODO: test QueuePageMigrationJobAPIResponse + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'batchJobId' + */ + @Test + public void batchJobIdTest() { + // TODO: test batchJobId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/client/src/test/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValueTest.java b/client/src/test/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValueTest.java new file mode 100644 index 00000000..c950332c --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/RecordStringStringOrNumberOrNumberArrayValueTest.java @@ -0,0 +1,34 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RecordStringStringOrNumberOrNumberArrayValue + */ +public class RecordStringStringOrNumberOrNumberArrayValueTest { + private final RecordStringStringOrNumberOrNumberArrayValue model = new RecordStringStringOrNumberOrNumberArrayValue(); + + /** + * Model tests for RecordStringStringOrNumberOrNumberArrayValue + */ + @Test + public void testRecordStringStringOrNumberOrNumberArrayValue() { + // TODO: test RecordStringStringOrNumberOrNumberArrayValue + } + +} diff --git a/client/src/test/java/com/fastcomments/model/SavePollResponseTest.java b/client/src/test/java/com/fastcomments/model/SavePollResponseTest.java new file mode 100644 index 00000000..9acda2fe --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/SavePollResponseTest.java @@ -0,0 +1,58 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.APIStatus; +import com.fastcomments.model.CommentPoll; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SavePollResponse + */ +public class SavePollResponseTest { + private final SavePollResponse model = new SavePollResponse(); + + /** + * Model tests for SavePollResponse + */ + @Test + public void testSavePollResponse() { + // TODO: test SavePollResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'poll' + */ + @Test + public void pollTest() { + // TODO: test poll + } + +} diff --git a/client/src/test/java/com/fastcomments/model/SubQuestionConditionTest.java b/client/src/test/java/com/fastcomments/model/SubQuestionConditionTest.java new file mode 100644 index 00000000..172af394 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/SubQuestionConditionTest.java @@ -0,0 +1,65 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.QuestionConditionOperator; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SubQuestionCondition + */ +public class SubQuestionConditionTest { + private final SubQuestionCondition model = new SubQuestionCondition(); + + /** + * Model tests for SubQuestionCondition + */ + @Test + public void testSubQuestionCondition() { + // TODO: test SubQuestionCondition + } + + /** + * Test the property 'operator' + */ + @Test + public void operatorTest() { + // TODO: test operator + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + + /** + * Test the property 'subQuestionId' + */ + @Test + public void subQuestionIdTest() { + // TODO: test subQuestionId + } + +} diff --git a/client/src/test/java/com/fastcomments/model/TenantPackageTest.java b/client/src/test/java/com/fastcomments/model/TenantPackageTest.java index b54e857b..fc169e01 100644 --- a/client/src/test/java/com/fastcomments/model/TenantPackageTest.java +++ b/client/src/test/java/com/fastcomments/model/TenantPackageTest.java @@ -488,6 +488,14 @@ public void flexSSOModeratorUnitTest() { // TODO: test flexSSOModeratorUnit } + /** + * Test the property 'flexFreeModerators' + */ + @Test + public void flexFreeModeratorsTest() { + // TODO: test flexFreeModerators + } + /** * Test the property 'isSSOBillingMonthlyActiveUsers' */ diff --git a/client/src/test/java/com/fastcomments/model/UpdateQuestionConfigBodyTest.java b/client/src/test/java/com/fastcomments/model/UpdateQuestionConfigBodyTest.java index 92d9a3fb..63b81f98 100644 --- a/client/src/test/java/com/fastcomments/model/UpdateQuestionConfigBodyTest.java +++ b/client/src/test/java/com/fastcomments/model/UpdateQuestionConfigBodyTest.java @@ -13,7 +13,9 @@ package com.fastcomments.model; +import com.fastcomments.model.QuestionCondition; import com.fastcomments.model.QuestionConfigCustomOptionsInner; +import com.fastcomments.model.SubQuestionCondition; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -144,6 +146,30 @@ public void alwaysShowSubQuestionsTest() { // TODO: test alwaysShowSubQuestions } + /** + * Test the property 'subQuestionConditions' + */ + @Test + public void subQuestionConditionsTest() { + // TODO: test subQuestionConditions + } + + /** + * Test the property 'commentBoxCondition' + */ + @Test + public void commentBoxConditionTest() { + // TODO: test commentBoxCondition + } + + /** + * Test the property 'commentBoxPrompt' + */ + @Test + public void commentBoxPromptTest() { + // TODO: test commentBoxPrompt + } + /** * Test the property 'reportingOrder' */ diff --git a/client/src/test/java/com/fastcomments/model/UpdateQuestionResultBodyTest.java b/client/src/test/java/com/fastcomments/model/UpdateQuestionResultBodyTest.java index 8fe6ae59..7e4eeb1c 100644 --- a/client/src/test/java/com/fastcomments/model/UpdateQuestionResultBodyTest.java +++ b/client/src/test/java/com/fastcomments/model/UpdateQuestionResultBodyTest.java @@ -72,6 +72,14 @@ public void valueTest() { // TODO: test value } + /** + * Test the property 'values' + */ + @Test + public void valuesTest() { + // TODO: test values + } + /** * Test the property 'commentId' */ diff --git a/client/src/test/java/com/fastcomments/model/UpdateTenantBodyTest.java b/client/src/test/java/com/fastcomments/model/UpdateTenantBodyTest.java index cffcf346..d5878fb4 100644 --- a/client/src/test/java/com/fastcomments/model/UpdateTenantBodyTest.java +++ b/client/src/test/java/com/fastcomments/model/UpdateTenantBodyTest.java @@ -99,14 +99,6 @@ public void billingHandledExternallyTest() { // TODO: test billingHandledExternally } - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - /** * Test the property 'isSetup' */ diff --git a/client/src/test/java/com/fastcomments/model/WebhookCommentTest.java b/client/src/test/java/com/fastcomments/model/WebhookCommentTest.java new file mode 100644 index 00000000..aec5f3d0 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/WebhookCommentTest.java @@ -0,0 +1,275 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.fastcomments.model.CommentUserMentionInfo; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for WebhookComment + */ +public class WebhookCommentTest { + private final WebhookComment model = new WebhookComment(); + + /** + * Model tests for WebhookComment + */ + @Test + public void testWebhookComment() { + // TODO: test WebhookComment + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'urlId' + */ + @Test + public void urlIdTest() { + // TODO: test urlId + } + + /** + * Test the property 'url' + */ + @Test + public void urlTest() { + // TODO: test url + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'commenterEmail' + */ + @Test + public void commenterEmailTest() { + // TODO: test commenterEmail + } + + /** + * Test the property 'commenterName' + */ + @Test + public void commenterNameTest() { + // TODO: test commenterName + } + + /** + * Test the property 'comment' + */ + @Test + public void commentTest() { + // TODO: test comment + } + + /** + * Test the property 'commentHTML' + */ + @Test + public void commentHTMLTest() { + // TODO: test commentHTML + } + + /** + * Test the property 'externalId' + */ + @Test + public void externalIdTest() { + // TODO: test externalId + } + + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'date' + */ + @Test + public void dateTest() { + // TODO: test date + } + + /** + * Test the property 'votes' + */ + @Test + public void votesTest() { + // TODO: test votes + } + + /** + * Test the property 'votesUp' + */ + @Test + public void votesUpTest() { + // TODO: test votesUp + } + + /** + * Test the property 'votesDown' + */ + @Test + public void votesDownTest() { + // TODO: test votesDown + } + + /** + * Test the property 'verified' + */ + @Test + public void verifiedTest() { + // TODO: test verified + } + + /** + * Test the property 'verifiedDate' + */ + @Test + public void verifiedDateTest() { + // TODO: test verifiedDate + } + + /** + * Test the property 'reviewed' + */ + @Test + public void reviewedTest() { + // TODO: test reviewed + } + + /** + * Test the property 'avatarSrc' + */ + @Test + public void avatarSrcTest() { + // TODO: test avatarSrc + } + + /** + * Test the property 'isSpam' + */ + @Test + public void isSpamTest() { + // TODO: test isSpam + } + + /** + * Test the property 'aiDeterminedSpam' + */ + @Test + public void aiDeterminedSpamTest() { + // TODO: test aiDeterminedSpam + } + + /** + * Test the property 'hasImages' + */ + @Test + public void hasImagesTest() { + // TODO: test hasImages + } + + /** + * Test the property 'pageNumber' + */ + @Test + public void pageNumberTest() { + // TODO: test pageNumber + } + + /** + * Test the property 'pageNumberOF' + */ + @Test + public void pageNumberOFTest() { + // TODO: test pageNumberOF + } + + /** + * Test the property 'pageNumberNF' + */ + @Test + public void pageNumberNFTest() { + // TODO: test pageNumberNF + } + + /** + * Test the property 'approved' + */ + @Test + public void approvedTest() { + // TODO: test approved + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'mentions' + */ + @Test + public void mentionsTest() { + // TODO: test mentions + } + + /** + * Test the property 'domain' + */ + @Test + public void domainTest() { + // TODO: test domain + } + + /** + * Test the property 'moderationGroupIds' + */ + @Test + public void moderationGroupIdsTest() { + // TODO: test moderationGroupIds + } + +} diff --git a/client/src/test/java/com/fastcomments/model/WebhookEventNameTest.java b/client/src/test/java/com/fastcomments/model/WebhookEventNameTest.java new file mode 100644 index 00000000..8c79ea4d --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/WebhookEventNameTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for WebhookEventName + */ +public class WebhookEventNameTest { + /** + * Model tests for WebhookEventName + */ + @Test + public void testWebhookEventName() { + // TODO: test WebhookEventName + } + +} diff --git a/client/src/test/java/com/fastcomments/model/WebhookHTTPMethodTest.java b/client/src/test/java/com/fastcomments/model/WebhookHTTPMethodTest.java new file mode 100644 index 00000000..878285d9 --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/WebhookHTTPMethodTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for WebhookHTTPMethod + */ +public class WebhookHTTPMethodTest { + /** + * Model tests for WebhookHTTPMethod + */ + @Test + public void testWebhookHTTPMethod() { + // TODO: test WebhookHTTPMethod + } + +} diff --git a/client/src/test/java/com/fastcomments/model/WebhookSourceTest.java b/client/src/test/java/com/fastcomments/model/WebhookSourceTest.java new file mode 100644 index 00000000..cc23400e --- /dev/null +++ b/client/src/test/java/com/fastcomments/model/WebhookSourceTest.java @@ -0,0 +1,32 @@ +/* + * fastcomments + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * Contact: support@fastcomments.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.fastcomments.model; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for WebhookSource + */ +public class WebhookSourceTest { + /** + * Model tests for WebhookSource + */ + @Test + public void testWebhookSource() { + // TODO: test WebhookSource + } + +} diff --git a/config.json b/config.json index 610b0e44..364b84e6 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,7 @@ { "groupId": "com.fastcomments", "artifactId": "client", - "artifactVersion": "3.0.1", + "artifactVersion": "3.1.0", "packageName": "com.fastcomments", "apiPackage": "com.fastcomments.api", "modelPackage": "com.fastcomments.model", diff --git a/openapi.json b/openapi.json index 302747de..37ce568a 100644 --- a/openapi.json +++ b/openapi.json @@ -134,6 +134,21 @@ ], "type": "integer" }, + "PollCreationMode": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer" + }, + "PollVotingMode": { + "enum": [ + 0, + 1 + ], + "type": "integer" + }, "CommenterNameFormats": { "enum": [ 0, @@ -284,6 +299,14 @@ "type": "object", "additionalProperties": false }, + "CommentTranslationMode": { + "type": "string", + "enum": [ + "off", + "auto", + "manual" + ] + }, "CustomConfigParameters": { "properties": { "absoluteAndRelativeDates": { @@ -308,6 +331,10 @@ "type": "array", "nullable": true }, + "autoGenerateUsername": { + "type": "boolean", + "description": "Serve each new visitor a unique generated username as the prefilled defaultUsername." + }, "collapseReplies": { "type": "boolean" }, @@ -318,6 +345,10 @@ "commentHTMLRenderingMode": { "$ref": "#/components/schemas/CommentHTMLRenderingMode" }, + "commentsRequireApproval": { + "type": "boolean", + "description": "Hold every new or edited comment on this page or domain for moderation, like the tenant-wide setting but scoped." + }, "commentThreadDeleteMode": { "allOf": [ { @@ -326,6 +357,22 @@ ], "nullable": true }, + "pollCreation": { + "allOf": [ + { + "$ref": "#/components/schemas/PollCreationMode" + } + ], + "nullable": true + }, + "pollVoting": { + "allOf": [ + { + "$ref": "#/components/schemas/PollVotingMode" + } + ], + "nullable": true + }, "commenterNameFormat": { "allOf": [ { @@ -607,6 +654,14 @@ }, "tos": { "$ref": "#/components/schemas/TOSConfig" + }, + "commentTranslation": { + "allOf": [ + { + "$ref": "#/components/schemas/CommentTranslationMode" + } + ], + "nullable": true } }, "type": "object", @@ -694,7 +749,9 @@ 81, 82, 9, - 10 + 10, + 11, + 12 ], "type": "integer" }, @@ -1079,6 +1136,10 @@ }, "GetTranslationsResponse": { "properties": { + "locale": { + "type": "string", + "description": "The locale the translations were resolved for. Clients use it to set text direction." + }, "translations": { "$ref": "#/components/schemas/Record_string.string_" }, @@ -1087,6 +1148,7 @@ } }, "required": [ + "locale", "translations", "status" ], @@ -1257,8 +1319,36 @@ ], "type": "object" }, + "PageReactUser": { + "properties": { + "avatarSrc": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "username": { + "type": "string" + }, + "userId": { + "type": "string" + } + }, + "required": [ + "username", + "userId" + ], + "type": "object" + }, "GetV1PageLikes": { "properties": { + "users": { + "items": { + "$ref": "#/components/schemas/PageReactUser" + }, + "type": "array", + "description": "Most recent first. Present when includeUserInfo is passed. Capped at 100 reacts." + }, "urlIdWS": { "type": "string" }, @@ -1286,6 +1376,14 @@ ], "type": "object" }, + "PageReactIncludeUserInfo": { + "type": "string", + "enum": [ + "public", + "include-private" + ], + "description": "public omits users with private profile activity; include-private requires an API key." + }, "GetV2PageReactUsersResponse": { "properties": { "userNames": { @@ -1313,8 +1411,40 @@ "type": "object", "description": "Construct a type with a set of properties K of type T" }, + "PageCustomReactUser": { + "properties": { + "avatarSrc": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "username": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "reactId": { + "type": "string" + } + }, + "required": [ + "username", + "userId", + "reactId" + ], + "type": "object" + }, "GetV2PageReacts": { "properties": { + "users": { + "items": { + "$ref": "#/components/schemas/PageCustomReactUser" + }, + "type": "array", + "description": "One entry per react, most recent first. Present when includeUserInfo is passed. Capped at 100 reacts." + }, "reactedIds": { "items": { "type": "string" @@ -3592,6 +3722,10 @@ }, "data": { "type": "string" + }, + "domain": { + "type": "string", + "nullable": true } }, "required": [ @@ -3647,7 +3781,8 @@ "updated-ticket-assignment", "deleted-ticket", "page-react", - "question-result" + "question-result", + "poll-update" ], "type": "string" }, @@ -3812,6 +3947,78 @@ "type": "object", "additionalProperties": false }, + "CommentPollOption": { + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "votes": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "id", + "label", + "votes" + ], + "type": "object", + "additionalProperties": false + }, + "PollPrivacy": { + "description": "Who may see which voter picked which option. Chosen by the poll's author when they build the poll, so it\nlives on the poll itself rather than in the widget config. Anonymous is the default and is never stored on\nthe poll or sent to the client, so an unset value means Anonymous.", + "enum": [ + 0, + 1, + 2 + ], + "type": "integer" + }, + "CommentPoll": { + "description": "A poll attached to a comment. Vote counts are denormalized here; individual votes live in PollVote.", + "properties": { + "question": { + "type": "string" + }, + "options": { + "items": { + "$ref": "#/components/schemas/CommentPollOption" + }, + "type": "array" + }, + "totalVotes": { + "type": "integer", + "format": "int32" + }, + "closesAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "privacy": { + "allOf": [ + { + "$ref": "#/components/schemas/PollPrivacy" + } + ], + "nullable": true + }, + "requireVoteToSeeResults": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "question", + "options", + "totalVotes" + ], + "type": "object", + "additionalProperties": false + }, "FDomain": { "type": "string" }, @@ -3933,6 +4140,14 @@ }, "type": "array" }, + "poll": { + "allOf": [ + { + "$ref": "#/components/schemas/CommentPoll" + } + ], + "nullable": true + }, "flagCount": { "type": "integer", "format": "int32", @@ -4021,6 +4236,33 @@ } ] }, + "Pick_CommentPoll.options-or-totalVotes-or-closesAt_": { + "properties": { + "options": { + "items": { + "$ref": "#/components/schemas/CommentPollOption" + }, + "type": "array" + }, + "totalVotes": { + "type": "integer", + "format": "int32" + }, + "closesAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "options", + "totalVotes" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "CommentPollUpdate": { + "$ref": "#/components/schemas/Pick_CommentPoll.options-or-totalVotes-or-closesAt_" + }, "Record_string._before-string-or-null--after-string-or-null__": { "properties": {}, "additionalProperties": { @@ -4083,6 +4325,12 @@ "feedPost": { "$ref": "#/components/schemas/FeedPost" }, + "commentId": { + "type": "string" + }, + "poll": { + "$ref": "#/components/schemas/CommentPollUpdate" + }, "extraInfo": { "properties": { "commentPositions": { @@ -4286,6 +4534,13 @@ "isUnread": { "type": "boolean" }, + "myPollVotes": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Ids of the options the current viewer voted for on this comment's poll. Only set when polls are enabled and they have voted." + }, "myVoteId": { "type": "string" }, @@ -4634,7 +4889,7 @@ } ] }, - "Record_string.string-or-number_": { + "Record_string.string-or-number-or-number-Array_": { "properties": {}, "additionalProperties": { "anyOf": [ @@ -4644,12 +4899,51 @@ { "type": "number", "format": "double" + }, + { + "items": { + "type": "number", + "format": "double" + }, + "type": "array" } ] }, "type": "object", "description": "Construct a type with a set of properties K of type T" }, + "CommentPollInput": { + "properties": { + "question": { + "type": "string" + }, + "options": { + "items": { + "type": "string" + }, + "type": "array" + }, + "closesAt": { + "type": "string", + "nullable": true + }, + "privacy": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "requireVoteToSeeResults": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "question", + "options" + ], + "type": "object", + "additionalProperties": false + }, "CommentData": { "properties": { "date": { @@ -4745,7 +5039,10 @@ "type": "array" }, "questionValues": { - "$ref": "#/components/schemas/Record_string.string-or-number_" + "$ref": "#/components/schemas/Record_string.string-or-number-or-number-Array_" + }, + "poll": { + "$ref": "#/components/schemas/CommentPollInput" }, "tos": { "type": "boolean" @@ -4873,31 +5170,104 @@ "type": "object", "additionalProperties": false }, - "ChangeCommentPinStatusResponse": { + "CommentTranslationPublic": { "properties": { - "commentPositions": { - "$ref": "#/components/schemas/CommentPositions" + "commentHTML": { + "type": "string" }, - "status": { - "$ref": "#/components/schemas/APIStatus" + "sourceLanguage": { + "type": "string" } }, "required": [ - "commentPositions", - "status" + "commentHTML", + "sourceLanguage" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "BlockSuccess": { + "Record_string.CommentTranslationPublic-or-null_": { + "properties": {}, + "additionalProperties": { + "allOf": [ + { + "$ref": "#/components/schemas/CommentTranslationPublic" + } + ], + "nullable": true + }, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "CommentTranslationsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "commentStatuses": { - "$ref": "#/components/schemas/Record_string.boolean_" - } - }, - "required": [ + "locale": { + "type": "string" + }, + "translations": { + "$ref": "#/components/schemas/Record_string.CommentTranslationPublic-or-null_", + "description": "null means the comment is already in the target language or cannot be translated." + }, + "failed": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Comment ids that failed transiently and may be retried." + } + }, + "required": [ + "status", + "locale", + "translations", + "failed" + ], + "type": "object", + "additionalProperties": false + }, + "CommentTranslationsRequest": { + "properties": { + "commentIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "commentIds" + ], + "type": "object", + "additionalProperties": false + }, + "ChangeCommentPinStatusResponse": { + "properties": { + "commentPositions": { + "$ref": "#/components/schemas/CommentPositions" + }, + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "commentPositions", + "status" + ], + "type": "object" + }, + "BlockSuccess": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "commentStatuses": { + "$ref": "#/components/schemas/Record_string.boolean_" + } + }, + "required": [ "status", "commentStatuses" ], @@ -5533,6 +5903,61 @@ ], "type": "object" }, + "GetPageLikesAPIResponse": { + "properties": { + "reason": { + "type": "string" + }, + "code": { + "type": "string" + }, + "users": { + "items": { + "$ref": "#/components/schemas/PageReactUser" + }, + "type": "array", + "description": "Most recent first. Present when includeUserInfo is passed. Capped at 100 reacts." + }, + "likeCount": { + "type": "integer", + "format": "int32" + }, + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "GetPageReactsAPIResponse": { + "properties": { + "reason": { + "type": "string" + }, + "code": { + "type": "string" + }, + "users": { + "items": { + "$ref": "#/components/schemas/PageCustomReactUser" + }, + "type": "array", + "description": "One entry per react, most recent first. Present when includeUserInfo is passed. Capped at 100 reacts." + }, + "counts": { + "$ref": "#/components/schemas/Record_string.number_" + }, + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, "AddPageAPIResponse": { "properties": { "reason": { @@ -5586,6 +6011,70 @@ ], "type": "object" }, + "QueuePageMigrationJobAPIResponse": { + "properties": { + "reason": { + "type": "string" + }, + "code": { + "type": "string" + }, + "batchJobId": { + "type": "string", + "description": "Poll GET /api/v1/batch-jobs/{batchJobId} for progress and the result." + }, + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "PageMigrationType": { + "type": "string", + "enum": [ + "urlId", + "domain" + ], + "description": "\"urlId\" renames exact urlId matches only. \"domain\" find/replaces the value inside every urlId and url." + }, + "PageMigration": { + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/PageMigrationType" + } + }, + "required": [ + "from", + "to", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "MigrateAPIPagesData": { + "properties": { + "migrations": { + "items": { + "$ref": "#/components/schemas/PageMigration" + }, + "type": "array", + "description": "Run in the order given, so a -> b then b -> c works. At most 100." + } + }, + "required": [ + "migrations" + ], + "type": "object" + }, "PatchPageAPIResponse": { "properties": { "reason": { @@ -5650,1505 +6139,1246 @@ ], "type": "object" }, - "PublicVote": { + "WebhookEventName": { + "type": "string", + "enum": [ + "comment-created", + "comment-updated", + "comment-deleted" + ] + }, + "WebhookHTTPMethod": { + "type": "string", + "enum": [ + "PUT", + "DELETE", + "POST" + ] + }, + "WebhookSource": { + "type": "string", + "enum": [ + "dashboard", + "api" + ] + }, + "PublicWebhook": { "properties": { "id": { "type": "string" }, - "urlId": { + "url": { "type": "string" }, - "commentId": { - "type": "string" + "event": { + "$ref": "#/components/schemas/WebhookEventName" }, - "userId": { + "domain": { "type": "string" }, - "direction": { - "type": "string" + "method": { + "$ref": "#/components/schemas/WebhookHTTPMethod" + }, + "source": { + "$ref": "#/components/schemas/WebhookSource" + }, + "enabled": { + "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" + }, + "lastSuccessAt": { + "type": "string", + "format": "date-time" + }, + "lastFailureAt": { + "type": "string", + "format": "date-time" + }, + "failingSince": { + "type": "string", + "format": "date-time" + }, + "disabledAt": { + "type": "string", + "format": "date-time" + }, + "disabledReason": { + "type": "string", + "enum": [ + "auto", + "manual" + ] } }, "required": [ "id", - "urlId", - "commentId", - "userId", - "direction", + "url", + "event", + "domain", + "method", + "source", + "enabled", "createdAt" ], "type": "object", "additionalProperties": false }, - "GetVotesResponse": { + "GetWebhooksResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "appliedAuthorizedVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" - }, - "type": "array" - }, - "appliedAnonymousVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" - }, - "type": "array" - }, - "pendingVotes": { + "webhooks": { "items": { - "$ref": "#/components/schemas/PublicVote" + "$ref": "#/components/schemas/PublicWebhook" }, "type": "array" } }, "required": [ "status", - "appliedAuthorizedVotes", - "appliedAnonymousVotes", - "pendingVotes" + "webhooks" ], "type": "object", "additionalProperties": false }, - "GetVotesForUserResponse": { + "WebhookComment": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "id": { + "type": "string" }, - "appliedAuthorizedVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" - }, - "type": "array" + "urlId": { + "type": "string" }, - "appliedAnonymousVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" - }, - "type": "array" + "url": { + "type": "string", + "nullable": true }, - "pendingVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" - }, - "type": "array" - } - }, - "required": [ - "status", - "appliedAuthorizedVotes", - "appliedAnonymousVotes", - "pendingVotes" - ], - "type": "object", - "additionalProperties": false - }, - "DigestEmailFrequency": { - "enum": [ - -1, - 0, - 1, - 2 - ], - "type": "integer" - }, - "ImportedAgentApprovalNotificationFrequency": { - "enum": [ - -1, - 0, - 1, - 2 - ], - "type": "integer" - }, - "AgentApprovalNotificationFrequency": { - "$ref": "#/components/schemas/ImportedAgentApprovalNotificationFrequency" - }, - "User": { - "properties": { - "_id": { - "type": "string" - }, - "tenantId": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "websiteUrl": { + "userId": { "type": "string", "nullable": true }, - "email": { + "commenterEmail": { "type": "string", "nullable": true }, - "pendingEmail": { + "commenterName": { "type": "string" }, - "backupEmail": { + "comment": { "type": "string" }, - "pendingBackupEmail": { + "commentHTML": { "type": "string" }, - "signUpDate": { - "type": "integer", - "format": "int64" - }, - "createdFromUrlId": { - "type": "string", - "nullable": true - }, - "createdFromTenantId": { + "externalId": { "type": "string", "nullable": true }, - "createdFromIpHashed": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "loginId": { - "type": "string" - }, - "loginIdDate": { - "type": "integer", - "format": "int64" - }, - "loginCount": { - "type": "integer", - "format": "int32" - }, - "optedInNotifications": { - "type": "boolean" - }, - "optedInTenantNotifications": { - "type": "boolean" - }, - "hideAccountCode": { - "type": "boolean" - }, - "avatarSrc": { + "parentId": { "type": "string", "nullable": true }, - "isFastCommentsHelpRequestAdmin": { - "type": "boolean" - }, - "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" - }, - "isSiteAdmin": { - "type": "boolean" - }, - "moderatorIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "isImpersonator": { - "type": "boolean" - }, - "isCouponManager": { - "type": "boolean" - }, - "locale": { + "date": { "type": "string" }, - "digestEmailFrequency": { - "$ref": "#/components/schemas/DigestEmailFrequency" - }, - "notificationFrequency": { + "votes": { "type": "number", "format": "double" }, - "adminNotificationFrequency": { + "votesUp": { "type": "number", "format": "double" }, - "agentApprovalNotificationFrequency": { - "$ref": "#/components/schemas/AgentApprovalNotificationFrequency" + "votesDown": { + "type": "number", + "format": "double" }, - "lastTenantNotificationSentDate": { - "type": "string", - "format": "date-time" + "verified": { + "type": "boolean" }, - "lastReplyNotificationSentDate": { + "verifiedDate": { "type": "string", - "format": "date-time" + "nullable": true }, - "ignoredAddToMySiteMessages": { + "reviewed": { "type": "boolean" }, - "lastLoginDate": { + "avatarSrc": { "type": "string", - "format": "date-time" - }, - "displayLabel": { - "type": "string" + "nullable": true }, - "isProfileActivityPrivate": { + "isSpam": { "type": "boolean" }, - "isProfileCommentsPrivate": { + "aiDeterminedSpam": { "type": "boolean" }, - "isProfileDMDisabled": { + "hasImages": { "type": "boolean" }, - "profileCommentApprovalMode": { + "pageNumber": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, - "karma": { + "pageNumberOF": { "type": "number", - "format": "double" - }, - "passwordHash": { - "type": "string" + "format": "double", + "nullable": true }, - "averageTicketAckTimeMS": { + "pageNumberNF": { "type": "number", "format": "double", "nullable": true }, - "hasBlockedUsers": { + "approved": { "type": "boolean" }, - "bio": { - "type": "string" - }, - "headerBackgroundSrc": { - "type": "string" + "locale": { + "type": "string", + "nullable": true }, - "countryCode": { - "type": "string" + "mentions": { + "items": { + "$ref": "#/components/schemas/CommentUserMentionInfo" + }, + "type": "array" }, - "countryFlag": { - "type": "string" + "domain": { + "type": "string", + "nullable": true }, - "socialLinks": { + "moderationGroupIds": { "items": { "type": "string" }, "type": "array" - }, - "hasTwoFactor": { - "type": "boolean" - }, - "isEmailSuppressed": { - "type": "boolean" } }, "required": [ - "_id", - "username", - "email", - "signUpDate", - "createdFromTenantId", - "createdFromIpHashed", + "id", + "urlId", + "url", + "userId", + "commenterEmail", + "commenterName", + "comment", + "commentHTML", + "externalId", + "parentId", + "date", + "votes", + "votesUp", + "votesDown", "verified", - "loginId", - "loginIdDate" + "verifiedDate", + "reviewed", + "avatarSrc", + "isSpam", + "aiDeterminedSpam", + "hasImages", + "pageNumber", + "pageNumberOF", + "pageNumberNF", + "approved", + "locale", + "mentions", + "domain", + "moderationGroupIds" ], "type": "object", "additionalProperties": false }, - "GetUserResponse": { + "GetWebhookSamplePayloadsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "user": { - "$ref": "#/components/schemas/User" + "payloads": { + "items": { + "$ref": "#/components/schemas/WebhookComment" + }, + "type": "array" } }, "required": [ "status", - "user" + "payloads" ], "type": "object", "additionalProperties": false }, - "APIGetUserBadgeResponse": { + "CreateWebhookResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "userBadge": { - "$ref": "#/components/schemas/UserBadge" + "webhook": { + "$ref": "#/components/schemas/PublicWebhook" } }, "required": [ "status", - "userBadge" + "webhook" ], "type": "object", "additionalProperties": false }, - "APIGetUserBadgesResponse": { + "CreateWebhookParams": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "url": { + "type": "string", + "description": "Where events are delivered. Must be http(s)." }, - "userBadges": { - "items": { - "$ref": "#/components/schemas/UserBadge" - }, - "type": "array" - } - }, - "required": [ - "status", - "userBadges" - ], - "type": "object", - "additionalProperties": false - }, - "APICreateUserBadgeResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "event": { + "$ref": "#/components/schemas/WebhookEventName" }, - "userBadge": { - "$ref": "#/components/schemas/UserBadge" + "domain": { + "type": "string", + "description": "A domain from your account configuration, or '*' (the default) for every domain." }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" + "method": { + "$ref": "#/components/schemas/WebhookHTTPMethod", + "description": "Defaults to POST." } }, "required": [ - "status", - "userBadge" + "url", + "event" ], "type": "object", "additionalProperties": false }, - "CreateUserBadgeParams": { + "PublicVote": { "properties": { - "userId": { - "type": "string" - }, - "badgeId": { + "id": { "type": "string" }, - "displayedOnComments": { - "type": "boolean" - } - }, - "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" - } - }, - "type": "object", - "additionalProperties": false - }, - "UserBadgeProgress": { - "properties": { - "_id": { + "urlId": { "type": "string" }, - "tenantId": { + "commentId": { "type": "string" }, "userId": { "type": "string" }, - "firstCommentId": { + "direction": { "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_" - }, - "tosAcceptedAt": { + "createdAt": { "type": "string", "format": "date-time" } }, "required": [ - "_id", - "tenantId", + "id", + "urlId", + "commentId", "userId", - "firstCommentId", - "firstCommentDate", - "progress" + "direction", + "createdAt" ], "type": "object", "additionalProperties": false }, - "APIGetUserBadgeProgressResponse": { + "GetVotesResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "userBadgeProgress": { - "$ref": "#/components/schemas/UserBadgeProgress" + "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", - "userBadgeProgress" + "appliedAuthorizedVotes", + "appliedAnonymousVotes", + "pendingVotes" ], "type": "object", "additionalProperties": false }, - "APIGetUserBadgeProgressListResponse": { + "GetVotesForUserResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "userBadgeProgresses": { + "appliedAuthorizedVotes": { "items": { - "$ref": "#/components/schemas/UserBadgeProgress" + "$ref": "#/components/schemas/PublicVote" + }, + "type": "array" + }, + "appliedAnonymousVotes": { + "items": { + "$ref": "#/components/schemas/PublicVote" + }, + "type": "array" + }, + "pendingVotes": { + "items": { + "$ref": "#/components/schemas/PublicVote" }, "type": "array" } }, "required": [ "status", - "userBadgeProgresses" + "appliedAuthorizedVotes", + "appliedAnonymousVotes", + "pendingVotes" ], "type": "object", "additionalProperties": false }, - "APITicket": { + "DigestEmailFrequency": { + "enum": [ + -1, + 0, + 1, + 2 + ], + "type": "integer" + }, + "ImportedAgentApprovalNotificationFrequency": { + "enum": [ + -1, + 0, + 1, + 2 + ], + "type": "integer" + }, + "AgentApprovalNotificationFrequency": { + "$ref": "#/components/schemas/ImportedAgentApprovalNotificationFrequency" + }, + "User": { "properties": { "_id": { "type": "string" }, - "urlId": { + "tenantId": { + "type": "string", + "nullable": true + }, + "username": { "type": "string" }, - "userId": { + "displayName": { "type": "string" }, - "managedByTenantId": { + "websiteUrl": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + }, + "pendingEmail": { "type": "string" }, - "assignedUserIds": { - "items": { - "type": "string" - }, - "type": "array" + "backupEmail": { + "type": "string" }, - "subject": { + "pendingBackupEmail": { "type": "string" }, - "createdAt": { + "signUpDate": { + "type": "integer", + "format": "int64" + }, + "createdFromUrlId": { + "type": "string", + "nullable": true + }, + "createdFromTenantId": { + "type": "string", + "nullable": true + }, + "createdFromIpHashed": { "type": "string" }, - "state": { + "verified": { + "type": "boolean" + }, + "loginId": { + "type": "string" + }, + "loginIdDate": { "type": "integer", - "format": "int32" + "format": "int64" }, - "fileCount": { + "loginCount": { "type": "integer", "format": "int32" - } - }, - "required": [ - "_id", - "urlId", - "userId", - "managedByTenantId", - "assignedUserIds", - "subject", - "createdAt", - "state", - "fileCount" - ], - "type": "object", - "additionalProperties": false - }, - "GetTicketsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" }, - "tickets": { - "items": { - "$ref": "#/components/schemas/APITicket" - }, - "type": "array" - } - }, - "required": [ - "status", - "tickets" - ], - "type": "object", - "additionalProperties": false - }, - "CreateTicketResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "optedInNotifications": { + "type": "boolean" }, - "ticket": { - "$ref": "#/components/schemas/APITicket" - } - }, - "required": [ - "status", - "ticket" - ], - "type": "object", - "additionalProperties": false - }, - "CreateTicketBody": { - "properties": { - "subject": { - "type": "string" - } - }, - "required": [ - "subject" - ], - "type": "object", - "additionalProperties": false - }, - "APITicketFile": { - "properties": { - "id": { - "type": "string" + "optedInTenantNotifications": { + "type": "boolean" }, - "s3Key": { - "type": "string" + "hideAccountCode": { + "type": "boolean" }, - "originalFileName": { - "type": "string" + "avatarSrc": { + "type": "string", + "nullable": true }, - "sizeBytes": { - "type": "integer", - "format": "int32" + "isFastCommentsHelpRequestAdmin": { + "type": "boolean" }, - "contentType": { - "type": "string" + "isHelpRequestAdmin": { + "type": "boolean" }, - "uploadedByUserId": { - "type": "string" + "isAccountOwner": { + "type": "boolean" }, - "uploadedAt": { - "type": "string" + "isAdminAdmin": { + "type": "boolean" }, - "url": { - "type": "string" + "isBillingAdmin": { + "type": "boolean" }, - "expiresAt": { - "type": "string" + "isAnalyticsAdmin": { + "type": "boolean" }, - "expired": { + "isCustomizationAdmin": { "type": "boolean" - } - }, - "required": [ - "id", - "s3Key", - "originalFileName", - "sizeBytes", - "contentType", - "uploadedByUserId", - "uploadedAt", - "url", - "expiresAt" - ], - "type": "object", - "additionalProperties": false - }, - "APITicketDetail": { - "properties": { - "_id": { - "type": "string" }, - "urlId": { - "type": "string" + "isManageDataAdmin": { + "type": "boolean" }, - "userId": { - "type": "string" + "isCommentModeratorAdmin": { + "type": "boolean" }, - "managedByTenantId": { - "type": "string" + "isAPIAdmin": { + "type": "boolean" }, - "assignedUserIds": { + "isSiteAdmin": { + "type": "boolean" + }, + "moderatorIds": { "items": { "type": "string" }, "type": "array" }, - "subject": { - "type": "string" + "isImpersonator": { + "type": "boolean" }, - "createdAt": { + "isCouponManager": { + "type": "boolean" + }, + "locale": { "type": "string" }, - "state": { - "type": "integer", - "format": "int32" + "digestEmailFrequency": { + "$ref": "#/components/schemas/DigestEmailFrequency" }, - "fileCount": { - "type": "integer", - "format": "int32" + "notificationFrequency": { + "type": "number", + "format": "double" }, - "files": { - "items": { - "$ref": "#/components/schemas/APITicketFile" - }, - "type": "array" + "adminNotificationFrequency": { + "type": "number", + "format": "double" }, - "reopenedAt": { + "agentApprovalNotificationFrequency": { + "$ref": "#/components/schemas/AgentApprovalNotificationFrequency" + }, + "lastTenantNotificationSentDate": { "type": "string", - "nullable": true + "format": "date-time" }, - "resolvedAt": { + "lastReplyNotificationSentDate": { "type": "string", - "nullable": true + "format": "date-time" }, - "ackAt": { + "ignoredAddToMySiteMessages": { + "type": "boolean" + }, + "lastLoginDate": { "type": "string", + "format": "date-time" + }, + "displayLabel": { + "type": "string" + }, + "isProfileActivityPrivate": { + "type": "boolean" + }, + "isProfileCommentsPrivate": { + "type": "boolean" + }, + "isProfileDMDisabled": { + "type": "boolean" + }, + "profileCommentApprovalMode": { + "type": "number", + "format": "double" + }, + "karma": { + "type": "number", + "format": "double" + }, + "passwordHash": { + "type": "string" + }, + "averageTicketAckTimeMS": { + "type": "number", + "format": "double", "nullable": true + }, + "hasBlockedUsers": { + "type": "boolean" + }, + "bio": { + "type": "string" + }, + "headerBackgroundSrc": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "countryFlag": { + "type": "string" + }, + "socialLinks": { + "items": { + "type": "string" + }, + "type": "array" + }, + "hasTwoFactor": { + "type": "boolean" + }, + "isEmailSuppressed": { + "type": "boolean" } }, "required": [ "_id", - "urlId", - "userId", - "managedByTenantId", - "assignedUserIds", - "subject", - "createdAt", - "state", - "fileCount", - "files" + "username", + "email", + "signUpDate", + "createdFromTenantId", + "createdFromIpHashed", + "verified", + "loginId", + "loginIdDate" ], "type": "object", "additionalProperties": false }, - "GetTicketResponse": { + "GetUserResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "ticket": { - "$ref": "#/components/schemas/APITicketDetail" - }, - "availableStates": { - "items": { - "type": "number", - "format": "double" - }, - "type": "array" + "user": { + "$ref": "#/components/schemas/User" } }, "required": [ "status", - "ticket", - "availableStates" + "user" ], "type": "object", "additionalProperties": false }, - "ChangeTicketStateResponse": { + "APIGetUserBadgeResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "ticket": { - "$ref": "#/components/schemas/APITicket" + "userBadge": { + "$ref": "#/components/schemas/UserBadge" } }, "required": [ "status", - "ticket" + "userBadge" ], "type": "object", "additionalProperties": false }, - "ChangeTicketStateBody": { + "APIGetUserBadgesResponse": { "properties": { - "state": { - "type": "integer", - "format": "int32" + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "userBadges": { + "items": { + "$ref": "#/components/schemas/UserBadge" + }, + "type": "array" } }, "required": [ - "state" + "status", + "userBadges" ], "type": "object", "additionalProperties": false }, - "ImportedSiteType": { - "enum": [ - 0, - 1 + "APICreateUserBadgeResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "userBadge": { + "$ref": "#/components/schemas/UserBadge" + }, + "notes": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "status", + "userBadge" ], - "type": "integer" - }, - "SiteType": { - "$ref": "#/components/schemas/ImportedSiteType" + "type": "object", + "additionalProperties": false }, - "APIDomainConfiguration": { + "CreateUserBadgeParams": { "properties": { - "id": { - "type": "string" - }, - "domain": { + "userId": { "type": "string" }, - "emailFromName": { - "type": "string", - "nullable": true - }, - "emailFromEmail": { - "type": "string", - "nullable": true - }, - "emailHeaders": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "wpSyncToken": { - "type": "string", - "nullable": true - }, - "wpSynced": { - "type": "boolean" - }, - "wpURL": { - "type": "string", - "nullable": true - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "autoAddedDate": { - "type": "string", - "format": "date-time" - }, - "siteType": { - "$ref": "#/components/schemas/SiteType" - }, - "logoSrc": { - "type": "string", - "nullable": true - }, - "logoSrc100px": { - "type": "string", - "nullable": true - }, - "footerUnsubscribeURL": { + "badgeId": { "type": "string" }, - "disableUnsubscribeLinks": { + "displayedOnComments": { "type": "boolean" } }, "required": [ - "id", - "domain", - "createdAt" + "userId", + "badgeId" ], "type": "object", "additionalProperties": false }, - "BillingInfo": { + "APIEmptySuccessResponse": { "properties": { - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "state": { - "type": "string" - }, - "zip": { - "type": "string" - }, - "country": { - "type": "string" - }, - "currency": { - "type": "string", - "nullable": true, - "description": "Currency for invoices." - }, - "email": { - "type": "string", - "description": "Email for invoices." + "status": { + "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "name", - "address", - "city", - "state", - "zip", - "country" + "status" ], "type": "object", "additionalProperties": false }, - "APITenant": { + "UpdateUserBadgeParams": { "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "signUpDate": { - "type": "number", - "format": "double" - }, - "packageId": { - "type": "string" - }, - "paymentFrequency": { - "type": "number", - "format": "double" - }, - "billingInfoValid": { - "type": "boolean" - }, - "billingHandledExternally": { + "displayedOnComments": { "type": "boolean" - }, - "createdBy": { + } + }, + "type": "object", + "additionalProperties": false + }, + "UserBadgeProgress": { + "properties": { + "_id": { "type": "string" }, - "isSetup": { - "type": "boolean" - }, - "domainConfiguration": { - "items": { - "$ref": "#/components/schemas/APIDomainConfiguration" - }, - "type": "array" - }, - "billingInfo": { - "$ref": "#/components/schemas/BillingInfo" - }, - "stripeCustomerId": { + "tenantId": { "type": "string" }, - "stripeSubscriptionId": { + "userId": { "type": "string" }, - "stripePlanId": { + "firstCommentId": { "type": "string" }, - "enableProfanityFilter": { - "type": "boolean" - }, - "enableSpamFilter": { - "type": "boolean" - }, - "lastBillingIssueReminderDate": { + "firstCommentDate": { "type": "string", "format": "date-time" }, - "removeUnverifiedComments": { - "type": "boolean" - }, - "unverifiedCommentsTTLms": { - "type": "number", - "format": "double", - "nullable": true - }, - "commentsRequireApproval": { - "type": "boolean" - }, - "autoApproveCommentOnVerification": { - "type": "boolean" - }, - "sendProfaneToSpam": { - "type": "boolean" - }, - "hasFlexPricing": { - "type": "boolean" - }, - "hasAuditing": { - "type": "boolean" - }, - "flexLastBilledAmount": { + "autoTrustFactor": { "type": "number", "format": "double" }, - "deAnonIpAddr": { + "manualTrustFactor": { "type": "number", "format": "double" }, - "meta": { - "$ref": "#/components/schemas/Record_string.string_" + "progress": { + "$ref": "#/components/schemas/Record_string.number_" + }, + "tosAcceptedAt": { + "type": "string", + "format": "date-time" } }, "required": [ - "id", - "name", - "signUpDate", - "packageId", - "paymentFrequency", - "billingInfoValid", - "createdBy", - "isSetup", - "domainConfiguration", - "enableProfanityFilter", - "enableSpamFilter" + "_id", + "tenantId", + "userId", + "firstCommentId", + "firstCommentDate", + "progress" ], "type": "object", "additionalProperties": false }, - "GetTenantResponse": { + "APIGetUserBadgeProgressResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenant": { - "$ref": "#/components/schemas/APITenant" + "userBadgeProgress": { + "$ref": "#/components/schemas/UserBadgeProgress" } }, "required": [ "status", - "tenant" + "userBadgeProgress" ], "type": "object", "additionalProperties": false }, - "GetTenantsResponse": { + "APIGetUserBadgeProgressListResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenants": { + "userBadgeProgresses": { "items": { - "$ref": "#/components/schemas/APITenant" + "$ref": "#/components/schemas/UserBadgeProgress" }, "type": "array" } }, "required": [ "status", - "tenants" - ], - "type": "object", - "additionalProperties": false - }, - "CreateTenantResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "tenant": { - "$ref": "#/components/schemas/APITenant" - } - }, - "required": [ - "status", - "tenant" - ], - "type": "object", - "additionalProperties": false - }, - "CreateTenantBody": { - "properties": { - "name": { - "type": "string" - }, - "domainConfiguration": { - "items": { - "$ref": "#/components/schemas/APIDomainConfiguration" - }, - "type": "array" - }, - "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" - }, - "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_" - } - }, - "required": [ - "name", - "domainConfiguration" + "userBadgeProgresses" ], "type": "object", "additionalProperties": false }, - "UpdateTenantBody": { + "APITicket": { "properties": { - "name": { + "_id": { "type": "string" }, - "email": { + "urlId": { "type": "string" }, - "signUpDate": { - "type": "number", - "format": "double" - }, - "packageId": { + "userId": { "type": "string" }, - "paymentFrequency": { - "type": "number", - "format": "double" - }, - "billingInfoValid": { - "type": "boolean" - }, - "billingHandledExternally": { - "type": "boolean" - }, - "createdBy": { + "managedByTenantId": { "type": "string" }, - "isSetup": { - "type": "boolean" - }, - "domainConfiguration": { + "assignedUserIds": { "items": { - "$ref": "#/components/schemas/APIDomainConfiguration" + "type": "string" }, "type": "array" }, - "billingInfo": { - "$ref": "#/components/schemas/BillingInfo" - }, - "stripeCustomerId": { - "type": "string" - }, - "stripeSubscriptionId": { + "subject": { "type": "string" }, - "stripePlanId": { + "createdAt": { "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_" + "state": { + "type": "integer", + "format": "int32" }, - "managedByTenantId": { - "type": "string" + "fileCount": { + "type": "integer", + "format": "int32" } }, + "required": [ + "_id", + "urlId", + "userId", + "managedByTenantId", + "assignedUserIds", + "subject", + "createdAt", + "state", + "fileCount" + ], "type": "object", "additionalProperties": false }, - "GetTenantUserResponse": { + "GetTicketsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantUser": { - "$ref": "#/components/schemas/User" + "tickets": { + "items": { + "$ref": "#/components/schemas/APITicket" + }, + "type": "array" } }, "required": [ "status", - "tenantUser" + "tickets" ], "type": "object", "additionalProperties": false }, - "GetTenantUsersResponse": { + "CreateTicketResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantUsers": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array" + "ticket": { + "$ref": "#/components/schemas/APITicket" } }, "required": [ "status", - "tenantUsers" + "ticket" ], "type": "object", "additionalProperties": false }, - "CreateTenantUserResponse": { + "CreateTicketBody": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "tenantUser": { - "$ref": "#/components/schemas/User" + "subject": { + "type": "string" } }, "required": [ - "status", - "tenantUser" + "subject" ], "type": "object", "additionalProperties": false }, - "CreateTenantUserBody": { + "APITicketFile": { "properties": { - "username": { + "id": { "type": "string" }, - "email": { + "s3Key": { "type": "string" }, - "displayName": { + "originalFileName": { "type": "string" }, - "websiteUrl": { + "sizeBytes": { + "type": "integer", + "format": "int32" + }, + "contentType": { "type": "string" }, - "signUpDate": { - "type": "number", - "format": "double" + "uploadedByUserId": { + "type": "string" }, - "locale": { + "uploadedAt": { "type": "string" }, - "verified": { - "type": "boolean" + "url": { + "type": "string" }, - "loginCount": { - "type": "number", - "format": "double" + "expiresAt": { + "type": "string" }, - "optedInNotifications": { + "expired": { "type": "boolean" + } + }, + "required": [ + "id", + "s3Key", + "originalFileName", + "sizeBytes", + "contentType", + "uploadedByUserId", + "uploadedAt", + "url", + "expiresAt" + ], + "type": "object", + "additionalProperties": false + }, + "APITicketDetail": { + "properties": { + "_id": { + "type": "string" }, - "optedInTenantNotifications": { - "type": "boolean" + "urlId": { + "type": "string" }, - "hideAccountCode": { - "type": "boolean" + "userId": { + "type": "string" }, - "avatarSrc": { + "managedByTenantId": { "type": "string" }, - "isHelpRequestAdmin": { - "type": "boolean" + "assignedUserIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "isAccountOwner": { - "type": "boolean" + "subject": { + "type": "string" }, - "isAdminAdmin": { - "type": "boolean" + "createdAt": { + "type": "string" }, - "isBillingAdmin": { - "type": "boolean" + "state": { + "type": "integer", + "format": "int32" }, - "isAnalyticsAdmin": { - "type": "boolean" + "fileCount": { + "type": "integer", + "format": "int32" }, - "isCustomizationAdmin": { - "type": "boolean" + "files": { + "items": { + "$ref": "#/components/schemas/APITicketFile" + }, + "type": "array" }, - "isManageDataAdmin": { - "type": "boolean" + "reopenedAt": { + "type": "string", + "nullable": true }, - "isCommentModeratorAdmin": { - "type": "boolean" + "resolvedAt": { + "type": "string", + "nullable": true }, - "isAPIAdmin": { - "type": "boolean" + "ackAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "_id", + "urlId", + "userId", + "managedByTenantId", + "assignedUserIds", + "subject", + "createdAt", + "state", + "fileCount", + "files" + ], + "type": "object", + "additionalProperties": false + }, + "GetTicketResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "moderatorIds": { + "ticket": { + "$ref": "#/components/schemas/APITicketDetail" + }, + "availableStates": { "items": { - "type": "string" + "type": "number", + "format": "double" }, "type": "array" + } + }, + "required": [ + "status", + "ticket", + "availableStates" + ], + "type": "object", + "additionalProperties": false + }, + "ChangeTicketStateResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "digestEmailFrequency": { - "type": "number", - "format": "double" - }, - "displayLabel": { - "type": "string" + "ticket": { + "$ref": "#/components/schemas/APITicket" } }, "required": [ - "username", - "email" + "status", + "ticket" ], "type": "object", "additionalProperties": false }, - "ReplaceTenantUserBody": { + "ChangeTicketStateBody": { "properties": { - "username": { + "state": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "state" + ], + "type": "object", + "additionalProperties": false + }, + "ImportedSiteType": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer" + }, + "SiteType": { + "$ref": "#/components/schemas/ImportedSiteType" + }, + "APIDomainConfiguration": { + "properties": { + "id": { "type": "string" }, - "email": { + "domain": { "type": "string" }, - "displayName": { - "type": "string" + "emailFromName": { + "type": "string", + "nullable": true }, - "websiteUrl": { - "type": "string" + "emailFromEmail": { + "type": "string", + "nullable": true }, - "signUpDate": { - "type": "number", - "format": "double" + "emailHeaders": { + "$ref": "#/components/schemas/Record_string.string_" }, - "locale": { - "type": "string" + "wpSyncToken": { + "type": "string", + "nullable": true }, - "verified": { + "wpSynced": { "type": "boolean" }, - "loginCount": { - "type": "number", - "format": "double" + "wpURL": { + "type": "string", + "nullable": true }, - "optedInNotifications": { - "type": "boolean" + "createdAt": { + "type": "string", + "format": "date-time" }, - "optedInTenantNotifications": { - "type": "boolean" + "autoAddedDate": { + "type": "string", + "format": "date-time" }, - "hideAccountCode": { - "type": "boolean" + "siteType": { + "$ref": "#/components/schemas/SiteType" }, - "avatarSrc": { - "type": "string" + "logoSrc": { + "type": "string", + "nullable": true }, - "isHelpRequestAdmin": { - "type": "boolean" + "logoSrc100px": { + "type": "string", + "nullable": true }, - "isAccountOwner": { - "type": "boolean" + "footerUnsubscribeURL": { + "type": "string" }, - "isAdminAdmin": { + "disableUnsubscribeLinks": { "type": "boolean" + } + }, + "required": [ + "id", + "domain", + "createdAt" + ], + "type": "object", + "additionalProperties": false + }, + "BillingInfo": { + "properties": { + "name": { + "type": "string" }, - "isBillingAdmin": { - "type": "boolean" + "address": { + "type": "string" }, - "isAnalyticsAdmin": { - "type": "boolean" + "city": { + "type": "string" }, - "isCustomizationAdmin": { - "type": "boolean" + "state": { + "type": "string" }, - "isManageDataAdmin": { - "type": "boolean" - }, - "isCommentModeratorAdmin": { - "type": "boolean" - }, - "isAPIAdmin": { - "type": "boolean" - }, - "moderatorIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "digestEmailFrequency": { - "type": "number", - "format": "double" - }, - "displayLabel": { + "zip": { "type": "string" }, - "createdFromUrlId": { + "country": { "type": "string" }, - "createdFromTenantId": { - "type": "string" + "currency": { + "type": "string", + "nullable": true, + "description": "Currency for invoices." }, - "lastLoginDate": { - "type": "number", - "format": "double" + "email": { + "type": "string", + "description": "Email for invoices." }, - "karma": { - "type": "number", - "format": "double" + "vatId": { + "type": "string", + "nullable": true, + "description": "VAT / Tax ID for invoices. Only persisted once Stripe has accepted it." } }, "required": [ - "username", - "email" + "name", + "address", + "city", + "state", + "zip", + "country" ], "type": "object", "additionalProperties": false }, - "UpdateTenantUserBody": { + "APITenant": { "properties": { - "username": { - "type": "string" - }, - "displayName": { + "id": { "type": "string" }, - "websiteUrl": { + "name": { "type": "string" }, "email": { @@ -7158,762 +7388,683 @@ "type": "number", "format": "double" }, - "verified": { - "type": "boolean" + "packageId": { + "type": "string" }, - "loginCount": { + "paymentFrequency": { "type": "number", "format": "double" }, - "optedInNotifications": { + "billingInfoValid": { "type": "boolean" }, - "optedInTenantNotifications": { + "billingHandledExternally": { "type": "boolean" }, - "hideAccountCode": { + "createdBy": { + "type": "string" + }, + "isSetup": { "type": "boolean" }, - "avatarSrc": { + "domainConfiguration": { + "items": { + "$ref": "#/components/schemas/APIDomainConfiguration" + }, + "type": "array" + }, + "billingInfo": { + "$ref": "#/components/schemas/BillingInfo" + }, + "stripeCustomerId": { "type": "string" }, - "isHelpRequestAdmin": { - "type": "boolean" + "stripeSubscriptionId": { + "type": "string" }, - "isAccountOwner": { + "stripePlanId": { + "type": "string" + }, + "enableProfanityFilter": { "type": "boolean" }, - "isAdminAdmin": { + "enableSpamFilter": { "type": "boolean" }, - "isBillingAdmin": { + "lastBillingIssueReminderDate": { + "type": "string", + "format": "date-time" + }, + "removeUnverifiedComments": { "type": "boolean" }, - "isAnalyticsAdmin": { + "unverifiedCommentsTTLms": { + "type": "number", + "format": "double", + "nullable": true + }, + "commentsRequireApproval": { "type": "boolean" }, - "isCustomizationAdmin": { + "autoApproveCommentOnVerification": { "type": "boolean" }, - "isManageDataAdmin": { + "sendProfaneToSpam": { "type": "boolean" }, - "isCommentModeratorAdmin": { + "hasFlexPricing": { "type": "boolean" }, - "isAPIAdmin": { + "hasAuditing": { "type": "boolean" }, - "moderatorIds": { - "items": { - "type": "string" - }, - "type": "array" + "hasDebranding": { + "type": "boolean" }, - "locale": { - "type": "string" + "flexLastBilledAmount": { + "type": "number", + "format": "double" }, - "digestEmailFrequency": { + "deAnonIpAddr": { "type": "number", "format": "double" }, - "displayLabel": { - "type": "string" + "meta": { + "$ref": "#/components/schemas/Record_string.string_" } }, + "required": [ + "id", + "name", + "signUpDate", + "packageId", + "paymentFrequency", + "billingInfoValid", + "createdBy", + "isSetup", + "domainConfiguration", + "enableProfanityFilter", + "enableSpamFilter" + ], "type": "object", "additionalProperties": false }, - "TenantPackage": { + "GetTenantResponse": { "properties": { - "_id": { - "type": "string" - }, - "name": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "tenantId": { - "type": "string" + "tenant": { + "$ref": "#/components/schemas/APITenant" + } + }, + "required": [ + "status", + "tenant" + ], + "type": "object", + "additionalProperties": false + }, + "GetTenantsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "createdAt": { - "type": "string", - "format": "date-time" + "tenants": { + "items": { + "$ref": "#/components/schemas/APITenant" + }, + "type": "array" + } + }, + "required": [ + "status", + "tenants" + ], + "type": "object", + "additionalProperties": false + }, + "CreateTenantResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "templateId": { + "tenant": { + "$ref": "#/components/schemas/APITenant" + } + }, + "required": [ + "status", + "tenant" + ], + "type": "object", + "additionalProperties": false + }, + "CreateTenantBody": { + "properties": { + "name": { "type": "string" }, - "monthlyCostUSD": { - "type": "number", - "format": "double", - "nullable": true - }, - "yearlyCostUSD": { - "type": "number", - "format": "double", - "nullable": true - }, - "monthlyStripePlanId": { - "type": "string", - "nullable": true + "domainConfiguration": { + "items": { + "$ref": "#/components/schemas/APIDomainConfiguration" + }, + "type": "array" }, - "yearlyStripePlanId": { - "type": "string", - "nullable": true + "email": { + "type": "string" }, - "maxMonthlyPageLoads": { + "signUpDate": { "type": "number", "format": "double" }, - "maxMonthlyAPICredits": { - "type": "number", - "format": "double" + "packageId": { + "type": "string" }, - "maxMonthlySmallWidgetsCredits": { + "paymentFrequency": { "type": "number", "format": "double" }, - "maxMonthlyComments": { - "type": "number", - "format": "double" + "billingInfoValid": { + "type": "boolean" }, - "maxConcurrentUsers": { - "type": "number", - "format": "double" + "billingHandledExternally": { + "type": "boolean" }, - "maxTenantUsers": { - "type": "number", - "format": "double" + "isSetup": { + "type": "boolean" }, - "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" + "billingInfo": { + "$ref": "#/components/schemas/BillingInfo" }, - "forWhoText": { + "stripeCustomerId": { "type": "string" }, - "featureTaglines": { - "items": { - "type": "string" - }, - "type": "array" + "stripeSubscriptionId": { + "type": "string" }, - "hasAuditing": { - "type": "boolean" + "stripePlanId": { + "type": "string" }, - "hasFlexPricing": { + "enableProfanityFilter": { "type": "boolean" }, - "enableSAML": { + "enableSpamFilter": { "type": "boolean" }, - "enableCanvasLTI": { + "removeUnverifiedComments": { "type": "boolean" }, - "flexPageLoadCostCents": { - "type": "number", - "format": "double" - }, - "flexPageLoadUnit": { - "type": "number", - "format": "double" - }, - "flexCommentCostCents": { - "type": "number", - "format": "double" - }, - "flexCommentUnit": { + "unverifiedCommentsTTLms": { "type": "number", "format": "double" }, - "flexSSOUserCostCents": { - "type": "number", - "format": "double" + "commentsRequireApproval": { + "type": "boolean" }, - "flexSSOUserUnit": { - "type": "number", - "format": "double" + "autoApproveCommentOnVerification": { + "type": "boolean" }, - "flexAPICreditCostCents": { - "type": "number", - "format": "double" + "sendProfaneToSpam": { + "type": "boolean" }, - "flexAPICreditUnit": { + "deAnonIpAddr": { "type": "number", "format": "double" }, - "flexSmallWidgetsCreditCostCents": { - "type": "number", - "format": "double" + "meta": { + "$ref": "#/components/schemas/Record_string.string_" + } + }, + "required": [ + "name", + "domainConfiguration" + ], + "type": "object", + "additionalProperties": false + }, + "UpdateTenantBody": { + "properties": { + "name": { + "type": "string" }, - "flexSmallWidgetsCreditUnit": { - "type": "number", - "format": "double" + "email": { + "type": "string" }, - "flexModeratorCostCents": { + "signUpDate": { "type": "number", "format": "double" }, - "flexModeratorUnit": { - "type": "number", - "format": "double" + "packageId": { + "type": "string" }, - "flexAdminCostCents": { + "paymentFrequency": { "type": "number", "format": "double" }, - "flexAdminUnit": { - "type": "number", - "format": "double" + "billingInfoValid": { + "type": "boolean" }, - "flexDomainCostCents": { - "type": "number", - "format": "double" + "billingHandledExternally": { + "type": "boolean" }, - "flexDomainUnit": { - "type": "number", - "format": "double" + "isSetup": { + "type": "boolean" }, - "flexChatGPTCostCents": { - "type": "number", - "format": "double" + "domainConfiguration": { + "items": { + "$ref": "#/components/schemas/APIDomainConfiguration" + }, + "type": "array" }, - "flexChatGPTUnit": { - "type": "number", - "format": "double" + "billingInfo": { + "$ref": "#/components/schemas/BillingInfo" }, - "flexLLMCostCents": { - "type": "number", - "format": "double" + "stripeCustomerId": { + "type": "string" }, - "flexLLMUnit": { - "type": "number", - "format": "double" + "stripeSubscriptionId": { + "type": "string" }, - "flexMinimumCostCents": { - "type": "number", - "format": "double" + "stripePlanId": { + "type": "string" }, - "flexManagedTenantCostCents": { - "type": "number", - "format": "double" + "enableProfanityFilter": { + "type": "boolean" }, - "flexSSOAdminCostCents": { - "type": "number", - "format": "double" + "enableSpamFilter": { + "type": "boolean" }, - "flexSSOAdminUnit": { - "type": "number", - "format": "double" + "removeUnverifiedComments": { + "type": "boolean" }, - "flexSSOModeratorCostCents": { + "unverifiedCommentsTTLms": { "type": "number", "format": "double" }, - "flexSSOModeratorUnit": { - "type": "number", - "format": "double" + "commentsRequireApproval": { + "type": "boolean" }, - "isSSOBillingMonthlyActiveUsers": { + "autoApproveCommentOnVerification": { "type": "boolean" }, - "hasAIAgents": { + "sendProfaneToSpam": { "type": "boolean" }, - "maxAIAgents": { + "deAnonIpAddr": { "type": "number", "format": "double" }, - "aiAgentDailyBudgetCents": { - "type": "number", - "format": "double" + "meta": { + "$ref": "#/components/schemas/Record_string.string_" }, - "aiAgentMonthlyBudgetCents": { - "type": "number", - "format": "double" + "managedByTenantId": { + "type": "string" } }, - "required": [ - "_id", - "name", - "tenantId", - "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 }, - "GetTenantPackageResponse": { + "GetTenantUserResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantPackage": { - "$ref": "#/components/schemas/TenantPackage" + "tenantUser": { + "$ref": "#/components/schemas/User" } }, "required": [ "status", - "tenantPackage" + "tenantUser" ], "type": "object", "additionalProperties": false }, - "GetTenantPackagesResponse": { + "GetTenantUsersResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantPackages": { + "tenantUsers": { "items": { - "$ref": "#/components/schemas/TenantPackage" + "$ref": "#/components/schemas/User" }, "type": "array" } }, "required": [ "status", - "tenantPackages" + "tenantUsers" ], "type": "object", "additionalProperties": false }, - "CreateTenantPackageResponse": { + "CreateTenantUserResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantPackage": { - "$ref": "#/components/schemas/TenantPackage" + "tenantUser": { + "$ref": "#/components/schemas/User" } }, "required": [ "status", - "tenantPackage" + "tenantUser" ], "type": "object", "additionalProperties": false }, - "CreateTenantPackageBody": { + "CreateTenantUserBody": { "properties": { - "name": { + "username": { "type": "string" }, - "monthlyCostUSD": { - "type": "number", - "format": "double", - "nullable": true - }, - "yearlyCostUSD": { - "type": "number", - "format": "double", - "nullable": true + "email": { + "type": "string" }, - "monthlyStripePlanId": { - "type": "string", - "nullable": true + "displayName": { + "type": "string" }, - "yearlyStripePlanId": { - "type": "string", - "nullable": true + "websiteUrl": { + "type": "string" }, - "maxMonthlyPageLoads": { + "signUpDate": { "type": "number", "format": "double" }, - "maxMonthlyAPICredits": { - "type": "number", - "format": "double" + "locale": { + "type": "string" }, - "maxMonthlySmallWidgetsCredits": { - "type": "number", - "format": "double" + "verified": { + "type": "boolean" }, - "maxMonthlyComments": { + "loginCount": { "type": "number", "format": "double" }, - "maxConcurrentUsers": { - "type": "number", - "format": "double" + "optedInNotifications": { + "type": "boolean" }, - "maxTenantUsers": { - "type": "number", - "format": "double" + "optedInTenantNotifications": { + "type": "boolean" }, - "maxSSOUsers": { - "type": "number", - "format": "double" + "hideAccountCode": { + "type": "boolean" }, - "maxModerators": { - "type": "number", - "format": "double" + "avatarSrc": { + "type": "string" }, - "maxDomains": { - "type": "number", - "format": "double" + "isHelpRequestAdmin": { + "type": "boolean" }, - "maxWhiteLabeledTenants": { - "type": "number", - "format": "double" + "isAccountOwner": { + "type": "boolean" }, - "maxMonthlyEventLogRequests": { - "type": "number", - "format": "double" + "isAdminAdmin": { + "type": "boolean" }, - "maxCustomCollectionSize": { - "type": "number", - "format": "double" + "isBillingAdmin": { + "type": "boolean" }, - "hasWhiteLabeling": { + "isAnalyticsAdmin": { "type": "boolean" }, - "hasDebranding": { + "isCustomizationAdmin": { "type": "boolean" }, - "hasLLMSpamDetection": { + "isManageDataAdmin": { "type": "boolean" }, - "forWhoText": { - "type": "string" + "isCommentModeratorAdmin": { + "type": "boolean" }, - "featureTaglines": { + "isAPIAdmin": { + "type": "boolean" + }, + "moderatorIds": { "items": { "type": "string" }, "type": "array" }, - "hasAuditing": { - "type": "boolean" + "digestEmailFrequency": { + "type": "number", + "format": "double" }, - "hasFlexPricing": { - "type": "boolean" + "displayLabel": { + "type": "string" + } + }, + "required": [ + "username", + "email" + ], + "type": "object", + "additionalProperties": false + }, + "ReplaceTenantUserBody": { + "properties": { + "username": { + "type": "string" }, - "enableSAML": { - "type": "boolean" + "email": { + "type": "string" }, - "flexPageLoadCostCents": { - "type": "number", - "format": "double" + "displayName": { + "type": "string" }, - "flexPageLoadUnit": { - "type": "number", - "format": "double" + "websiteUrl": { + "type": "string" }, - "flexCommentCostCents": { + "signUpDate": { "type": "number", "format": "double" }, - "flexCommentUnit": { - "type": "number", - "format": "double" + "locale": { + "type": "string" }, - "flexSSOUserCostCents": { - "type": "number", - "format": "double" + "verified": { + "type": "boolean" }, - "flexSSOUserUnit": { + "loginCount": { "type": "number", "format": "double" }, - "flexAPICreditCostCents": { - "type": "number", - "format": "double" + "optedInNotifications": { + "type": "boolean" }, - "flexAPICreditUnit": { - "type": "number", - "format": "double" + "optedInTenantNotifications": { + "type": "boolean" }, - "flexSmallWidgetsCreditCostCents": { - "type": "number", - "format": "double" + "hideAccountCode": { + "type": "boolean" }, - "flexSmallWidgetsCreditUnit": { - "type": "number", - "format": "double" + "avatarSrc": { + "type": "string" }, - "flexModeratorCostCents": { - "type": "number", - "format": "double" + "isHelpRequestAdmin": { + "type": "boolean" }, - "flexModeratorUnit": { - "type": "number", - "format": "double" + "isAccountOwner": { + "type": "boolean" }, - "flexAdminCostCents": { - "type": "number", - "format": "double" + "isAdminAdmin": { + "type": "boolean" }, - "flexAdminUnit": { - "type": "number", - "format": "double" + "isBillingAdmin": { + "type": "boolean" }, - "flexDomainCostCents": { - "type": "number", - "format": "double" + "isAnalyticsAdmin": { + "type": "boolean" }, - "flexDomainUnit": { - "type": "number", - "format": "double" + "isCustomizationAdmin": { + "type": "boolean" }, - "flexLLMCostCents": { - "type": "number", - "format": "double" + "isManageDataAdmin": { + "type": "boolean" }, - "flexLLMUnit": { - "type": "number", - "format": "double" + "isCommentModeratorAdmin": { + "type": "boolean" }, - "flexMinimumCostCents": { - "type": "number", - "format": "double" + "isAPIAdmin": { + "type": "boolean" }, - "flexManagedTenantCostCents": { - "type": "number", - "format": "double" + "moderatorIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "flexSSOAdminCostCents": { + "digestEmailFrequency": { "type": "number", "format": "double" }, - "flexSSOAdminUnit": { - "type": "number", - "format": "double" + "displayLabel": { + "type": "string" }, - "flexSSOModeratorCostCents": { + "createdFromUrlId": { + "type": "string" + }, + "createdFromTenantId": { + "type": "string" + }, + "lastLoginDate": { "type": "number", "format": "double" }, - "flexSSOModeratorUnit": { + "karma": { "type": "number", "format": "double" } }, "required": [ - "name", - "maxMonthlyPageLoads", - "maxMonthlyAPICredits", - "maxMonthlyComments", - "maxConcurrentUsers", - "maxTenantUsers", - "maxSSOUsers", - "maxModerators", - "maxDomains", - "hasDebranding", - "forWhoText", - "featureTaglines", - "hasFlexPricing" + "username", + "email" ], "type": "object", "additionalProperties": false }, - "ReplaceTenantPackageBody": { + "UpdateTenantUserBody": { "properties": { - "name": { + "username": { "type": "string" }, - "monthlyCostUSD": { - "type": "number", - "format": "double" + "displayName": { + "type": "string" }, - "yearlyCostUSD": { - "type": "number", - "format": "double" + "websiteUrl": { + "type": "string" }, - "maxMonthlyPageLoads": { - "type": "number", - "format": "double" - }, - "maxMonthlyAPICredits": { - "type": "number", - "format": "double" - }, - "maxMonthlyComments": { - "type": "number", - "format": "double" - }, - "maxConcurrentUsers": { - "type": "number", - "format": "double" + "email": { + "type": "string" }, - "maxTenantUsers": { + "signUpDate": { "type": "number", "format": "double" }, - "maxSSOUsers": { - "type": "number", - "format": "double" + "verified": { + "type": "boolean" }, - "maxModerators": { + "loginCount": { "type": "number", "format": "double" }, - "maxDomains": { - "type": "number", - "format": "double" + "optedInNotifications": { + "type": "boolean" }, - "maxCustomCollectionSize": { - "type": "number", - "format": "double" + "optedInTenantNotifications": { + "type": "boolean" }, - "hasDebranding": { + "hideAccountCode": { "type": "boolean" }, - "forWhoText": { + "avatarSrc": { "type": "string" }, - "featureTaglines": { - "items": { - "type": "string" - }, - "type": "array" - }, - "hasFlexPricing": { + "isHelpRequestAdmin": { "type": "boolean" }, - "flexPageLoadCostCents": { - "type": "number", - "format": "double" - }, - "flexPageLoadUnit": { - "type": "number", - "format": "double" - }, - "flexCommentCostCents": { - "type": "number", - "format": "double" - }, - "flexCommentUnit": { - "type": "number", - "format": "double" + "isAccountOwner": { + "type": "boolean" }, - "flexSSOUserCostCents": { - "type": "number", - "format": "double" + "isAdminAdmin": { + "type": "boolean" }, - "flexSSOUserUnit": { - "type": "number", - "format": "double" + "isBillingAdmin": { + "type": "boolean" }, - "flexAPICreditCostCents": { - "type": "number", - "format": "double" + "isAnalyticsAdmin": { + "type": "boolean" }, - "flexAPICreditUnit": { - "type": "number", - "format": "double" + "isCustomizationAdmin": { + "type": "boolean" }, - "flexModeratorCostCents": { - "type": "number", - "format": "double" + "isManageDataAdmin": { + "type": "boolean" }, - "flexModeratorUnit": { - "type": "number", - "format": "double" + "isCommentModeratorAdmin": { + "type": "boolean" }, - "flexAdminCostCents": { - "type": "number", - "format": "double" + "isAPIAdmin": { + "type": "boolean" }, - "flexAdminUnit": { - "type": "number", - "format": "double" + "moderatorIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "flexDomainCostCents": { - "type": "number", - "format": "double" + "locale": { + "type": "string" }, - "flexDomainUnit": { + "digestEmailFrequency": { "type": "number", "format": "double" }, - "flexMinimumCostCents": { - "type": "number", - "format": "double" + "displayLabel": { + "type": "string" } }, - "required": [ - "name", - "monthlyCostUSD", - "yearlyCostUSD", - "maxMonthlyPageLoads", - "maxMonthlyAPICredits", - "maxMonthlyComments", - "maxConcurrentUsers", - "maxTenantUsers", - "maxSSOUsers", - "maxModerators", - "maxDomains", - "hasDebranding", - "forWhoText", - "featureTaglines", - "hasFlexPricing" - ], "type": "object", "additionalProperties": false }, - "UpdateTenantPackageBody": { + "TenantPackage": { "properties": { + "_id": { + "type": "string" + }, "name": { "type": "string" }, + "tenantId": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "templateId": { + "type": "string" + }, "monthlyCostUSD": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yearlyCostUSD": { "type": "number", - "format": "double" + "format": "double", + "nullable": true + }, + "monthlyStripePlanId": { + "type": "string", + "nullable": true + }, + "yearlyStripePlanId": { + "type": "string", + "nullable": true }, "maxMonthlyPageLoads": { "type": "number", @@ -7923,6 +8074,10 @@ "type": "number", "format": "double" }, + "maxMonthlySmallWidgetsCredits": { + "type": "number", + "format": "double" + }, "maxMonthlyComments": { "type": "number", "format": "double" @@ -7947,14 +8102,25 @@ "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" }, - "hasWhiteLabeling": { + "hasLLMSpamDetection": { "type": "boolean" }, "forWhoText": { @@ -7966,9 +8132,18 @@ }, "type": "array" }, + "hasAuditing": { + "type": "boolean" + }, "hasFlexPricing": { "type": "boolean" }, + "enableSAML": { + "type": "boolean" + }, + "enableCanvasLTI": { + "type": "boolean" + }, "flexPageLoadCostCents": { "type": "number", "format": "double" @@ -8001,6 +8176,14 @@ "type": "number", "format": "double" }, + "flexSmallWidgetsCreditCostCents": { + "type": "number", + "format": "double" + }, + "flexSmallWidgetsCreditUnit": { + "type": "number", + "format": "double" + }, "flexModeratorCostCents": { "type": "number", "format": "double" @@ -8025,1070 +8208,827 @@ "type": "number", "format": "double" }, - "flexMinimumCostCents": { + "flexChatGPTCostCents": { "type": "number", "format": "double" - } - }, - "type": "object", - "additionalProperties": false - }, - "APITenantDailyUsage": { - "properties": { - "id": { - "type": "string" - }, - "tenantId": { - "type": "string" }, - "yearNumber": { + "flexChatGPTUnit": { "type": "number", "format": "double" }, - "monthNumber": { + "flexLLMCostCents": { "type": "number", "format": "double" }, - "dayNumber": { + "flexLLMUnit": { "type": "number", "format": "double" }, - "commentFetchCount": { + "flexMinimumCostCents": { "type": "number", "format": "double" }, - "commentCreateCount": { + "flexManagedTenantCostCents": { "type": "number", "format": "double" }, - "conversationCreateCount": { + "flexSSOAdminCostCents": { "type": "number", "format": "double" }, - "voteCount": { + "flexSSOAdminUnit": { "type": "number", "format": "double" }, - "accountCreatedCount": { + "flexSSOModeratorCostCents": { "type": "number", "format": "double" }, - "userMentionSearch": { + "flexSSOModeratorUnit": { "type": "number", "format": "double" }, - "hashTagSearch": { + "flexFreeModerators": { "type": "number", "format": "double" }, - "gifSearchTrending": { + "isSSOBillingMonthlyActiveUsers": { + "type": "boolean" + }, + "hasAIAgents": { + "type": "boolean" + }, + "maxAIAgents": { "type": "number", "format": "double" }, - "gifSearch": { + "aiAgentDailyBudgetCents": { "type": "number", "format": "double" }, - "apiCreditsUsed": { + "aiAgentMonthlyBudgetCents": { "type": "number", "format": "double" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "billed": { - "type": "boolean" - }, - "ignored": { - "type": "boolean" - }, - "apiErrorCount": { - "type": "number", - "format": "double" - } - }, - "required": [ - "id", - "tenantId", - "yearNumber", - "monthNumber", - "dayNumber", - "commentFetchCount", - "commentCreateCount", - "conversationCreateCount", - "voteCount", - "accountCreatedCount", - "userMentionSearch", - "hashTagSearch", - "gifSearchTrending", - "gifSearch", - "apiCreditsUsed", - "createdAt", - "billed", - "ignored", - "apiErrorCount" - ], - "type": "object", - "additionalProperties": false - }, - "GetTenantDailyUsagesResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "tenantDailyUsages": { - "items": { - "$ref": "#/components/schemas/APITenantDailyUsage" - }, - "type": "array" - } - }, - "required": [ - "status", - "tenantDailyUsages" - ], - "type": "object", - "additionalProperties": false - }, - "MetaItem": { - "properties": { - "name": { - "type": "string" - }, - "values": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "name", - "values" - ], - "type": "object", - "additionalProperties": false - }, - "QuestionResult": { - "properties": { - "_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": [ "_id", + "name", "tenantId", - "urlId", - "anonUserId", - "userId", "createdAt", - "value", - "questionId", - "ipHash" + "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 }, - "GetQuestionResultResponse": { + "GetTenantPackageResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "questionResult": { - "$ref": "#/components/schemas/QuestionResult" + "tenantPackage": { + "$ref": "#/components/schemas/TenantPackage" } }, "required": [ "status", - "questionResult" + "tenantPackage" ], "type": "object", "additionalProperties": false }, - "GetQuestionResultsResponse": { + "GetTenantPackagesResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "questionResults": { + "tenantPackages": { "items": { - "$ref": "#/components/schemas/QuestionResult" + "$ref": "#/components/schemas/TenantPackage" }, "type": "array" } }, "required": [ "status", - "questionResults" + "tenantPackages" ], "type": "object", "additionalProperties": false }, - "CreateQuestionResultResponse": { + "CreateTenantPackageResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "questionResult": { - "$ref": "#/components/schemas/QuestionResult" + "tenantPackage": { + "$ref": "#/components/schemas/TenantPackage" } }, "required": [ "status", - "questionResult" + "tenantPackage" ], "type": "object", "additionalProperties": false }, - "CreateQuestionResultBody": { + "CreateTenantPackageBody": { "properties": { - "urlId": { + "name": { "type": "string" }, - "value": { + "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" }, - "questionId": { - "type": "string" + "maxMonthlyAPICredits": { + "type": "number", + "format": "double" }, - "anonUserId": { - "type": "string" + "maxMonthlySmallWidgetsCredits": { + "type": "number", + "format": "double" }, - "userId": { - "type": "string" + "maxMonthlyComments": { + "type": "number", + "format": "double" }, - "commentId": { - "type": "string" + "maxConcurrentUsers": { + "type": "number", + "format": "double" }, - "meta": { - "items": { - "$ref": "#/components/schemas/MetaItem" - }, - "type": "array", - "nullable": true - } - }, - "required": [ - "urlId", - "value", - "questionId" - ], - "type": "object", - "additionalProperties": {} - }, - "UpdateQuestionResultBody": { - "properties": { - "urlId": { - "type": "string" + "maxTenantUsers": { + "type": "number", + "format": "double" }, - "anonUserId": { - "type": "string" + "maxSSOUsers": { + "type": "number", + "format": "double" }, - "userId": { - "type": "string" + "maxModerators": { + "type": "number", + "format": "double" }, - "value": { + "maxDomains": { "type": "number", "format": "double" }, - "commentId": { - "type": "string" + "maxWhiteLabeledTenants": { + "type": "number", + "format": "double" }, - "questionId": { - "type": "string" + "maxMonthlyEventLogRequests": { + "type": "number", + "format": "double" }, - "meta": { - "items": { - "$ref": "#/components/schemas/MetaItem" - }, - "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": [ - "v", - "total" - ], - "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": { - "properties": { - "dataByDateBucket": { - "$ref": "#/components/schemas/Record_string.QuestionDatum_" - }, - "dataByUrlId": { - "$ref": "#/components/schemas/Record_string.QuestionDatum_" - }, - "countsByValue": { - "$ref": "#/components/schemas/Int32Map" - }, - "total": { - "type": "integer", - "format": "int64" - }, - "average": { + "maxCustomCollectionSize": { "type": "number", "format": "double" }, - "createdAt": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "total", - "createdAt" - ], - "type": "object", - "additionalProperties": false - }, - "AggregateQuestionResultsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "hasWhiteLabeling": { + "type": "boolean" }, - "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" + "hasDebranding": { + "type": "boolean" }, - "data": { - "$ref": "#/components/schemas/Record_string.QuestionResultAggregationOverall_" - } - }, - "required": [ - "status", - "data" - ], - "type": "object", - "additionalProperties": false - }, - "BulkAggregateQuestionItem": { - "properties": { - "aggId": { - "type": "string" + "hasLLMSpamDetection": { + "type": "boolean" }, - "questionId": { + "forWhoText": { "type": "string" }, - "questionIds": { + "featureTaglines": { "items": { "type": "string" }, "type": "array" }, - "urlId": { - "type": "string" + "hasAuditing": { + "type": "boolean" }, - "timeBucket": { - "$ref": "#/components/schemas/AggregateTimeBucket" + "hasFlexPricing": { + "type": "boolean" }, - "startDate": { - "type": "string", - "format": "date-time" + "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" + }, + "flexLLMCostCents": { + "type": "number", + "format": "double" + }, + "flexLLMUnit": { + "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" } }, "required": [ - "aggId" + "name", + "maxMonthlyPageLoads", + "maxMonthlyAPICredits", + "maxMonthlyComments", + "maxConcurrentUsers", + "maxTenantUsers", + "maxSSOUsers", + "maxModerators", + "maxDomains", + "hasDebranding", + "forWhoText", + "featureTaglines", + "hasFlexPricing" ], "type": "object", "additionalProperties": false }, - "BulkAggregateQuestionResultsRequest": { + "ReplaceTenantPackageBody": { "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": { - "type": "string" - }, - "badWord": { - "type": "string" - }, - "word": { - "type": "string" - }, - "locale": { - "type": "string" - }, - "tenantBadgeId": { - "type": "string" - }, - "badgeId": { - "type": "string" - }, - "wasLoggedIn": { - "type": "boolean" - }, - "foundUser": { - "type": "boolean" - }, - "verified": { - "type": "boolean" - }, - "engine": { - "type": "string" - }, - "engineResponse": { + "name": { "type": "string" }, - "engineTokens": { + "monthlyCostUSD": { "type": "number", "format": "double" }, - "trustFactor": { + "yearlyCostUSD": { "type": "number", "format": "double" }, - "source": { - "type": "string" - }, - "rule": { - "$ref": "#/components/schemas/SpamRule" - }, - "userId": { - "type": "string" - }, - "subscribers": { + "maxMonthlyPageLoads": { "type": "number", "format": "double" }, - "notificationCount": { + "maxMonthlyAPICredits": { "type": "number", "format": "double" }, - "votesBefore": { + "maxMonthlyComments": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "votesUpBefore": { + "maxConcurrentUsers": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "votesDownBefore": { + "maxTenantUsers": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "votesAfter": { + "maxSSOUsers": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "votesUpAfter": { + "maxModerators": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "votesDownAfter": { + "maxDomains": { "type": "number", - "format": "double", - "nullable": true - }, - "repeatAction": { - "$ref": "#/components/schemas/RepeatCommentHandlingAction" + "format": "double" }, - "reason": { - "$ref": "#/components/schemas/RepeatCommentCheckIgnoredReason" + "maxCustomCollectionSize": { + "type": "number", + "format": "double" }, - "otherData": {}, - "spamBefore": { + "hasDebranding": { "type": "boolean" }, - "spamAfter": { - "type": "boolean" + "forWhoText": { + "type": "string" }, - "permanentFlag": { - "type": "string", - "enum": [ - "permanent" - ], - "nullable": false + "featureTaglines": { + "items": { + "type": "string" + }, + "type": "array" }, - "approvedBefore": { + "hasFlexPricing": { "type": "boolean" }, - "approvedAfter": { - "type": "boolean" + "flexPageLoadCostCents": { + "type": "number", + "format": "double" }, - "reviewedBefore": { - "type": "boolean" + "flexPageLoadUnit": { + "type": "number", + "format": "double" }, - "reviewedAfter": { - "type": "boolean" + "flexCommentCostCents": { + "type": "number", + "format": "double" }, - "textBefore": { - "type": "string" + "flexCommentUnit": { + "type": "number", + "format": "double" }, - "textAfter": { - "type": "string" + "flexSSOUserCostCents": { + "type": "number", + "format": "double" }, - "expireBefore": { - "type": "string", - "format": "date-time", - "nullable": true + "flexSSOUserUnit": { + "type": "number", + "format": "double" }, - "expireAfter": { - "type": "string", - "format": "date-time", - "nullable": true + "flexAPICreditCostCents": { + "type": "number", + "format": "double" }, - "flagCountBefore": { + "flexAPICreditUnit": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "trustFactorBefore": { + "flexModeratorCostCents": { "type": "number", "format": "double" }, - "trustFactorAfter": { + "flexModeratorUnit": { "type": "number", "format": "double" }, - "referencedCommentId": { - "type": "string" - }, - "invalidLocale": { - "type": "string" + "flexAdminCostCents": { + "type": "number", + "format": "double" }, - "detectedLocale": { - "type": "string" + "flexAdminUnit": { + "type": "number", + "format": "double" }, - "detectedLanguage": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "CommentLogEntry": { - "properties": { - "d": { - "type": "string", - "format": "date-time" + "flexDomainCostCents": { + "type": "number", + "format": "double" }, - "t": { - "$ref": "#/components/schemas/CommentLogType" + "flexDomainUnit": { + "type": "number", + "format": "double" }, - "da": { - "$ref": "#/components/schemas/CommentLogData" + "flexMinimumCostCents": { + "type": "number", + "format": "double" } }, "required": [ - "d", - "t" + "name", + "monthlyCostUSD", + "yearlyCostUSD", + "maxMonthlyPageLoads", + "maxMonthlyAPICredits", + "maxMonthlyComments", + "maxConcurrentUsers", + "maxTenantUsers", + "maxSSOUsers", + "maxModerators", + "maxDomains", + "hasDebranding", + "forWhoText", + "featureTaglines", + "hasFlexPricing" ], "type": "object", "additionalProperties": false }, - "FComment": { + "UpdateTenantPackageBody": { "properties": { - "_id": { + "name": { "type": "string" }, - "tenantId": { - "type": "string" + "monthlyCostUSD": { + "type": "number", + "format": "double" }, - "urlId": { - "type": "string" + "yearlyCostUSD": { + "type": "number", + "format": "double" }, - "urlIdRaw": { - "type": "string" + "maxMonthlyPageLoads": { + "type": "number", + "format": "double" }, - "url": { - "type": "string" + "maxMonthlyAPICredits": { + "type": "number", + "format": "double" }, - "pageTitle": { - "type": "string", - "nullable": true + "maxMonthlyComments": { + "type": "number", + "format": "double" }, - "userId": { - "allOf": [ - { - "$ref": "#/components/schemas/UserId" - } - ], - "nullable": true + "maxConcurrentUsers": { + "type": "number", + "format": "double" }, - "anonUserId": { - "type": "string", - "nullable": true + "maxTenantUsers": { + "type": "number", + "format": "double" }, - "commenterEmail": { - "type": "string", - "nullable": true + "maxSSOUsers": { + "type": "number", + "format": "double" }, - "commenterName": { - "type": "string" + "maxModerators": { + "type": "number", + "format": "double" }, - "commenterLink": { - "type": "string", - "nullable": true + "maxDomains": { + "type": "number", + "format": "double" }, - "comment": { - "type": "string" + "maxCustomCollectionSize": { + "type": "number", + "format": "double" }, - "commentHTML": { - "type": "string" + "hasDebranding": { + "type": "boolean" }, - "parentId": { - "type": "string", - "nullable": true + "hasWhiteLabeling": { + "type": "boolean" }, - "date": { - "type": "string", - "format": "date-time", - "nullable": true + "forWhoText": { + "type": "string" }, - "localDateString": { - "type": "string", - "nullable": true + "featureTaglines": { + "items": { + "type": "string" + }, + "type": "array" }, - "localDateHours": { - "type": "integer", - "format": "int32", - "nullable": true + "hasFlexPricing": { + "type": "boolean" }, - "votes": { - "type": "integer", - "format": "int32", - "nullable": true + "flexPageLoadCostCents": { + "type": "number", + "format": "double" }, - "votesUp": { - "type": "integer", - "format": "int32", - "nullable": true + "flexPageLoadUnit": { + "type": "number", + "format": "double" }, - "votesDown": { - "type": "integer", - "format": "int32", - "nullable": true + "flexCommentCostCents": { + "type": "number", + "format": "double" }, - "expireAt": { - "type": "string", - "format": "date-time", - "nullable": true + "flexCommentUnit": { + "type": "number", + "format": "double" }, - "verified": { - "type": "boolean" + "flexSSOUserCostCents": { + "type": "number", + "format": "double" }, - "verifiedDate": { - "type": "string", - "format": "date-time", - "nullable": true + "flexSSOUserUnit": { + "type": "number", + "format": "double" }, - "verificationId": { - "type": "string", - "nullable": true + "flexAPICreditCostCents": { + "type": "number", + "format": "double" }, - "notificationSentForParent": { - "type": "boolean" + "flexAPICreditUnit": { + "type": "number", + "format": "double" }, - "notificationSentForParentTenant": { - "type": "boolean" + "flexModeratorCostCents": { + "type": "number", + "format": "double" }, - "reviewed": { - "type": "boolean" + "flexModeratorUnit": { + "type": "number", + "format": "double" }, - "imported": { - "type": "boolean" + "flexAdminCostCents": { + "type": "number", + "format": "double" }, - "externalId": { - "type": "string" + "flexAdminUnit": { + "type": "number", + "format": "double" }, - "externalParentId": { - "type": "string", - "nullable": true + "flexDomainCostCents": { + "type": "number", + "format": "double" }, - "avatarSrc": { - "type": "string", - "nullable": true + "flexDomainUnit": { + "type": "number", + "format": "double" }, - "isSpam": { - "type": "boolean" + "flexMinimumCostCents": { + "type": "number", + "format": "double" + } + }, + "type": "object", + "additionalProperties": false + }, + "APITenantDailyUsage": { + "properties": { + "id": { + "type": "string" }, - "permNotSpam": { - "type": "boolean" + "tenantId": { + "type": "string" }, - "aiDeterminedSpam": { - "type": "boolean" + "yearNumber": { + "type": "number", + "format": "double" }, - "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" + "monthNumber": { + "type": "number", + "format": "double" }, - "approved": { - "type": "boolean" + "dayNumber": { + "type": "number", + "format": "double" }, - "locale": { - "type": "string", - "nullable": true + "commentFetchCount": { + "type": "number", + "format": "double" }, - "isDeleted": { - "type": "boolean" + "commentCreateCount": { + "type": "number", + "format": "double" }, - "isDeletedUser": { - "type": "boolean" + "conversationCreateCount": { + "type": "number", + "format": "double" }, - "isBannedUser": { - "type": "boolean" + "voteCount": { + "type": "number", + "format": "double" }, - "isByAdmin": { - "type": "boolean" + "accountCreatedCount": { + "type": "number", + "format": "double" }, - "isByModerator": { - "type": "boolean" + "userMentionSearch": { + "type": "number", + "format": "double" }, - "isPinned": { - "type": "boolean", - "nullable": true + "hashTagSearch": { + "type": "number", + "format": "double" }, - "isLocked": { - "type": "boolean", - "nullable": true + "gifSearchTrending": { + "type": "number", + "format": "double" }, - "flagCount": { - "type": "integer", - "format": "int32", - "nullable": true + "gifSearch": { + "type": "number", + "format": "double" }, - "rating": { + "apiCreditsUsed": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "displayLabel": { + "createdAt": { "type": "string", - "nullable": true + "format": "date-time" }, - "fromProductId": { - "type": "integer", - "format": "int32" + "billed": { + "type": "boolean" }, - "meta": { - "properties": { - "wpId": { - "type": "string" - }, - "wpUserId": { - "type": "string" - }, - "wpPostId": { - "type": "string" - } - }, - "additionalProperties": {}, - "type": "object", - "nullable": true + "ignored": { + "type": "boolean" }, - "ipHash": { - "type": "string" + "apiErrorCount": { + "type": "number", + "format": "double" + } + }, + "required": [ + "id", + "tenantId", + "yearNumber", + "monthNumber", + "dayNumber", + "commentFetchCount", + "commentCreateCount", + "conversationCreateCount", + "voteCount", + "accountCreatedCount", + "userMentionSearch", + "hashTagSearch", + "gifSearchTrending", + "gifSearch", + "apiCreditsUsed", + "createdAt", + "billed", + "ignored", + "apiErrorCount" + ], + "type": "object", + "additionalProperties": false + }, + "GetTenantDailyUsagesResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "mentions": { + "tenantDailyUsages": { "items": { - "$ref": "#/components/schemas/CommentUserMentionInfo" + "$ref": "#/components/schemas/APITenantDailyUsage" }, "type": "array" + } + }, + "required": [ + "status", + "tenantDailyUsages" + ], + "type": "object", + "additionalProperties": false + }, + "MetaItem": { + "properties": { + "name": { + "type": "string" }, - "hashTags": { + "values": { "items": { - "$ref": "#/components/schemas/CommentUserHashTagInfo" + "type": "string" }, "type": "array" - }, - "badges": { - "items": { - "$ref": "#/components/schemas/CommentUserBadgeInfo" - }, - "type": "array", - "nullable": true - }, - "domain": { - "allOf": [ - { - "$ref": "#/components/schemas/FDomain" - } - ], - "nullable": true - }, - "veteranBadgeProcessed": { + } + }, + "required": [ + "name", + "values" + ], + "type": "object", + "additionalProperties": false + }, + "QuestionResult": { + "properties": { + "_id": { "type": "string" }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "tenantId": { + "type": "string" }, - "didProcessBadges": { - "type": "boolean" + "urlId": { + "type": "string" }, - "fromOfflineRestore": { - "type": "boolean" + "anonUserId": { + "type": "string" }, - "autoplayJobId": { + "userId": { "type": "string" }, - "autoplayDelayMS": { - "type": "integer", - "format": "int64" + "createdAt": { + "type": "string", + "format": "date-time" }, - "feedbackIds": { - "items": { - "type": "string" - }, - "type": "array" + "value": { + "type": "integer", + "format": "int32", + "description": "The answer. For multi-choice questions this is the number of selected options and the options are in values." }, - "logs": { + "values": { "items": { - "$ref": "#/components/schemas/CommentLogEntry" + "type": "number", + "format": "double" }, "type": "array", + "description": "Selected option indexes, multi-choice questions only." + }, + "commentId": { + "type": "string", "nullable": true }, - "groupIds": { + "questionId": { + "type": "string" + }, + "meta": { "items": { - "type": "string" + "$ref": "#/components/schemas/MetaItem" }, "type": "array", "nullable": true }, - "viewCount": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "requiresVerification": { - "type": "boolean" - }, - "editKey": { - "type": "string" - }, - "tosAcceptedAt": { - "type": "string", - "format": "date-time" - }, - "botId": { + "ipHash": { "type": "string" } }, @@ -9096,2439 +9036,5005 @@ "_id", "tenantId", "urlId", - "url", - "commenterName", - "comment", - "commentHTML", - "date", - "verified", - "approved", - "locale" + "anonUserId", + "userId", + "createdAt", + "value", + "questionId", + "ipHash" ], "type": "object", "additionalProperties": false }, - "FindCommentsByRangeItem": { + "GetQuestionResultResponse": { "properties": { - "comment": { - "allOf": [ - { - "$ref": "#/components/schemas/FComment" - } - ], - "nullable": true + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "result": { + "questionResult": { "$ref": "#/components/schemas/QuestionResult" } }, "required": [ - "comment", - "result" + "status", + "questionResult" ], "type": "object", "additionalProperties": false }, - "FindCommentsByRangeResponse": { + "GetQuestionResultsResponse": { "properties": { - "results": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "questionResults": { "items": { - "$ref": "#/components/schemas/FindCommentsByRangeItem" + "$ref": "#/components/schemas/QuestionResult" }, "type": "array" - }, - "createdAt": { - "type": "string", - "format": "date-time" } }, "required": [ - "results", - "createdAt" + "status", + "questionResults" ], "type": "object", "additionalProperties": false }, - "CombineQuestionResultsWithCommentsResponse": { + "CreateQuestionResultResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "data": { - "$ref": "#/components/schemas/FindCommentsByRangeResponse" + "questionResult": { + "$ref": "#/components/schemas/QuestionResult" } }, "required": [ "status", - "data" + "questionResult" ], "type": "object", "additionalProperties": false }, - "QuestionConfig": { + "CreateQuestionResultBody": { "properties": { - "_id": { + "urlId": { "type": "string" }, - "tenantId": { - "type": "string" + "value": { + "type": "number", + "format": "double", + "description": "Required unless values is given. For multi-choice questions this is derived from values." }, - "name": { - "type": "string" + "values": { + "items": { + "type": "number", + "format": "double" + }, + "type": "array", + "description": "Selected option indexes for multi-choice questions." }, - "question": { + "questionId": { "type": "string" }, - "summaryLabel": { + "anonUserId": { "type": "string" }, - "helpText": { + "userId": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { + "commentId": { "type": "string" }, - "usedCount": { - "type": "number", - "format": "double" - }, - "lastUsed": { - "type": "string", - "format": "date-time" - }, - "type": { + "meta": { + "items": { + "$ref": "#/components/schemas/MetaItem" + }, + "type": "array", + "nullable": true + } + }, + "required": [ + "urlId", + "questionId" + ], + "type": "object", + "additionalProperties": {} + }, + "UpdateQuestionResultBody": { + "properties": { + "urlId": { "type": "string" }, - "numStars": { - "type": "number", - "format": "double" + "anonUserId": { + "type": "string" }, - "min": { - "type": "number", - "format": "double" + "userId": { + "type": "string" }, - "max": { + "value": { "type": "number", "format": "double" }, - "defaultValue": { - "type": "number", - "format": "double" + "values": { + "items": { + "type": "number", + "format": "double" + }, + "type": "array", + "description": "Selected option indexes for multi-choice questions." }, - "labelNegative": { + "commentId": { "type": "string" }, - "labelPositive": { + "questionId": { "type": "string" }, - "customOptions": { + "meta": { "items": { - "properties": { - "imageSrc": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "imageSrc", - "name" - ], - "type": "object" + "$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_" }, - "subQuestionIds": { - "items": { - "type": "string" - }, - "type": "array" + "total": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "v", + "total" + ], + "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": { + "properties": { + "dataByDateBucket": { + "$ref": "#/components/schemas/Record_string.QuestionDatum_" }, - "alwaysShowSubQuestions": { - "type": "boolean" + "dataByUrlId": { + "$ref": "#/components/schemas/Record_string.QuestionDatum_" }, - "reportingOrder": { + "countsByValue": { + "$ref": "#/components/schemas/Int32Map" + }, + "total": { + "type": "integer", + "format": "int64" + }, + "average": { "type": "number", "format": "double" + }, + "createdAt": { + "type": "string", + "format": "date-time" } }, "required": [ - "_id", - "tenantId", - "name", - "question", - "helpText", - "createdAt", - "createdBy", - "usedCount", - "lastUsed", - "type", - "numStars", - "min", - "max", - "defaultValue", - "labelNegative", - "labelPositive", - "customOptions", - "subQuestionIds", - "alwaysShowSubQuestions", - "reportingOrder" + "total", + "createdAt" ], "type": "object", "additionalProperties": false }, - "GetQuestionConfigResponse": { + "AggregateQuestionResultsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "questionConfig": { - "$ref": "#/components/schemas/QuestionConfig" + "data": { + "$ref": "#/components/schemas/QuestionResultAggregationOverall" } }, "required": [ "status", - "questionConfig" + "data" ], "type": "object", "additionalProperties": false }, - "GetQuestionConfigsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "questionConfigs": { - "items": { - "$ref": "#/components/schemas/QuestionConfig" - }, - "type": "array" - } + "AggregateTimeBucket": { + "type": "string", + "enum": [ + "day", + "month", + "year" + ] + }, + "Record_string.QuestionResultAggregationOverall_": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/QuestionResultAggregationOverall" }, - "required": [ - "status", - "questionConfigs" - ], "type": "object", - "additionalProperties": false + "description": "Construct a type with a set of properties K of type T" }, - "CreateQuestionConfigResponse": { + "BulkAggregateQuestionResultsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "questionConfig": { - "$ref": "#/components/schemas/QuestionConfig" + "data": { + "$ref": "#/components/schemas/Record_string.QuestionResultAggregationOverall_" } }, "required": [ "status", - "questionConfig" + "data" ], "type": "object", "additionalProperties": false }, - "CreateQuestionConfigBody": { + "BulkAggregateQuestionItem": { "properties": { - "name": { - "type": "string" - }, - "question": { - "type": "string" - }, - "helpText": { - "type": "string" - }, - "type": { - "type": "string" - }, - "numStars": { - "type": "number", - "format": "double" - }, - "min": { - "type": "number", - "format": "double" - }, - "max": { - "type": "number", - "format": "double" - }, - "defaultValue": { - "type": "number", - "format": "double" - }, - "labelNegative": { + "aggId": { "type": "string" }, - "labelPositive": { + "questionId": { "type": "string" }, - "customOptions": { - "items": { - "properties": { - "imageSrc": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "imageSrc", - "name" - ], - "type": "object" - }, - "type": "array" - }, - "subQuestionIds": { + "questionIds": { "items": { "type": "string" }, "type": "array" }, - "alwaysShowSubQuestions": { - "type": "boolean" + "urlId": { + "type": "string" }, - "reportingOrder": { - "type": "number", - "format": "double" + "timeBucket": { + "$ref": "#/components/schemas/AggregateTimeBucket" + }, + "startDate": { + "type": "string", + "format": "date-time" } }, "required": [ - "name", - "question", - "type", - "reportingOrder" + "aggId" ], "type": "object", - "additionalProperties": {} + "additionalProperties": false }, - "UpdateQuestionConfigBody": { + "BulkAggregateQuestionResultsRequest": { "properties": { - "name": { - "type": "string" - }, - "question": { - "type": "string" - }, - "helpText": { - "type": "string" - }, - "type": { - "type": "string" - }, - "numStars": { - "type": "number", - "format": "double" - }, - "min": { - "type": "number", - "format": "double" - }, - "max": { - "type": "number", - "format": "double" - }, - "defaultValue": { - "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": { + "aggregations": { "items": { - "type": "string" + "$ref": "#/components/schemas/BulkAggregateQuestionItem" }, "type": "array" - }, - "alwaysShowSubQuestions": { - "type": "boolean" - }, - "reportingOrder": { - "type": "number", - "format": "double" } }, + "required": [ + "aggregations" + ], "type": "object", - "additionalProperties": {} + "additionalProperties": false }, - "PendingCommentToSyncOutbound": { + "CommentTranslation": { "properties": { - "_id": { + "comment": { "type": "string" }, - "commentId": { + "commentHTML": { "type": "string" }, - "comment": { - "$ref": "#/components/schemas/FComment" - }, - "externalId": { - "type": "string", - "nullable": true - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "tenantId": { + "sourceLanguage": { "type": "string" }, - "attemptCount": { - "type": "number", - "format": "double" + "model": { + "type": "string" }, - "nextAttemptAt": { + "createdAt": { "type": "string", "format": "date-time" - }, - "eventType": { - "type": "number", - "format": "double" - }, - "type": { - "type": "number", - "format": "double" - }, - "domain": { - "type": "string" - }, - "lastError": { - "additionalProperties": false, - "type": "object" - }, - "webhookId": { - "type": "string" } }, "required": [ - "_id", - "commentId", - "externalId", - "createdAt", - "tenantId", - "attemptCount", - "nextAttemptAt", - "eventType", - "type", - "domain", - "lastError" + "comment", + "commentHTML", + "sourceLanguage", + "model", + "createdAt" ], "type": "object", "additionalProperties": false }, - "GetPendingWebhookEventsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "pendingWebhookEvents": { - "items": { - "$ref": "#/components/schemas/PendingCommentToSyncOutbound" - }, - "type": "array" - } + "Record_string.CommentTranslation_": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/CommentTranslation" }, - "required": [ - "status", - "pendingWebhookEvents" - ], "type": "object", - "additionalProperties": false + "description": "Construct a type with a set of properties K of type T" }, - "GetPendingWebhookEventCountResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "count": { - "type": "number", - "format": "double" - } - }, - "required": [ - "status", - "count" + "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, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], - "type": "object", - "additionalProperties": false + "type": "integer" }, - "GetNotificationsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "notifications": { - "items": { - "$ref": "#/components/schemas/UserNotification" - }, - "type": "array" - } - }, - "required": [ - "status", - "notifications" + "RepeatCommentHandlingAction": { + "enum": [ + 0, + 1, + 2 ], - "type": "object", - "additionalProperties": false + "type": "integer" }, - "GetNotificationCountResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "count": { - "type": "number", - "format": "double" - } - }, - "required": [ - "status", - "count" + "RepeatCommentCheckIgnoredReason": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 ], - "type": "object", - "additionalProperties": false + "type": "integer" }, - "UpdateNotificationBody": { + "NotificationSkipReason": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ], + "type": "integer" + }, + "CommentLogData": { "properties": { - "viewed": { + "clearContent": { "type": "boolean" }, - "optedOut": { + "isDeletedUser": { "type": "boolean" - } - }, - "type": "object", - "additionalProperties": {} - }, - "UserNotificationCount": { - "properties": { - "_id": { + }, + "phrase": { "type": "string" }, - "count": { - "type": "number", - "format": "double" + "badWord": { + "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" + "word": { + "type": "string" }, - "expireAt": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "_id", - "count", - "createdAt", - "expireAt" - ], - "type": "object", - "additionalProperties": false - }, - "GetCachedNotificationCountResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "locale": { + "type": "string" }, - "data": { - "$ref": "#/components/schemas/UserNotificationCount" - } - }, - "required": [ - "status", - "data" - ], - "type": "object", - "additionalProperties": false - }, - "Moderator": { - "properties": { - "_id": { + "tenantBadgeId": { "type": "string" }, - "tenantId": { + "badgeId": { "type": "string" }, - "name": { - "type": "string", - "nullable": true + "wasLoggedIn": { + "type": "boolean" }, - "userId": { - "type": "string", - "nullable": true + "foundUser": { + "type": "boolean" }, - "acceptedInvite": { + "verified": { "type": "boolean" }, - "email": { - "type": "string", - "nullable": true + "engine": { + "type": "string" }, - "markReviewedCount": { - "type": "number", - "format": "double" + "engineResponse": { + "type": "string" }, - "deletedCount": { + "engineTokens": { "type": "number", "format": "double" }, - "markedSpamCount": { + "trustFactor": { "type": "number", "format": "double" }, - "markedNotSpamCount": { - "type": "number", - "format": "double" + "source": { + "type": "string" }, - "approvedCount": { - "type": "number", - "format": "double" + "rule": { + "$ref": "#/components/schemas/SpamRule" }, - "unApprovedCount": { - "type": "number", - "format": "double" + "userId": { + "type": "string" }, - "editedCount": { + "subscribers": { "type": "number", "format": "double" }, - "bannedCount": { + "notificationCount": { "type": "number", "format": "double" }, - "unFlaggedCount": { + "votesBefore": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, - "verificationId": { - "type": "string", + "votesUpBefore": { + "type": "number", + "format": "double", "nullable": true }, - "createdAt": { - "type": "string", - "format": "date-time" + "votesDownBefore": { + "type": "number", + "format": "double", + "nullable": true }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array", + "votesAfter": { + "type": "number", + "format": "double", "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", - "additionalProperties": false - }, - "GetModeratorResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "votesUpAfter": { + "type": "number", + "format": "double", + "nullable": true }, - "moderator": { - "$ref": "#/components/schemas/Moderator" - } - }, - "required": [ - "status", - "moderator" - ], - "type": "object", - "additionalProperties": false - }, - "GetModeratorsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "votesDownAfter": { + "type": "number", + "format": "double", + "nullable": true }, - "moderators": { - "items": { - "$ref": "#/components/schemas/Moderator" - }, - "type": "array" - } - }, - "required": [ - "status", - "moderators" - ], - "type": "object", - "additionalProperties": false - }, - "CreateModeratorResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "repeatAction": { + "$ref": "#/components/schemas/RepeatCommentHandlingAction" }, - "moderator": { - "$ref": "#/components/schemas/Moderator" - } - }, - "required": [ - "status", - "moderator" - ], - "type": "object", - "additionalProperties": false - }, - "CreateModeratorBody": { - "properties": { - "name": { - "type": "string" + "reason": { + "$ref": "#/components/schemas/RepeatCommentCheckIgnoredReason" }, - "email": { + "skipReason": { "type": "string" }, - "userId": { - "type": "string" + "otherData": {}, + "spamBefore": { + "type": "boolean" }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "name", - "email" - ], - "type": "object", - "additionalProperties": {} - }, - "UpdateModeratorBody": { - "properties": { - "name": { - "type": "string" + "spamAfter": { + "type": "boolean" }, - "email": { - "type": "string" + "permanentFlag": { + "type": "string", + "enum": [ + "permanent" + ], + "nullable": false }, - "userId": { + "approvedBefore": { + "type": "boolean" + }, + "approvedAfter": { + "type": "boolean" + }, + "reviewedBefore": { + "type": "boolean" + }, + "reviewedAfter": { + "type": "boolean" + }, + "textBefore": { "type": "string" }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": {} - }, - "TenantHashTag": { - "properties": { - "_id": { + "textAfter": { "type": "string" }, - "createdAt": { + "expireBefore": { "type": "string", - "format": "date-time" + "format": "date-time", + "nullable": true }, - "tenantId": { + "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" }, - "tag": { + "invalidLocale": { "type": "string" }, - "url": { + "detectedLocale": { "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" + "detectedLanguage": { + "type": "string" + }, + "recipientUserId": { + "type": "string" + }, + "notifySkipReason": { + "$ref": "#/components/schemas/NotificationSkipReason" + }, + "emailQueued": { + "type": "boolean" } }, - "required": [ - "status", - "hashTags" - ], "type": "object", "additionalProperties": false }, - "CreateHashTagResponse": { + "CommentLogEntry": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "d": { + "type": "string", + "format": "date-time" }, - "hashTag": { - "$ref": "#/components/schemas/TenantHashTag" + "t": { + "$ref": "#/components/schemas/CommentLogType" + }, + "da": { + "$ref": "#/components/schemas/CommentLogData" } }, "required": [ - "status", - "hashTag" + "d", + "t" ], "type": "object", "additionalProperties": false }, - "CreateHashTagBody": { + "FComment": { "properties": { + "_id": { + "type": "string" + }, "tenantId": { "type": "string" }, - "tag": { + "urlId": { + "type": "string" + }, + "urlIdRaw": { "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" + "pageTitle": { + "type": "string", + "nullable": true }, - "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" + "userId": { + "allOf": [ + { + "$ref": "#/components/schemas/UserId" + } + ], + "nullable": true }, - "hashTag": { - "$ref": "#/components/schemas/TenantHashTag" - } - }, - "required": [ - "status", - "hashTag" - ], - "type": "object", - "additionalProperties": false - }, - "UpdateHashTagBody": { - "properties": { - "tenantId": { - "type": "string" + "anonUserId": { + "type": "string", + "nullable": true }, - "url": { - "type": "string" + "commenterEmail": { + "type": "string", + "nullable": true }, - "tag": { + "commenterName": { "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" + "commenterLink": { + "type": "string", + "nullable": true }, - "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": { + "comment": { "type": "string" }, - "defaultTestData": { - "$ref": "#/components/schemas/Record_string.unknown_" + "commentHTML": { + "type": "string" }, - "defaultTranslationsByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" + "parentId": { + "type": "string", + "nullable": true }, - "defaultEJS": { - "type": "string" - } - }, - "required": [ - "emailTemplateId", - "defaultTestData", - "defaultTranslationsByLocale", - "defaultEJS" - ], - "type": "object", - "additionalProperties": false - }, - "GetEmailTemplateDefinitionsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "date": { + "type": "string", + "format": "date-time", + "nullable": true }, - "definitions": { - "items": { - "$ref": "#/components/schemas/EmailTemplateDefinition" - }, - "type": "array" - } - }, - "required": [ - "status", - "definitions" - ], - "type": "object", - "additionalProperties": false - }, - "EmailTemplateRenderErrorResponse": { - "properties": { - "id": { - "type": "string" + "localDateString": { + "type": "string", + "nullable": true }, - "tenantId": { - "type": "string" + "localDateHours": { + "type": "integer", + "format": "int32", + "nullable": true }, - "customTemplateId": { - "type": "string" + "votes": { + "type": "integer", + "format": "int32", + "nullable": true }, - "error": { - "type": "string" + "votesUp": { + "type": "integer", + "format": "int32", + "nullable": true }, - "count": { - "type": "number", - "format": "double" + "votesDown": { + "type": "integer", + "format": "int32", + "nullable": true }, - "createdAt": { + "expireAt": { "type": "string", - "format": "date-time" + "format": "date-time", + "nullable": true }, - "lastOccurredAt": { + "verified": { + "type": "boolean" + }, + "verifiedDate": { "type": "string", - "format": "date-time" - } - }, - "required": [ - "id", - "tenantId", - "customTemplateId", - "error", - "count", - "createdAt", - "lastOccurredAt" - ], - "type": "object", - "additionalProperties": false - }, - "GetEmailTemplateRenderErrorsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "format": "date-time", + "nullable": true }, - "renderErrors": { - "items": { - "$ref": "#/components/schemas/EmailTemplateRenderErrorResponse" - }, - "type": "array" - } - }, - "required": [ - "status", - "renderErrors" - ], - "type": "object", - "additionalProperties": false - }, - "CustomEmailTemplate": { - "properties": { - "_id": { - "type": "string" + "verificationId": { + "type": "string", + "nullable": true }, - "tenantId": { - "type": "string" + "notificationSentForParent": { + "type": "boolean" }, - "emailTemplateId": { - "type": "string" + "notificationSentForParentTenant": { + "type": "boolean" }, - "displayName": { + "reviewed": { + "type": "boolean" + }, + "imported": { + "type": "boolean" + }, + "externalId": { "type": "string" }, - "createdAt": { + "externalParentId": { "type": "string", - "format": "date-time" + "nullable": true }, - "updatedAt": { + "avatarSrc": { "type": "string", - "format": "date-time", "nullable": true }, - "updatedByUserId": { + "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" + }, + "hasCode": { + "type": "boolean" + }, + "approved": { + "type": "boolean" + }, + "locale": { "type": "string", "nullable": true }, - "domain": { + "detectedLanguage": { "type": "string", "nullable": true }, - "ejs": { - "type": "string" + "translations": { + "allOf": [ + { + "$ref": "#/components/schemas/Record_string.CommentTranslation_" + } + ], + "nullable": true }, - "translationOverridesByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" + "isDeleted": { + "type": "boolean" }, - "testData": {} - }, - "required": [ - "_id", - "tenantId", - "emailTemplateId", - "displayName", - "createdAt", - "updatedAt", - "updatedByUserId", - "ejs", - "translationOverridesByLocale", - "testData" - ], - "type": "object", - "additionalProperties": false - }, - "GetEmailTemplateResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "isDeletedUser": { + "type": "boolean" }, - "emailTemplate": { - "$ref": "#/components/schemas/CustomEmailTemplate" - } - }, - "required": [ - "status", - "emailTemplate" - ], - "type": "object", - "additionalProperties": false - }, - "GetEmailTemplatesResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "isBannedUser": { + "type": "boolean" }, - "emailTemplates": { - "items": { - "$ref": "#/components/schemas/CustomEmailTemplate" - }, - "type": "array" - } - }, - "required": [ - "status", - "emailTemplates" - ], - "type": "object", - "additionalProperties": false - }, - "CreateEmailTemplateResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "isByAdmin": { + "type": "boolean" }, - "emailTemplate": { - "$ref": "#/components/schemas/CustomEmailTemplate" - } - }, - "required": [ - "status", - "emailTemplate" - ], - "type": "object", - "additionalProperties": false - }, - "CreateEmailTemplateBody": { - "properties": { - "emailTemplateId": { - "type": "string" + "isByModerator": { + "type": "boolean" }, - "displayName": { - "type": "string" + "isPinned": { + "type": "boolean", + "nullable": true }, - "ejs": { - "type": "string" + "isLocked": { + "type": "boolean", + "nullable": true }, - "domain": { - "type": "string" + "flagCount": { + "type": "integer", + "format": "int32", + "nullable": true }, - "translationOverridesByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" + "rating": { + "type": "number", + "format": "double", + "nullable": true }, - "testData": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - }, - "required": [ - "emailTemplateId", - "displayName", - "ejs" - ], - "type": "object", - "additionalProperties": false - }, - "UpdateEmailTemplateBody": { - "properties": { - "emailTemplateId": { - "type": "string" + "displayLabel": { + "type": "string", + "nullable": true }, - "displayName": { - "type": "string" + "fromProductId": { + "type": "integer", + "format": "int32" }, - "ejs": { - "type": "string" + "meta": { + "properties": { + "wpId": { + "type": "string" + }, + "wpUserId": { + "type": "string" + }, + "wpPostId": { + "type": "string" + } + }, + "additionalProperties": {}, + "type": "object", + "nullable": true }, - "domain": { + "ipHash": { "type": "string" }, - "translationOverridesByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" + "mentions": { + "items": { + "$ref": "#/components/schemas/CommentUserMentionInfo" + }, + "type": "array" }, - "testData": { - "$ref": "#/components/schemas/Record_string.unknown_" + "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" + }, + "poll": { + "allOf": [ + { + "$ref": "#/components/schemas/CommentPoll" + } + ], + "nullable": true + }, + "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" + }, + "editKey": { + "type": "string" + }, + "tosAcceptedAt": { + "type": "string", + "format": "date-time" + }, + "botId": { + "type": "string" } }, + "required": [ + "_id", + "tenantId", + "urlId", + "url", + "commenterName", + "comment", + "commentHTML", + "date", + "verified", + "approved", + "locale" + ], "type": "object", "additionalProperties": false }, - "RenderEmailTemplateResponse": { + "FindCommentsByRangeItem": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "comment": { + "allOf": [ + { + "$ref": "#/components/schemas/FComment" + } + ], + "nullable": true }, - "html": { - "type": "string" + "result": { + "$ref": "#/components/schemas/QuestionResult" } }, "required": [ - "status", - "html" + "comment", + "result" ], "type": "object", "additionalProperties": false }, - "RenderEmailTemplateBody": { + "FindCommentsByRangeResponse": { "properties": { - "emailTemplateId": { - "type": "string" - }, - "ejs": { - "type": "string" - }, - "testData": { - "$ref": "#/components/schemas/Record_string.unknown_" + "results": { + "items": { + "$ref": "#/components/schemas/FindCommentsByRangeItem" + }, + "type": "array" }, - "translationOverridesByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" + "createdAt": { + "type": "string", + "format": "date-time" } }, "required": [ - "emailTemplateId", - "ejs" + "results", + "createdAt" ], "type": "object", "additionalProperties": false }, - "AddDomainConfigParams": { + "CombineQuestionResultsWithCommentsResponse": { "properties": { - "domain": { - "type": "string" - }, - "emailFromName": { - "type": "string" - }, - "emailFromEmail": { - "type": "string" - }, - "logoSrc": { - "type": "string" - }, - "logoSrc100px": { - "type": "string" - }, - "footerUnsubscribeURL": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "emailHeaders": { - "$ref": "#/components/schemas/Record_string.string_" + "data": { + "$ref": "#/components/schemas/FindCommentsByRangeResponse" } }, "required": [ - "domain" + "status", + "data" ], "type": "object", "additionalProperties": false }, - "UpdateDomainConfigParams": { + "QuestionConditionOperator": { + "enum": [ + "lt", + "lte", + "gt", + "gte", + "eq", + "neq", + "includes", + "excludes" + ], + "type": "string" + }, + "SubQuestionCondition": { "properties": { - "domain": { - "type": "string" - }, - "emailFromName": { - "type": "string" - }, - "emailFromEmail": { - "type": "string" - }, - "logoSrc": { - "type": "string" + "operator": { + "$ref": "#/components/schemas/QuestionConditionOperator" }, - "logoSrc100px": { - "type": "string" + "value": { + "type": "number", + "format": "double" }, - "footerUnsubscribeURL": { + "subQuestionId": { "type": "string" + } + }, + "required": [ + "operator", + "value", + "subQuestionId" + ], + "type": "object", + "additionalProperties": false + }, + "QuestionCondition": { + "description": "A rule evaluated against a question's answer. value is the score for nps/slider/star/emoji/scale, 1 or 0 for\nthumbs, and the option index for choice/multi.", + "properties": { + "operator": { + "$ref": "#/components/schemas/QuestionConditionOperator" }, - "emailHeaders": { - "$ref": "#/components/schemas/Record_string.string_" + "value": { + "type": "number", + "format": "double" } }, "required": [ - "domain" + "operator", + "value" ], "type": "object", "additionalProperties": false }, - "PatchDomainConfigParams": { + "QuestionConfig": { "properties": { - "domain": { + "_id": { "type": "string" }, - "emailFromName": { + "tenantId": { "type": "string" }, - "emailFromEmail": { + "name": { "type": "string" }, - "logoSrc": { + "question": { "type": "string" }, - "logoSrc100px": { + "summaryLabel": { "type": "string" }, - "footerUnsubscribeURL": { + "helpText": { "type": "string" }, - "emailHeaders": { - "$ref": "#/components/schemas/Record_string.string_" - } - }, - "type": "object", - "additionalProperties": false - }, - "APICommentBase": { - "properties": { - "id": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { "type": "string" }, - "aiDeterminedSpam": { - "type": "boolean" + "usedCount": { + "type": "number", + "format": "double" }, - "anonUserId": { + "lastUsed": { "type": "string", - "nullable": true - }, - "approved": { - "type": "boolean" + "format": "date-time" }, - "avatarSrc": { + "type": { "type": "string", - "nullable": true + "description": "One of nps, slider, star, thumbs, choice, multi, emoji, scale. Answers: nps 0-10, slider min-max, star 1-numStars,\nthumbs 1 (up) or 0 (down), choice = option index, multi = option indexes (values), emoji/scale = option index + 1." }, - "badges": { - "items": { - "$ref": "#/components/schemas/CommentUserBadgeInfo" - }, - "type": "array", - "nullable": true - }, - "comment": { - "type": "string" + "numStars": { + "type": "number", + "format": "double" }, - "commentHTML": { - "type": "string" + "min": { + "type": "number", + "format": "double" }, - "commenterEmail": { - "type": "string", - "nullable": true + "max": { + "type": "number", + "format": "double" }, - "commenterLink": { - "type": "string", - "nullable": true + "defaultValue": { + "type": "number", + "format": "double" }, - "commenterName": { + "labelNegative": { "type": "string" }, - "date": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "displayLabel": { - "type": "string", - "nullable": true - }, - "domain": { - "allOf": [ - { - "$ref": "#/components/schemas/FDomain" - } - ], - "nullable": true - }, - "externalId": { + "labelPositive": { "type": "string" }, - "externalParentId": { - "type": "string", - "nullable": true - }, - "expireAt": { - "type": "string", - "format": "date-time", - "nullable": true + "customOptions": { + "items": { + "properties": { + "imageSrc": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "imageSrc", + "name" + ], + "type": "object" + }, + "type": "array", + "description": "Option labels for choice, multi, emoji and scale questions." }, - "feedbackIds": { + "subQuestionIds": { "items": { "type": "string" }, "type": "array" }, - "flagCount": { - "type": "integer", - "format": "int32", - "nullable": true + "alwaysShowSubQuestions": { + "type": "boolean" }, - "fromProductId": { - "type": "integer", - "format": "int32" + "subQuestionConditions": { + "items": { + "$ref": "#/components/schemas/SubQuestionCondition" + }, + "type": "array", + "description": "Sub-questions listed here only show when this question's answer matches. Others always show." }, - "hasCode": { - "type": "boolean" + "commentBoxCondition": { + "$ref": "#/components/schemas/QuestionCondition", + "description": "When set, the comment box only shows when this question's answer matches." }, - "hasImages": { - "type": "boolean" + "commentBoxPrompt": { + "type": "string", + "description": "Placeholder for the comment box when commentBoxCondition reveals it." }, - "hasLinks": { - "type": "boolean" + "reportingOrder": { + "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" }, - "hashTags": { + "questionConfig": { + "$ref": "#/components/schemas/QuestionConfig" + } + }, + "required": [ + "status", + "questionConfig" + ], + "type": "object", + "additionalProperties": false + }, + "GetQuestionConfigsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "questionConfigs": { "items": { - "$ref": "#/components/schemas/CommentUserHashTagInfo" + "$ref": "#/components/schemas/QuestionConfig" }, "type": "array" + } + }, + "required": [ + "status", + "questionConfigs" + ], + "type": "object", + "additionalProperties": false + }, + "CreateQuestionConfigResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "isByAdmin": { - "type": "boolean" + "questionConfig": { + "$ref": "#/components/schemas/QuestionConfig" + } + }, + "required": [ + "status", + "questionConfig" + ], + "type": "object", + "additionalProperties": false + }, + "CreateQuestionConfigBody": { + "properties": { + "name": { + "type": "string" }, - "isByModerator": { - "type": "boolean" + "question": { + "type": "string" }, - "isDeleted": { - "type": "boolean" + "helpText": { + "type": "string" }, - "isDeletedUser": { - "type": "boolean" + "type": { + "type": "string", + "description": "One of nps, slider, star, thumbs, choice, multi, emoji, scale. choice, multi, emoji and scale take their labels\nfrom customOptions (choice/multi 2-20 options, emoji/scale 3-7)." }, - "isPinned": { - "type": "boolean", - "nullable": true + "numStars": { + "type": "number", + "format": "double" }, - "isLocked": { - "type": "boolean", - "nullable": true + "min": { + "type": "number", + "format": "double" }, - "isSpam": { - "type": "boolean" + "max": { + "type": "number", + "format": "double" }, - "localDateHours": { - "type": "integer", - "format": "int32", - "nullable": true + "defaultValue": { + "type": "number", + "format": "double" }, - "localDateString": { - "type": "string", - "nullable": true + "labelNegative": { + "type": "string" }, - "locale": { - "type": "string", - "nullable": true + "labelPositive": { + "type": "string" }, - "mentions": { + "customOptions": { "items": { - "$ref": "#/components/schemas/CommentUserMentionInfo" - }, - "type": "array" - }, - "meta": { - "properties": { - "wpUserId": { - "type": "string" + "properties": { + "imageSrc": { + "type": "string" + }, + "name": { + "type": "string" + } }, - "wpPostId": { - "type": "string" - } + "required": [ + "imageSrc", + "name" + ], + "type": "object" }, - "additionalProperties": {}, - "type": "object", - "nullable": true + "type": "array" }, - "moderationGroupIds": { + "subQuestionIds": { "items": { "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "notificationSentForParent": { + "alwaysShowSubQuestions": { "type": "boolean" }, - "notificationSentForParentTenant": { - "type": "boolean" + "subQuestionConditions": { + "items": { + "$ref": "#/components/schemas/SubQuestionCondition" + }, + "type": "array", + "description": "Show a sub-question only when this question's answer matches its rule." }, - "pageTitle": { - "type": "string", - "nullable": true + "commentBoxCondition": { + "$ref": "#/components/schemas/QuestionCondition", + "description": "Show the comment box only when this question's answer matches." }, - "parentId": { + "commentBoxPrompt": { "type": "string", - "nullable": true + "description": "Comment box placeholder when commentBoxCondition reveals it." }, - "rating": { + "reportingOrder": { "type": "number", - "format": "double", - "nullable": true - }, - "reviewed": { - "type": "boolean" + "format": "double" + } + }, + "required": [ + "name", + "question", + "type", + "reportingOrder" + ], + "type": "object", + "additionalProperties": {} + }, + "UpdateQuestionConfigBody": { + "properties": { + "name": { + "type": "string" }, - "tenantId": { + "question": { "type": "string" }, - "url": { + "helpText": { "type": "string" }, - "urlId": { + "type": { + "type": "string", + "description": "One of nps, slider, star, thumbs, choice, multi, emoji, scale." + }, + "numStars": { + "type": "number", + "format": "double" + }, + "min": { + "type": "number", + "format": "double" + }, + "max": { + "type": "number", + "format": "double" + }, + "defaultValue": { + "type": "number", + "format": "double" + }, + "labelNegative": { "type": "string" }, - "urlIdRaw": { + "labelPositive": { "type": "string" }, - "userId": { - "allOf": [ - { - "$ref": "#/components/schemas/UserId" - } - ], - "nullable": true + "customOptions": { + "items": { + "properties": { + "imageSrc": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "imageSrc", + "name" + ], + "type": "object" + }, + "type": "array" }, - "verified": { + "subQuestionIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "alwaysShowSubQuestions": { "type": "boolean" }, - "verifiedDate": { - "type": "string", - "format": "date-time", - "nullable": true + "subQuestionConditions": { + "items": { + "$ref": "#/components/schemas/SubQuestionCondition" + }, + "type": "array" }, - "votes": { - "type": "integer", - "format": "int32", - "nullable": true + "commentBoxCondition": { + "$ref": "#/components/schemas/QuestionCondition" }, - "votesDown": { - "type": "integer", - "format": "int32", - "nullable": true + "commentBoxPrompt": { + "type": "string" }, - "votesUp": { - "type": "integer", - "format": "int32", - "nullable": true + "reportingOrder": { + "type": "number", + "format": "double" } }, - "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" - } - ] + "additionalProperties": {} }, - "APIGetCommentResponse": { + "GetPollResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "comment": { - "$ref": "#/components/schemas/APIComment" + "poll": { + "$ref": "#/components/schemas/CommentPoll" } }, "required": [ "status", - "comment" + "poll" ], "type": "object", "additionalProperties": false }, - "APIGetCommentsResponse": { + "SavePollResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "comments": { - "items": { - "$ref": "#/components/schemas/APIComment" - }, - "type": "array" + "poll": { + "$ref": "#/components/schemas/CommentPoll" } }, "required": [ "status", - "comments" + "poll" ], "type": "object", "additionalProperties": false }, - "UpdatableCommentParams": { + "CommentPollOptionInput": { "properties": { - "urlId": { - "type": "string" - }, - "urlIdRaw": { - "type": "string" - }, - "url": { - "type": "string" - }, - "pageTitle": { - "type": "string", - "nullable": true - }, - "userId": { - "allOf": [ - { - "$ref": "#/components/schemas/UserId" - } - ], - "nullable": true - }, - "commenterEmail": { + "id": { "type": "string", "nullable": true }, - "commenterName": { + "label": { "type": "string" - }, - "commenterLink": { - "type": "string", - "nullable": true - }, - "comment": { + } + }, + "required": [ + "label" + ], + "type": "object", + "additionalProperties": false + }, + "CommentPollPutInput": { + "properties": { + "question": { "type": "string" }, - "commentHTML": { - "type": "string" + "options": { + "items": { + "$ref": "#/components/schemas/CommentPollOptionInput" + }, + "type": "array" }, - "parentId": { + "closesAt": { "type": "string", "nullable": true }, - "date": { - "type": "number", - "format": "double", + "privacy": { + "type": "integer", + "format": "int32", "nullable": true }, - "localDateString": { + "requireVoteToSeeResults": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "question", + "options" + ], + "type": "object", + "additionalProperties": false + }, + "CommentPollPatch": { + "properties": { + "question": { "type": "string", "nullable": true }, - "localDateHours": { - "type": "integer", - "format": "int32", + "options": { + "items": { + "properties": { + "label": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "label", + "id" + ], + "type": "object" + }, + "type": "array", "nullable": true }, - "votes": { - "type": "integer", - "format": "int32", + "closesAt": { + "type": "string", "nullable": true }, - "votesUp": { + "privacy": { "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", + "requireVoteToSeeResults": { + "type": "boolean", "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "PublicPollVote": { + "description": "A single vote cast on a comment's poll.", + "properties": { + "id": { + "type": "string" }, - "notificationSentForParent": { - "type": "boolean" + "tenantId": { + "type": "string" }, - "notificationSentForParentTenant": { - "type": "boolean" + "commentId": { + "type": "string" }, - "reviewed": { - "type": "boolean" + "urlId": { + "type": "string" }, - "externalId": { + "voterId": { "type": "string" }, - "externalParentId": { - "type": "string", - "nullable": true + "optionId": { + "type": "string" }, - "avatarSrc": { + "createdAt": { "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 + "format": "date-time" }, - "displayLabel": { + "updatedAt": { "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 + "format": "date-time" + } + }, + "required": [ + "id", + "tenantId", + "commentId", + "urlId", + "voterId", + "optionId", + "createdAt" + ], + "type": "object", + "additionalProperties": false + }, + "GetPollVotesResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "feedbackIds": { + "pollVotes": { "items": { - "type": "string" + "$ref": "#/components/schemas/PublicPollVote" }, "type": "array" } }, + "required": [ + "status", + "pollVotes" + ], "type": "object", "additionalProperties": false }, - "APISaveCommentResponse": { + "GetPollVoteResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "comment": { - "$ref": "#/components/schemas/APIComment" + "pollVote": { + "$ref": "#/components/schemas/PublicPollVote" + } + }, + "required": [ + "status", + "pollVote" + ], + "type": "object", + "additionalProperties": false + }, + "CreatePollVoteResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/UserSessionInfo" - } - ], - "nullable": true + "pollVote": { + "$ref": "#/components/schemas/PublicPollVote" }, - "moduleData": { - "$ref": "#/components/schemas/Record_string.any_" + "poll": { + "$ref": "#/components/schemas/CommentPoll" } }, "required": [ "status", - "comment", - "user" + "pollVote", + "poll" ], "type": "object", "additionalProperties": false }, - "CreateCommentParams": { + "CreatePollVoteBody": { "properties": { - "date": { - "type": "integer", - "format": "int64" - }, - "localDateString": { + "commentId": { "type": "string" }, - "localDateHours": { - "type": "integer", - "format": "int32" + "optionId": { + "type": "string" }, - "commenterName": { + "userId": { "type": "string" }, - "commenterEmail": { - "type": "string", - "nullable": true + "anonUserId": { + "type": "string" }, - "commenterLink": { - "type": "string", - "nullable": true + "ip": { + "type": "string" + } + }, + "required": [ + "commentId", + "optionId" + ], + "type": "object", + "additionalProperties": false + }, + "DeletePollVoteResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "comment": { + "poll": { + "$ref": "#/components/schemas/CommentPoll" + } + }, + "required": [ + "status", + "poll" + ], + "type": "object", + "additionalProperties": false + }, + "PendingCommentToSyncOutbound": { + "properties": { + "_id": { "type": "string" }, - "productId": { - "type": "integer", - "format": "int32" + "commentId": { + "type": "string" }, - "userId": { - "type": "string", - "nullable": true + "comment": { + "$ref": "#/components/schemas/FComment" }, - "avatarSrc": { + "externalId": { "type": "string", "nullable": true }, - "parentId": { + "createdAt": { "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" + "format": "date-time" }, - "url": { + "tenantId": { "type": "string" }, - "urlId": { - "type": "string" + "attemptCount": { + "type": "number", + "format": "double" }, - "meta": { - "additionalProperties": false, - "type": "object" + "nextAttemptAt": { + "type": "string", + "format": "date-time" }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array" + "eventType": { + "type": "number", + "format": "double" }, - "rating": { + "type": { "type": "number", "format": "double" }, - "fromOfflineRestore": { - "type": "boolean" + "domain": { + "type": "string" }, - "autoplayDelayMS": { - "type": "integer", - "format": "int64" + "lastError": { + "additionalProperties": false, + "type": "object" }, - "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": { + "webhookId": { "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" + "_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" - } + "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" + } }, - "type": "object" + "required": [ + "_id", + "tenantId", + "name", + "userId", + "acceptedInvite", + "email", + "markReviewedCount", + "deletedCount", + "markedSpamCount", + "markedNotSpamCount", + "approvedCount", + "unApprovedCount", + "editedCount", + "bannedCount", + "unFlaggedCount", + "verificationId", + "createdAt", + "moderationGroupIds" + ], + "type": "object", + "additionalProperties": false }, - "Record_string.AggregationValue_": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/AggregationValue" + "GetModeratorResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "moderator": { + "$ref": "#/components/schemas/Moderator" + } }, + "required": [ + "status", + "moderator" + ], "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_" + "GetModeratorsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - { - "properties": { - "groups": { - "$ref": "#/components/schemas/GroupValues" - } + "moderators": { + "items": { + "$ref": "#/components/schemas/Moderator" }, - "type": "object" + "type": "array" } - ] + }, + "required": [ + "status", + "moderators" + ], + "type": "object", + "additionalProperties": false }, - "AggregationResponse": { - "description": "The API response returns the aggregated data along with simple stats", + "CreateModeratorResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "data": { + "moderator": { + "$ref": "#/components/schemas/Moderator" + } + }, + "required": [ + "status", + "moderator" + ], + "type": "object", + "additionalProperties": false + }, + "CreateModeratorBody": { + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "moderationGroupIds": { "items": { - "$ref": "#/components/schemas/AggregationItem" + "type": "string" }, "type": "array" + } + }, + "required": [ + "name", + "email" + ], + "type": "object", + "additionalProperties": {} + }, + "UpdateModeratorBody": { + "properties": { + "name": { + "type": "string" }, - "stats": { - "properties": { - "timeMS": { - "type": "integer", - "format": "int64" - }, - "scanned": { - "type": "integer", - "format": "int64" - } + "email": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "moderationGroupIds": { + "items": { + "type": "string" }, - "required": [ - "timeMS", - "scanned" - ], - "type": "object" + "type": "array" + } + }, + "type": "object", + "additionalProperties": {} + }, + "MeAuthType": { + "type": "string", + "enum": [ + "api-key", + "oauth" + ] + }, + "OAuthScope": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "GetMeResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "tenantId": { + "type": "string" + }, + "tenantName": { + "type": "string" + }, + "authType": { + "$ref": "#/components/schemas/MeAuthType", + "description": "Whether the request was authenticated with an API key or an OAuth access token." + }, + "scopes": { + "items": { + "$ref": "#/components/schemas/OAuthScope" + }, + "type": "array" + }, + "userId": { + "type": "string", + "description": "Only present for OAuth tokens: the user who authorized the application." + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" } }, "required": [ "status", - "data" + "tenantId", + "tenantName", + "authType", + "scopes" ], "type": "object", "additionalProperties": false }, - "AggregationAPIError": { + "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" }, - "reason": { - "type": "string" + "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-or-number-Array_" + }, + "poll": { + "$ref": "#/components/schemas/CommentPollInput" + }, + "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 + }, + "PageMigrationSuccess": { + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/PageMigrationType" + }, + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "commentsMigrated": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "from", + "to", + "type", + "status", + "commentsMigrated" + ], + "type": "object", + "additionalProperties": false + }, + "PageMigrationFailure": { + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/PageMigrationType" + }, + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "code": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "from", + "to", + "type", + "status", + "code", + "reason" + ], + "type": "object", + "additionalProperties": false + }, + "PageMigrationUndoCounts": { + "properties": { + "restored": { + "type": "integer", + "format": "int32", + "description": "Records put back to their pre-migration values." + }, + "skipped": { + "type": "integer", + "format": "int32", + "description": "Records left alone because they changed after the migration, or no longer exist." + }, + "notRestorable": { + "type": "integer", + "format": "int32", + "description": "Records a page merge or duplicate cleanup deleted during the migration. These cannot be brought back." + } + }, + "required": [ + "restored", + "skipped", + "notRestorable" + ], + "type": "object", + "additionalProperties": false + }, + "APIBatchJob": { + "properties": { + "pageMigrationUndoResult": { + "$ref": "#/components/schemas/PageMigrationUndoCounts", + "description": "undo-page-migration: set once the job has finished." + }, + "undoId": { + "type": "string", + "description": "migrate-pages: set once the job has finished. Pass to POST /api/v1/pages/migrations/{undoId}/undo within 90 days.\nundo-page-migration: the migration being undone." + }, + "pageMigrationResults": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PageMigrationSuccess" + }, + { + "$ref": "#/components/schemas/PageMigrationFailure" + } + ] + }, + "type": "array", + "description": "migrate-pages: one entry per finished migration, in request order." + }, + "totalCount": { + "type": "integer", + "format": "int32", + "description": "Total work, when known up front." + }, + "processedCount": { + "type": "integer", + "format": "int32", + "description": "Work done so far. The unit depends on the type: migrations finished for migrate-pages, records restored for\nundo-page-migration, rows for imports and exports." + }, + "completedAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string", + "description": "requested, running, success or failed." + }, + "type": { + "type": "string", + "description": "For example migrate-pages, undo-page-migration, export, import." + }, + "id": { + "type": "string" + } + }, + "required": [ + "processedCount", + "createdAt", + "status", + "type", + "id" + ], + "type": "object" + }, + "GetBatchJobsAPIResponse": { + "properties": { + "reason": { + "type": "string" + }, + "code": { + "type": "string" + }, + "batchJobs": { + "items": { + "$ref": "#/components/schemas/APIBatchJob" + }, + "type": "array", + "description": "Newest first, 100 per page." + }, + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "GetBatchJobAPIResponse": { + "properties": { + "reason": { + "type": "string" + }, + "code": { + "type": "string" + }, + "batchJob": { + "$ref": "#/components/schemas/APIBatchJob" + }, + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "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", + "nullable": true + }, + "serverStartDate": { + "type": "string", + "format": "date-time" + }, + "objectDetails": { + "allOf": [ + { + "$ref": "#/components/schemas/Record_string.any_" + } + ], + "nullable": true + }, + "targetId": { + "type": "string" + }, + "targetLabel": { + "type": "string" + }, + "ua": { + "type": "string" + }, + "sIdHashed": { + "type": "string" + } + }, + "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 + }, + "CreateAgentTenantResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "tenantId": { + "type": "string", + "description": "Pass as tenantId on every API and MCP call." + }, + "apiKey": { + "type": "string", + "description": "Full-access key for this tenant. Works immediately. Keep it secret." + }, + "claimUrl": { + "type": "string", + "description": "Give this to the human. Opening it while logged in attaches the tenant to their account." + }, + "expiresAt": { + "type": "string", + "description": "ISO date. The tenant and its key are deleted at this time unless claimed." + }, + "apiBaseUrl": { + "type": "string" + }, + "mcpUrl": { + "type": "string" + } + }, + "required": [ + "status", + "tenantId", + "apiKey", + "claimUrl", + "expiresAt", + "apiBaseUrl", + "mcpUrl" + ], + "type": "object", + "additionalProperties": false + }, + "CreateAgentTenantBody": { + "properties": { + "name": { + "type": "string", + "description": "Display name for the account. Defaults to the first domain." + }, + "domains": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Domains the comment widget will be embedded on, e.g. [\"example.com\"]. At most 5." + }, + "agent": { + "type": "string", + "description": "Free-form identifier of the agent making the request, e.g. \"claude-code\"." + } + }, + "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" + } }, - "code": { - "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" + } }, - "validResourceNames": { - "items": { + { + "description": "Page id that upload is happening from, to configure", + "in": "query", + "name": "urlId", + "required": false, + "schema": { "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" + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] } - ] - }, - "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" + } + } + }, + "/translations/{namespace}/{component}": { + "get": { + "operationId": "GetTranslations", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTranslationsResponse" + } + } + } }, - "op": { - "$ref": "#/components/schemas/AggregationOpType", - "description": "The type of operation" + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } }, - "alias": { - "type": "string", - "description": "Optional alias for the output; if not provided, a default alias is computed" + "500": { + "description": "Internal", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } }, - "expandArray": { - "type": "boolean" + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } } }, - "required": [ - "field", - "op" + "tags": [ + "Public" ], - "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" + "security": [], + "parameters": [ + { + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string" + } }, - "groupBy": { - "items": { + { + "in": "path", + "name": "component", + "required": true, + "schema": { "type": "string" - }, - "type": "array" + } }, - "operations": { - "items": { - "$ref": "#/components/schemas/AggregationOperation" - }, - "type": "array" + { + "in": "query", + "name": "locale", + "required": false, + "schema": { + "type": "string" + } }, - "sort": { - "properties": { - "dir": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "field": { - "type": "string" - } - }, - "required": [ - "dir", - "field" - ], - "type": "object" + { + "in": "query", + "name": "useFullTranslationIds", + "required": false, + "schema": { + "type": "boolean" + } } - }, - "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}": { + "/pages/{tenantId}": { "get": { - "operationId": "SearchUsers", + "operationId": "GetPagesPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SearchUsersResult" + "$ref": "#/components/schemas/GetPublicPagesResponse" } } } @@ -11544,6 +14050,7 @@ } } }, + "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" ], @@ -11558,65 +14065,74 @@ } }, { + "description": "Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`.", "in": "query", - "name": "urlId", - "required": true, + "name": "cursor", + "required": false, "schema": { "type": "string" } }, { + "description": "1..200, default 50", "in": "query", - "name": "usernameStartsWith", + "name": "limit", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { + "description": "Optional case-insensitive title prefix filter.", "in": "query", - "name": "mentionGroupIds", + "name": "q", "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } }, { + "description": "Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical).", "in": "query", - "name": "sso", + "name": "sortBy", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/PagesSortBy" } }, { + "description": "If true, only return pages with at least one comment.", "in": "query", - "name": "searchSection", + "name": "hasComments", "required": false, "schema": { - "type": "string", - "enum": [ - "fast", - "site" - ] + "type": "boolean" } } ] } }, - "/user-presence-status": { + "/pages/{tenantId}/users/online": { "get": { - "operationId": "GetUserPresenceStatuses", + "operationId": "GetOnlineUsers", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUserPresenceStatusesResponse" + "$ref": "#/components/schemas/PageUsersOnlineResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11642,13 +14158,14 @@ } } }, + "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": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -11656,17 +14173,28 @@ } }, { + "description": "Page URL identifier (cleaned server-side).", "in": "query", - "name": "urlIdWS", + "name": "urlId", "required": true, "schema": { "type": "string" } }, { + "description": "Cursor: pass nextAfterName from the previous response.", "in": "query", - "name": "userIds", - "required": true, + "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" } @@ -11674,16 +14202,36 @@ ] } }, - "/user-notifications": { + "/pages/{tenantId}/users/offline": { "get": { - "operationId": "GetUserNotifications", + "operationId": "GetOfflineUsers", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetMyNotificationsResponse" + "$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" } } } @@ -11699,13 +14247,14 @@ } } }, + "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": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -11713,91 +14262,27 @@ } }, { - "description": "Used to determine whether the current page is subscribed.", + "description": "Page URL identifier (cleaned server-side).", "in": "query", "name": "urlId", - "required": false, + "required": true, "schema": { "type": "string" } }, { + "description": "Cursor: pass nextAfterName from the previous response.", "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "afterId", + "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": "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", + "name": "afterUserId", "required": false, "schema": { "type": "string" @@ -11806,16 +14291,26 @@ ] } }, - "/user-notifications/reset": { - "post": { - "operationId": "ResetUserNotifications", + "/pages/{tenantId}/users/info": { + "get": { + "operationId": "GetUsersInfo", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetUserNotificationsResponse" + "$ref": "#/components/schemas/PageUsersInfoResponse" + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11831,13 +14326,14 @@ } } }, + "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": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -11845,50 +14341,10 @@ } }, { + "description": "Comma-delimited userIds.", "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, + "name": "ids", + "required": true, "schema": { "type": "string" } @@ -11896,16 +14352,16 @@ ] } }, - "/user-notifications/get-count": { + "/page-reacts/v1/likes/{tenantId}": { "get": { - "operationId": "GetUserNotificationCount", + "operationId": "GetV1PageLikes", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUserNotificationCountResponse" + "$ref": "#/components/schemas/GetV1PageLikes" } } } @@ -11927,13 +14383,21 @@ "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { "type": "string" } }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -11941,20 +14405,27 @@ "schema": { "type": "string" } + }, + { + "description": "When set, returns the users who liked the page (avatars and usernames). Only \"public\" is accepted, which omits private profiles.", + "in": "query", + "name": "includeUserInfo", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageReactIncludeUserInfo" + } } ] - } - }, - "/user-notifications/reset-count": { + }, "post": { - "operationId": "ResetUserNotificationCount", + "operationId": "CreateV1PageReact", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetUserNotificationsResponse" + "$ref": "#/components/schemas/CreateV1PageReact" } } } @@ -11976,13 +14447,29 @@ "security": [], "parameters": [ { - "in": "query", + "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" + } + }, { "in": "query", "name": "sso", @@ -11992,26 +14479,16 @@ } } ] - } - }, - "/user-notifications/{notificationId}/mark/{newStatus}": { - "post": { - "operationId": "UpdateUserNotificationStatus", + }, + "delete": { + "operationId": "DeleteV1PageReact", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "title": "UpdateUserNotificationStatusResponse", - "anyOf": [ - { - "$ref": "#/components/schemas/UserNotificationWriteResponse" - }, - { - "$ref": "#/components/schemas/IgnoredResponse" - } - ] + "$ref": "#/components/schemas/DeleteV1PageReact" } } } @@ -12033,7 +14510,7 @@ "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -12041,25 +14518,13 @@ } }, { - "in": "path", - "name": "notificationId", + "in": "query", + "name": "urlId", "required": true, "schema": { "type": "string" } }, - { - "in": "path", - "name": "newStatus", - "required": true, - "schema": { - "type": "string", - "enum": [ - "read", - "unread" - ] - } - }, { "in": "query", "name": "sso", @@ -12071,24 +14536,16 @@ ] } }, - "/user-notifications/{notificationId}/mark-opted/{optedInOrOut}": { - "post": { - "operationId": "UpdateUserNotificationCommentSubscriptionStatus", + "/page-reacts/v2/{tenantId}/list": { + "get": { + "operationId": "GetV2PageReactUsers", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "title": "UpdateUserNotificationCommentSubscriptionStatusResponse", - "anyOf": [ - { - "$ref": "#/components/schemas/UserNotificationWriteResponse" - }, - { - "$ref": "#/components/schemas/IgnoredResponse" - } - ] + "$ref": "#/components/schemas/GetV2PageReactUsersResponse" } } } @@ -12104,14 +14561,13 @@ } } }, - "description": "Enable or disable notifications for a specific comment.", "tags": [ "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -12119,28 +14575,16 @@ } }, { - "in": "path", - "name": "notificationId", + "in": "query", + "name": "urlId", "required": true, "schema": { "type": "string" } }, - { - "in": "path", - "name": "optedInOrOut", - "required": true, - "schema": { - "type": "string", - "enum": [ - "in", - "out" - ] - } - }, { "in": "query", - "name": "commentId", + "name": "id", "required": true, "schema": { "type": "string" @@ -12157,24 +14601,16 @@ ] } }, - "/user-notifications/set-subscription-state/{subscribedOrUnsubscribed}": { - "post": { - "operationId": "UpdateUserNotificationPageSubscriptionStatus", + "/page-reacts/v2/{tenantId}": { + "get": { + "operationId": "GetV2PageReacts", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "title": "UpdateUserNotificationPageSubscriptionStatusResponse", - "anyOf": [ - { - "$ref": "#/components/schemas/UserNotificationWriteResponse" - }, - { - "$ref": "#/components/schemas/IgnoredResponse" - } - ] + "$ref": "#/components/schemas/GetV2PageReacts" } } } @@ -12190,14 +14626,13 @@ } } }, - "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": { @@ -12214,59 +14649,47 @@ }, { "in": "query", - "name": "url", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "pageTitle", - "required": true, + "name": "sso", + "required": false, "schema": { "type": "string" } }, { - "in": "path", - "name": "subscribedOrUnsubscribed", - "required": true, - "schema": { - "type": "string", - "enum": [ - "subscribe", - "unsubscribe" - ] - } - }, - { + "description": "When set, returns the users for each react id (avatars and usernames). Only \"public\" is accepted, which omits private profiles.", "in": "query", - "name": "sso", + "name": "includeUserInfo", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/PageReactIncludeUserInfo" } } ] - } - }, - "/upload-image/{tenantId}": { + }, "post": { - "operationId": "UploadImage", + "operationId": "CreateV2PageReact", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UploadImageResponse" + "$ref": "#/components/schemas/CreateV2PageReact" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, - "description": "Upload and resize an image", "tags": [ "Public" ], @@ -12281,75 +14704,48 @@ } }, { - "description": "Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices)", "in": "query", - "name": "sizePreset", - "required": false, + "name": "urlId", + "required": true, "schema": { - "$ref": "#/components/schemas/SizePreset" + "type": "string" } }, { - "description": "Page id that upload is happening from, to configure", "in": "query", - "name": "urlId", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "title", "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - }, - "required": [ - "file" - ] - } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" } } - } - } - }, - "/translations/{namespace}/{component}": { - "get": { - "operationId": "GetTranslations", + ] + }, + "delete": { + "operationId": "DeleteV2PageReact", "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" + "$ref": "#/components/schemas/DeleteV2PageReact" } } } @@ -12372,15 +14768,15 @@ "parameters": [ { "in": "path", - "name": "namespace", + "name": "tenantId", "required": true, "schema": { "type": "string" } }, { - "in": "path", - "name": "component", + "in": "query", + "name": "urlId", "required": true, "schema": { "type": "string" @@ -12388,33 +14784,33 @@ }, { "in": "query", - "name": "locale", - "required": false, + "name": "id", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "useFullTranslationIds", + "name": "sso", "required": false, "schema": { - "type": "boolean" + "type": "string" } } ] } }, - "/pages/{tenantId}": { + "/auth/my-account/moderate-comments/mod_api/count": { "get": { - "operationId": "GetPagesPublic", + "operationId": "getCount", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetPublicPagesResponse" + "$ref": "#/components/schemas/ModerationAPICountCommentsResponse" } } } @@ -12430,14 +14826,13 @@ } } }, - "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" + "Moderation" ], "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -12445,84 +14840,66 @@ } }, { - "description": "Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`.", "in": "query", - "name": "cursor", + "name": "text-search", "required": false, "schema": { "type": "string" } }, { - "description": "1..200, default 50", "in": "query", - "name": "limit", + "name": "byIPFromComment", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "Optional case-insensitive title prefix filter.", "in": "query", - "name": "q", + "name": "filter", "required": false, "schema": { "type": "string" } }, { - "description": "Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical).", "in": "query", - "name": "sortBy", + "name": "searchFilters", "required": false, "schema": { - "$ref": "#/components/schemas/PagesSortBy" + "type": "string" } }, { - "description": "If true, only return pages with at least one comment.", "in": "query", - "name": "hasComments", + "name": "demo", "required": false, "schema": { "type": "boolean" } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } } ] } }, - "/pages/{tenantId}/users/online": { + "/auth/my-account/moderate-comments/mod_api/api/ids": { "get": { - "operationId": "GetOnlineUsers", + "operationId": "getApiIds", "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" + "$ref": "#/components/schemas/ModerationAPIGetCommentIdsResponse" } } } @@ -12538,14 +14915,13 @@ } } }, - "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" + "Moderation" ], "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -12553,116 +14929,56 @@ } }, { - "description": "Page URL identifier (cleaned server-side).", "in": "query", - "name": "urlId", - "required": true, + "name": "text-search", + "required": false, "schema": { "type": "string" } }, { - "description": "Cursor: pass nextAfterName from the previous response.", "in": "query", - "name": "afterName", + "name": "byIPFromComment", "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", + "name": "filters", "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, + "in": "query", + "name": "searchFilters", + "required": false, "schema": { "type": "string" } }, { - "description": "Page URL identifier (cleaned server-side).", "in": "query", - "name": "urlId", - "required": true, + "name": "afterId", + "required": false, "schema": { "type": "string" } }, { - "description": "Cursor: pass nextAfterName from the previous response.", "in": "query", - "name": "afterName", + "name": "demo", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { - "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", + "name": "sso", "required": false, "schema": { "type": "string" @@ -12671,26 +14987,16 @@ ] } }, - "/pages/{tenantId}/users/info": { + "/auth/my-account/moderate-comments/mod_api/api/comments": { "get": { - "operationId": "GetUsersInfo", + "operationId": "getApiComments", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageUsersInfoResponse" - } - } - } - }, - "422": { - "description": "Validation Failed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/ModerationAPIGetCommentsResponse" } } } @@ -12706,14 +15012,13 @@ } } }, - "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" + "Moderation" ], "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -12721,74 +15026,92 @@ } }, { - "description": "Comma-delimited userIds.", "in": "query", - "name": "ids", - "required": true, + "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" } - } - ] - } - }, - "/page-reacts/v1/likes/{tenantId}": { - "get": { - "operationId": "GetV1PageLikes", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetV1PageLikes" - } - } + }, + { + "in": "query", + "name": "byIPFromComment", + "required": false, + "schema": { + "type": "string" } }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } + { + "in": "query", + "name": "filters", + "required": false, + "schema": { + "type": "string" } - } - }, - "tags": [ - "Public" - ], - "security": [], - "parameters": [ + }, + { + "in": "query", + "name": "searchFilters", + "required": false, + "schema": { + "type": "string" + } + }, { - "in": "path", - "name": "tenantId", - "required": true, + "in": "query", + "name": "sorts", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "urlId", - "required": true, + "name": "demo", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, "schema": { "type": "string" } } ] - }, + } + }, + "/auth/my-account/moderate-comments/mod_api/api/export": { "post": { - "operationId": "CreateV1PageReact", + "operationId": "postApiExport", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateV1PageReact" + "$ref": "#/components/schemas/ModerationExportResponse" } } } @@ -12805,12 +15128,12 @@ } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -12819,63 +15142,48 @@ }, { "in": "query", - "name": "urlId", - "required": true, + "name": "text-search", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "title", + "name": "byIPFromComment", "required": false, "schema": { "type": "string" } - } - ] - }, - "delete": { - "operationId": "DeleteV1PageReact", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteV1PageReact" - } - } + }, + { + "in": "query", + "name": "filters", + "required": false, + "schema": { + "type": "string" } }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } + { + "in": "query", + "name": "searchFilters", + "required": false, + "schema": { + "type": "string" } - } - }, - "tags": [ - "Public" - ], - "security": [], - "parameters": [ + }, { - "in": "path", - "name": "tenantId", - "required": true, + "in": "query", + "name": "sorts", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "urlId", - "required": true, + "name": "sso", + "required": false, "schema": { "type": "string" } @@ -12883,16 +15191,16 @@ ] } }, - "/page-reacts/v2/{tenantId}/list": { + "/auth/my-account/moderate-comments/mod_api/api/export/status": { "get": { - "operationId": "GetV2PageReactUsers", + "operationId": "getApiExportStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetV2PageReactUsersResponse" + "$ref": "#/components/schemas/ModerationExportStatusResponse" } } } @@ -12909,12 +15217,12 @@ } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -12923,16 +15231,16 @@ }, { "in": "query", - "name": "urlId", - "required": true, + "name": "batchJobId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "id", - "required": true, + "name": "sso", + "required": false, "schema": { "type": "string" } @@ -12940,16 +15248,16 @@ ] } }, - "/page-reacts/v2/{tenantId}": { + "/auth/my-account/moderate-comments/mod_api/search/users": { "get": { - "operationId": "GetV2PageReacts", + "operationId": "getSearchUsers", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetV2PageReacts" + "$ref": "#/components/schemas/ModerationUserSearchResponse" } } } @@ -12966,12 +15274,12 @@ } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -12980,23 +15288,33 @@ }, { "in": "query", - "name": "urlId", - "required": true, + "name": "value", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, "schema": { "type": "string" } } ] - }, - "post": { - "operationId": "CreateV2PageReact", + } + }, + "/auth/my-account/moderate-comments/mod_api/search/pages": { + "get": { + "operationId": "getSearchPages", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateV2PageReact" + "$ref": "#/components/schemas/ModerationPageSearchResponse" } } } @@ -13013,21 +15331,13 @@ } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "query", - "name": "urlId", + "name": "tenantId", "required": true, "schema": { "type": "string" @@ -13035,31 +15345,33 @@ }, { "in": "query", - "name": "id", - "required": true, + "name": "value", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "title", + "name": "sso", "required": false, "schema": { "type": "string" } } ] - }, - "delete": { - "operationId": "DeleteV2PageReact", + } + }, + "/auth/my-account/moderate-comments/mod_api/search/sites": { + "get": { + "operationId": "getSearchSites", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteV2PageReact" + "$ref": "#/components/schemas/ModerationSiteSearchResponse" } } } @@ -13076,12 +15388,12 @@ } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -13090,16 +15402,16 @@ }, { "in": "query", - "name": "urlId", - "required": true, + "name": "value", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "id", - "required": true, + "name": "sso", + "required": false, "schema": { "type": "string" } @@ -13107,16 +15419,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/count": { + "/auth/my-account/moderate-comments/mod_api/search/comments/summary": { "get": { - "operationId": "getCount", + "operationId": "getSearchCommentsSummary", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationAPICountCommentsResponse" + "$ref": "#/components/schemas/ModerationCommentSearchResponse" } } } @@ -13147,15 +15459,7 @@ }, { "in": "query", - "name": "text-search", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "byIPFromComment", + "name": "value", "required": false, "schema": { "type": "string" @@ -13163,7 +15467,7 @@ }, { "in": "query", - "name": "filter", + "name": "filters", "required": false, "schema": { "type": "string" @@ -13177,14 +15481,6 @@ "type": "string" } }, - { - "in": "query", - "name": "demo", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "sso", @@ -13196,16 +15492,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/api/ids": { + "/auth/my-account/moderate-comments/mod_api/search/suggest": { "get": { - "operationId": "getApiIds", + "operationId": "getSearchSuggest", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationAPIGetCommentIdsResponse" + "$ref": "#/components/schemas/ModerationSuggestResponse" } } } @@ -13221,65 +15517,25 @@ } } }, - "tags": [ - "Moderation" - ], - "security": [], - "parameters": [ - { - "in": "query", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "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" - } - }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ { "in": "query", - "name": "afterId", - "required": false, + "name": "tenantId", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "demo", + "name": "text-search", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { @@ -13293,16 +15549,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/api/comments": { + "/auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId}": { "get": { - "operationId": "getApiComments", + "operationId": "getPreBanSummary", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationAPIGetCommentsResponse" + "$ref": "#/components/schemas/PreBanSummary" } } } @@ -13331,67 +15587,106 @@ "type": "string" } }, + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "page", + "name": "includeByUserIdAndEmail", "required": false, "schema": { - "format": "double", - "type": "number" + "type": "boolean" } }, { "in": "query", - "name": "count", + "name": "includeByIP", "required": false, "schema": { - "format": "double", - "type": "number" + "type": "boolean" } }, { "in": "query", - "name": "text-search", + "name": "includeByEmailDomain", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { "in": "query", - "name": "byIPFromComment", + "name": "sso", "required": false, "schema": { "type": "string" } + } + ] + } + }, + "/auth/my-account/moderate-comments/mod_api/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": "filters", - "required": false, + "name": "tenantId", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "searchFilters", + "name": "includeByUserIdAndEmail", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { "in": "query", - "name": "sorts", + "name": "includeByIP", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { "in": "query", - "name": "demo", + "name": "includeByEmailDomain", "required": false, "schema": { "type": "boolean" @@ -13405,19 +15700,29 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkPreBanParams" + } + } + } + } } }, - "/auth/my-account/moderate-comments/mod_api/api/export": { + "/auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId}": { "post": { - "operationId": "postApiExport", + "operationId": "postBanUserFromComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationExportResponse" + "$ref": "#/components/schemas/BanUserFromCommentResult" } } } @@ -13446,25 +15751,49 @@ "type": "string" } }, + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "text-search", + "name": "banEmail", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { "in": "query", - "name": "byIPFromComment", + "name": "banEmailDomain", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { "in": "query", - "name": "filters", + "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" @@ -13472,7 +15801,15 @@ }, { "in": "query", - "name": "searchFilters", + "name": "isShadowBan", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "updateId", "required": false, "schema": { "type": "string" @@ -13480,7 +15817,7 @@ }, { "in": "query", - "name": "sorts", + "name": "banReason", "required": false, "schema": { "type": "string" @@ -13497,16 +15834,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/api/export/status": { + "/auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId}": { "get": { - "operationId": "getApiExportStatus", + "operationId": "getBanUsersFromComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationExportStatusResponse" + "$ref": "#/components/schemas/GetBannedUsersFromCommentResponse" } } } @@ -13536,9 +15873,9 @@ } }, { - "in": "query", - "name": "batchJobId", - "required": false, + "in": "path", + "name": "commentId", + "required": true, "schema": { "type": "string" } @@ -13554,16 +15891,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/search/users": { - "get": { - "operationId": "getSearchUsers", + "/auth/my-account/moderate-comments/mod_api/ban-user/undo": { + "post": { + "operationId": "postBanUserUndo", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationUserSearchResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -13592,14 +15929,6 @@ "type": "string" } }, - { - "in": "query", - "name": "value", - "required": false, - "schema": { - "type": "string" - } - }, { "in": "query", "name": "sso", @@ -13608,19 +15937,37 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BanUserUndoParams" + } + } + } + } } }, - "/auth/my-account/moderate-comments/mod_api/search/pages": { - "get": { - "operationId": "getSearchPages", + "/auth/my-account/moderate-comments/mod_api/remove-comment/{commentId}": { + "post": { + "operationId": "postRemoveComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationPageSearchResponse" + "title": "PostRemoveCommentApiResponse", + "anyOf": [ + { + "$ref": "#/components/schemas/DeleteCommentResult" + }, + { + "$ref": "#/components/schemas/RemoveCommentActionResponse" + } + ] } } } @@ -13649,9 +15996,17 @@ "type": "string" } }, + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "value", + "name": "broadcastId", "required": false, "schema": { "type": "string" @@ -13668,16 +16023,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/search/sites": { - "get": { - "operationId": "getSearchSites", + "/auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId}": { + "post": { + "operationId": "postRestoreDeletedComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationSiteSearchResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -13706,9 +16061,17 @@ "type": "string" } }, + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "value", + "name": "broadcastId", "required": false, "schema": { "type": "string" @@ -13725,16 +16088,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/search/comments/summary": { - "get": { - "operationId": "getSearchCommentsSummary", + "/auth/my-account/moderate-comments/mod_api/flag-comment/{commentId}": { + "post": { + "operationId": "postFlagComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationCommentSearchResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -13753,35 +16116,27 @@ "tags": [ "Moderation" ], - "security": [], - "parameters": [ - { - "in": "query", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, + "security": [], + "parameters": [ { "in": "query", - "name": "value", - "required": false, + "name": "tenantId", + "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "filters", - "required": false, + "in": "path", + "name": "commentId", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "searchFilters", + "name": "broadcastId", "required": false, "schema": { "type": "string" @@ -13798,16 +16153,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/search/suggest": { - "get": { - "operationId": "getSearchSuggest", + "/auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId}": { + "post": { + "operationId": "postUnFlagComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationSuggestResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -13836,9 +16191,17 @@ "type": "string" } }, + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "text-search", + "name": "broadcastId", "required": false, "schema": { "type": "string" @@ -13855,16 +16218,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId}": { - "get": { - "operationId": "getPreBanSummary", + "/auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId}": { + "post": { + "operationId": "postSetCommentReviewStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreBanSummary" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -13903,15 +16266,7 @@ }, { "in": "query", - "name": "includeByUserIdAndEmail", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "includeByIP", + "name": "reviewed", "required": false, "schema": { "type": "boolean" @@ -13919,10 +16274,10 @@ }, { "in": "query", - "name": "includeByEmailDomain", + "name": "broadcastId", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { @@ -13936,16 +16291,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary": { + "/auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId}": { "post": { - "operationId": "postBulkPreBanSummary", + "operationId": "postSetCommentSpamStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkPreBanSummary" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -13974,9 +16329,17 @@ "type": "string" } }, + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "includeByUserIdAndEmail", + "name": "spam", "required": false, "schema": { "type": "boolean" @@ -13984,7 +16347,7 @@ }, { "in": "query", - "name": "includeByIP", + "name": "permNotSpam", "required": false, "schema": { "type": "boolean" @@ -13992,10 +16355,10 @@ }, { "in": "query", - "name": "includeByEmailDomain", + "name": "broadcastId", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { @@ -14006,29 +16369,19 @@ "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkPreBanParams" - } - } - } - } + ] } }, - "/auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId}": { "post": { - "operationId": "postBanUserFromComment", + "operationId": "postSetCommentApprovalStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BanUserFromCommentResult" + "$ref": "#/components/schemas/SetCommentApprovedResponse" } } } @@ -14067,23 +16420,7 @@ }, { "in": "query", - "name": "banEmail", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "banEmailDomain", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "banIP", + "name": "approved", "required": false, "schema": { "type": "boolean" @@ -14091,40 +16428,65 @@ }, { "in": "query", - "name": "deleteAllUsersComments", + "name": "broadcastId", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "bannedUntil", + "name": "sso", "required": false, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "isShadowBan", - "required": false, - "schema": { - "type": "boolean" + } + ] + } + }, + "/auth/my-account/moderate-comments/mod_api/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": "query", - "name": "updateId", - "required": false, + "name": "tenantId", + "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "banReason", - "required": false, + "in": "path", + "name": "commentId", + "required": true, "schema": { "type": "string" } @@ -14140,16 +16502,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/comment/{commentId}": { "get": { - "operationId": "getBanUsersFromComment", + "operationId": "getModerationComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetBannedUsersFromCommentResponse" + "$ref": "#/components/schemas/ModerationAPICommentResponse" } } } @@ -14186,6 +16548,22 @@ "type": "string" } }, + { + "in": "query", + "name": "includeEmail", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeIP", + "required": false, + "schema": { + "type": "boolean" + } + }, { "in": "query", "name": "sso", @@ -14197,16 +16575,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/ban-user/undo": { + "/auth/my-account/moderate-comments/mod_api/comments-by-ids": { "post": { - "operationId": "postBanUserUndo", + "operationId": "postCommentsByIds", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/ModerationAPIChildCommentsResponse" } } } @@ -14249,31 +16627,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BanUserUndoParams" + "$ref": "#/components/schemas/CommentsByIdsParams" } } } } } }, - "/auth/my-account/moderate-comments/mod_api/remove-comment/{commentId}": { - "post": { - "operationId": "postRemoveComment", + "/auth/my-account/moderate-comments/mod_api/comment-children/{commentId}": { + "get": { + "operationId": "getCommentChildren", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "title": "PostRemoveCommentApiResponse", - "anyOf": [ - { - "$ref": "#/components/schemas/DeleteCommentResult" - }, - { - "$ref": "#/components/schemas/RemoveCommentActionResponse" - } - ] + "$ref": "#/components/schemas/ModerationAPIChildCommentsResponse" } } } @@ -14310,14 +16680,6 @@ "type": "string" } }, - { - "in": "query", - "name": "broadcastId", - "required": false, - "schema": { - "type": "string" - } - }, { "in": "query", "name": "sso", @@ -14329,16 +16691,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId}": { - "post": { - "operationId": "postRestoreDeletedComment", + "/auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId}": { + "get": { + "operationId": "getModerationCommentText", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/GetCommentTextResponse" } } } @@ -14375,14 +16737,6 @@ "type": "string" } }, - { - "in": "query", - "name": "broadcastId", - "required": false, - "schema": { - "type": "string" - } - }, { "in": "query", "name": "sso", @@ -14394,16 +16748,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/flag-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId}": { "post": { - "operationId": "postFlagComment", + "operationId": "postSetCommentText", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/SetCommentTextResponse" } } } @@ -14456,19 +16810,29 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetCommentTextParams" + } + } + } + } } }, - "/auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId}": { "post": { - "operationId": "postUnFlagComment", + "operationId": "postAdjustCommentVotes", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/AdjustVotesResponse" } } } @@ -14521,19 +16885,29 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdjustCommentVotesParams" + } + } + } + } } }, - "/auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/vote/{commentId}": { "post": { - "operationId": "postSetCommentReviewStatus", + "operationId": "postVote", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/VoteResponse" } } } @@ -14572,10 +16946,10 @@ }, { "in": "query", - "name": "reviewed", + "name": "direction", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { @@ -14597,16 +16971,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId}": { - "post": { - "operationId": "postSetCommentSpamStatus", + "/auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId}": { + "delete": { + "operationId": "deleteModerationVote", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/VoteDeleteResponse" } } } @@ -14644,19 +17018,11 @@ } }, { - "in": "query", - "name": "spam", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "permNotSpam", - "required": false, + "in": "path", + "name": "voteId", + "required": true, "schema": { - "type": "boolean" + "type": "string" } }, { @@ -14678,16 +17044,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId}": { - "post": { - "operationId": "postSetCommentApprovalStatus", + "/auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId}": { + "get": { + "operationId": "getCommentBanStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetCommentApprovedResponse" + "$ref": "#/components/schemas/GetCommentBanStatusResponse" } } } @@ -14724,22 +17090,6 @@ "type": "string" } }, - { - "in": "query", - "name": "approved", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "broadcastId", - "required": false, - "schema": { - "type": "string" - } - }, { "in": "query", "name": "sso", @@ -14751,16 +17101,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/logs/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/user-ban-preference": { "get": { - "operationId": "getLogs", + "operationId": "getUserBanPreference", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationAPIGetLogsResponse" + "$ref": "#/components/schemas/APIModerateGetUserBanPreferencesResponse" } } } @@ -14789,14 +17139,6 @@ "type": "string" } }, - { - "in": "path", - "name": "commentId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "query", "name": "sso", @@ -14808,16 +17150,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/get-manual-badges": { "get": { - "operationId": "getModerationComment", + "operationId": "getManualBadges", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationAPICommentResponse" + "$ref": "#/components/schemas/GetTenantManualBadgesResponse" } } } @@ -14846,30 +17188,6 @@ "type": "string" } }, - { - "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", @@ -14881,16 +17199,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/comments-by-ids": { - "post": { - "operationId": "postCommentsByIds", + "/auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user": { + "get": { + "operationId": "getManualBadgesForUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationAPIChildCommentsResponse" + "$ref": "#/components/schemas/GetUserManualBadgesResponse" } } } @@ -14921,35 +17239,41 @@ }, { "in": "query", - "name": "sso", + "name": "badgesUserId", "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommentsByIdsParams" - } + }, + { + "in": "query", + "name": "commentId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" } } - } + ] } }, - "/auth/my-account/moderate-comments/mod_api/comment-children/{commentId}": { - "get": { - "operationId": "getCommentChildren", + "/auth/my-account/moderate-comments/mod_api/award-badge": { + "put": { + "operationId": "putAwardBadge", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModerationAPIChildCommentsResponse" + "$ref": "#/components/schemas/AwardUserBadgeResponse" } } } @@ -14979,13 +17303,37 @@ } }, { - "in": "path", - "name": "commentId", + "in": "query", + "name": "badgeId", "required": true, "schema": { "type": "string" } }, + { + "in": "query", + "name": "userId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "commentId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14997,16 +17345,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId}": { - "get": { - "operationId": "getModerationCommentText", + "/auth/my-account/moderate-comments/mod_api/remove-badge": { + "put": { + "operationId": "putRemoveBadge", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetCommentTextResponse" + "$ref": "#/components/schemas/RemoveUserBadgeResponse" } } } @@ -15036,13 +17384,37 @@ } }, { - "in": "path", - "name": "commentId", + "in": "query", + "name": "badgeId", "required": true, "schema": { "type": "string" } }, + { + "in": "query", + "name": "userId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "commentId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -15054,16 +17426,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId}": { - "post": { - "operationId": "postSetCommentText", + "/auth/my-account/moderate-comments/mod_api/get-trust-factor": { + "get": { + "operationId": "getTrustFactor", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetCommentTextResponse" + "$ref": "#/components/schemas/GetUserTrustFactorResponse" } } } @@ -15092,17 +17464,9 @@ "type": "string" } }, - { - "in": "path", - "name": "commentId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "query", - "name": "broadcastId", + "name": "userId", "required": false, "schema": { "type": "string" @@ -15116,29 +17480,19 @@ "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetCommentTextParams" - } - } - } - } + ] } }, - "/auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId}": { - "post": { - "operationId": "postAdjustCommentVotes", + "/auth/my-account/moderate-comments/mod_api/set-trust-factor": { + "put": { + "operationId": "setTrustFactor", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AdjustVotesResponse" + "$ref": "#/components/schemas/SetUserTrustFactorResponse" } } } @@ -15168,16 +17522,16 @@ } }, { - "in": "path", - "name": "commentId", - "required": true, + "in": "query", + "name": "userId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "broadcastId", + "name": "trustFactor", "required": false, "schema": { "type": "string" @@ -15191,29 +17545,19 @@ "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdjustCommentVotesParams" - } - } - } - } + ] } }, - "/auth/my-account/moderate-comments/mod_api/vote/{commentId}": { - "post": { - "operationId": "postVote", + "/auth/my-account/moderate-comments/mod_api/get-user-internal-profile": { + "get": { + "operationId": "getUserInternalProfile", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VoteResponse" + "$ref": "#/components/schemas/GetUserInternalProfileResponse" } } } @@ -15242,25 +17586,9 @@ "type": "string" } }, - { - "in": "path", - "name": "commentId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "direction", - "required": false, - "schema": { - "type": "string" - } - }, { "in": "query", - "name": "broadcastId", + "name": "commentId", "required": false, "schema": { "type": "string" @@ -15277,16 +17605,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId}": { - "delete": { - "operationId": "deleteModerationVote", + "/auth/my-account/moderate-comments/mod_api/reopen-thread": { + "put": { + "operationId": "putReopenThread", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VoteDeleteResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -15315,26 +17643,10 @@ "type": "string" } }, - { - "in": "path", - "name": "commentId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "voteId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "query", - "name": "broadcastId", - "required": false, + "name": "urlId", + "required": true, "schema": { "type": "string" } @@ -15350,16 +17662,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId}": { - "get": { - "operationId": "getCommentBanStatus", + "/auth/my-account/moderate-comments/mod_api/close-thread": { + "put": { + "operationId": "putCloseThread", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetCommentBanStatusResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -15389,8 +17701,8 @@ } }, { - "in": "path", - "name": "commentId", + "in": "query", + "name": "urlId", "required": true, "schema": { "type": "string" @@ -15407,16 +17719,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/user-ban-preference": { + "/auth/my-account/moderate-comments/banned-users/mod_api/counts": { "get": { - "operationId": "getUserBanPreference", + "operationId": "getCounts", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIModerateGetUserBanPreferencesResponse" + "$ref": "#/components/schemas/GetBannedUsersCountResponse" } } } @@ -15456,38 +17768,36 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/get-manual-badges": { + "/gifs/trending/{tenantId}": { "get": { - "operationId": "getManualBadges", + "operationId": "GetGifsTrending", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTenantManualBadgesResponse" - } - } - } - }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "title": "GetGifsTrendingResponse", + "anyOf": [ + { + "$ref": "#/components/schemas/GifSearchResponse" + }, + { + "$ref": "#/components/schemas/GifSearchInternalError" + } + ] } } } } }, "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -15496,25 +17806,60 @@ }, { "in": "query", - "name": "sso", + "name": "locale", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "rating", "required": false, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "double", + "type": "number" + } } ] } }, - "/auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user": { + "/gifs/search/{tenantId}": { "get": { - "operationId": "getManualBadgesForUser", + "operationId": "GetGifsSearch", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUserManualBadgesResponse" + "title": "GetGifsSearchResponse", + "anyOf": [ + { + "$ref": "#/components/schemas/GifSearchResponse" + }, + { + "$ref": "#/components/schemas/GifSearchInternalError" + } + ] + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15531,12 +17876,12 @@ } }, "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -15545,15 +17890,15 @@ }, { "in": "query", - "name": "badgesUserId", - "required": false, + "name": "search", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "commentId", + "name": "locale", "required": false, "schema": { "type": "string" @@ -15561,25 +17906,44 @@ }, { "in": "query", - "name": "sso", + "name": "rating", "required": false, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "double", + "type": "number" + } } ] } }, - "/auth/my-account/moderate-comments/mod_api/award-badge": { - "put": { - "operationId": "putAwardBadge", + "/gifs/get-large/{tenantId}": { + "get": { + "operationId": "GetGifLarge", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AwardUserBadgeResponse" + "$ref": "#/components/schemas/GifGetLargeResponse" + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15596,12 +17960,12 @@ } }, "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -15610,34 +17974,67 @@ }, { "in": "query", - "name": "badgeId", + "name": "largeInternalURLSanitized", "required": true, "schema": { "type": "string" } + } + ] + } + }, + "/flag-comment/{commentId}": { + "post": { + "operationId": "FlagCommentPublic", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ { "in": "query", - "name": "userId", - "required": false, + "name": "tenantId", + "required": true, "schema": { "type": "string" } }, { - "in": "query", + "in": "path", "name": "commentId", - "required": false, + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "broadcastId", - "required": false, + "name": "isFlagged", + "required": true, "schema": { - "type": "string" + "type": "boolean" } }, { @@ -15651,16 +18048,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/remove-badge": { - "put": { - "operationId": "putRemoveBadge", + "/feed-posts/{tenantId}": { + "get": { + "operationId": "GetFeedPostsPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RemoveUserBadgeResponse" + "$ref": "#/components/schemas/PublicFeedPostsResponse" } } } @@ -15676,13 +18073,14 @@ } } }, + "description": "\nreq\ntenantId\nafterId", "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -15691,31 +18089,35 @@ }, { "in": "query", - "name": "badgeId", - "required": true, + "name": "afterId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "userId", + "name": "limit", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "commentId", + "name": "tags", "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } }, { "in": "query", - "name": "broadcastId", + "name": "sso", "required": false, "schema": { "type": "string" @@ -15723,25 +18125,31 @@ }, { "in": "query", - "name": "sso", + "name": "isCrawler", "required": false, "schema": { - "type": "string" + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeUserInfo", + "required": false, + "schema": { + "type": "boolean" } } ] - } - }, - "/auth/my-account/moderate-comments/mod_api/get-trust-factor": { - "get": { - "operationId": "getTrustFactor", + }, + "post": { + "operationId": "CreateFeedPostPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUserTrustFactorResponse" + "$ref": "#/components/schemas/CreateFeedPostResponse" } } } @@ -15758,12 +18166,12 @@ } }, "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -15772,7 +18180,7 @@ }, { "in": "query", - "name": "userId", + "name": "broadcastId", "required": false, "schema": { "type": "string" @@ -15786,19 +18194,29 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFeedPostParams" + } + } + } + } } }, - "/auth/my-account/moderate-comments/mod_api/set-trust-factor": { - "put": { - "operationId": "setTrustFactor", + "/feed-posts/{tenantId}/react/{postId}": { + "post": { + "operationId": "ReactFeedPostPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetUserTrustFactorResponse" + "$ref": "#/components/schemas/ReactFeedPostResponse" } } } @@ -15815,29 +18233,37 @@ } }, "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { "type": "string" } }, + { + "in": "path", + "name": "postId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "userId", + "name": "isUndo", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { "in": "query", - "name": "trustFactor", + "name": "broadcastId", "required": false, "schema": { "type": "string" @@ -15851,19 +18277,29 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReactBodyParams" + } + } + } + } } }, - "/auth/my-account/moderate-comments/mod_api/get-user-internal-profile": { + "/feed-posts/{tenantId}/user-reacts": { "get": { - "operationId": "getUserInternalProfile", + "operationId": "GetUserReactsPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUserInternalProfileResponse" + "$ref": "#/components/schemas/UserReactsResponse" } } } @@ -15880,12 +18316,12 @@ } }, "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -15894,10 +18330,13 @@ }, { "in": "query", - "name": "commentId", + "name": "postIds", "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } }, { @@ -15911,16 +18350,16 @@ ] } }, - "/auth/my-account/moderate-comments/mod_api/reopen-thread": { + "/feed-posts/{tenantId}/{postId}": { "put": { - "operationId": "putReopenThread", + "operationId": "UpdateFeedPostPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/CreateFeedPostResponse" } } } @@ -15937,12 +18376,12 @@ } }, "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -15950,13 +18389,21 @@ } }, { - "in": "query", - "name": "urlId", + "in": "path", + "name": "postId", "required": true, "schema": { "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -15965,19 +18412,36 @@ "type": "string" } } - ] - } - }, - "/auth/my-account/moderate-comments/mod_api/close-thread": { - "put": { - "operationId": "putCloseThread", + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFeedPostParams" + } + } + } + } + }, + "delete": { + "operationId": "DeleteFeedPostPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "title": "DeleteFeedPostPublicResponse", + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "status" + ], + "type": "object" } } } @@ -15994,12 +18458,12 @@ } }, "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -16007,13 +18471,21 @@ } }, { - "in": "query", - "name": "urlId", + "in": "path", + "name": "postId", "required": true, "schema": { "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -16025,16 +18497,16 @@ ] } }, - "/auth/my-account/moderate-comments/banned-users/mod_api/counts": { + "/feed-posts/{tenantId}/stats": { "get": { - "operationId": "getCounts", + "operationId": "GetFeedPostsStats", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetBannedUsersCountResponse" + "$ref": "#/components/schemas/FeedPostsStatsResponse" } } } @@ -16051,18 +18523,29 @@ } }, "tags": [ - "Moderation" + "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { "type": "string" } }, + { + "in": "query", + "name": "postIds", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, { "in": "query", "name": "sso", @@ -16074,29 +18557,32 @@ ] } }, - "/gifs/trending/{tenantId}": { + "/event-log/{tenantId}": { "get": { - "operationId": "GetGifsTrending", + "operationId": "GetEventLog", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "title": "GetGifsTrendingResponse", - "anyOf": [ - { - "$ref": "#/components/schemas/GifSearchResponse" - }, - { - "$ref": "#/components/schemas/GifSearchInternalError" - } - ] + "$ref": "#/components/schemas/GetEventLogResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, + "description": "\nreq\ntenantId\nurlId\nuserIdWS", "tags": [ "Public" ], @@ -16112,60 +18598,51 @@ }, { "in": "query", - "name": "locale", - "required": false, + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "userIdWS", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "rating", - "required": false, + "name": "startTime", + "required": true, "schema": { - "type": "string" + "format": "int64", + "type": "integer" } }, { "in": "query", - "name": "page", + "name": "endTime", "required": false, "schema": { - "format": "double", - "type": "number" + "format": "int64", + "type": "integer" } } ] } }, - "/gifs/search/{tenantId}": { + "/event-log/global/{tenantId}": { "get": { - "operationId": "GetGifsSearch", + "operationId": "GetGlobalEventLog", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "title": "GetGifsSearchResponse", - "anyOf": [ - { - "$ref": "#/components/schemas/GifSearchResponse" - }, - { - "$ref": "#/components/schemas/GifSearchInternalError" - } - ] - } - } - } - }, - "422": { - "description": "Validation Failed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/GetEventLogResponse" } } } @@ -16181,6 +18658,7 @@ } } }, + "description": "\nreq\ntenantId\nurlId\nuserIdWS", "tags": [ "Public" ], @@ -16196,7 +18674,7 @@ }, { "in": "query", - "name": "search", + "name": "urlId", "required": true, "schema": { "type": "string" @@ -16204,52 +18682,43 @@ }, { "in": "query", - "name": "locale", - "required": false, + "name": "userIdWS", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "rating", - "required": false, + "name": "startTime", + "required": true, "schema": { - "type": "string" + "format": "int64", + "type": "integer" } }, { "in": "query", - "name": "page", + "name": "endTime", "required": false, "schema": { - "format": "double", - "type": "number" + "format": "int64", + "type": "integer" } } ] } }, - "/gifs/get-large/{tenantId}": { + "/comments/{tenantId}/{commentId}/text": { "get": { - "operationId": "GetGifLarge", + "operationId": "GetCommentText", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GifGetLargeResponse" - } - } - } - }, - "422": { - "description": "Validation Failed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/PublicAPIGetCommentTextResponse" } } } @@ -16279,26 +18748,42 @@ } }, { - "in": "query", - "name": "largeInternalURLSanitized", + "in": "path", + "name": "commentId", "required": true, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "editKey", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } } ] } }, - "/flag-comment/{commentId}": { + "/comments/{tenantId}/{commentId}/update-text": { "post": { - "operationId": "FlagCommentPublic", + "operationId": "SetCommentText", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/PublicAPISetCommentTextResponse" } } } @@ -16320,7 +18805,7 @@ "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -16337,10 +18822,18 @@ }, { "in": "query", - "name": "isFlagged", + "name": "broadcastId", "required": true, "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "in": "query", + "name": "editKey", + "required": false, + "schema": { + "type": "string" } }, { @@ -16351,19 +18844,29 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentTextUpdateRequest" + } + } + } + } } }, - "/feed-posts/{tenantId}": { + "/comments-for-user": { "get": { - "operationId": "GetFeedPostsPublic", + "operationId": "GetCommentsForUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicFeedPostsResponse" + "$ref": "#/components/schemas/GetCommentsForUserResponse" } } } @@ -16379,83 +18882,81 @@ } } }, - "description": "\nreq\ntenantId\nafterId", "tags": [ "Public" ], "security": [], "parameters": [ { - "in": "path", - "name": "tenantId", - "required": true, + "in": "query", + "name": "userId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "afterId", + "name": "direction", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/SortDirections" } }, { "in": "query", - "name": "limit", + "name": "repliesToUserId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "tags", + "name": "page", "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "format": "double", + "type": "number" } }, { "in": "query", - "name": "sso", + "name": "includei10n", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { "in": "query", - "name": "isCrawler", + "name": "locale", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "includeUserInfo", + "name": "isCrawler", "required": false, "schema": { "type": "boolean" } } ] - }, - "post": { - "operationId": "CreateFeedPostPublic", + } + }, + "/comments/{tenantId}": { + "get": { + "operationId": "GetCommentsPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateFeedPostResponse" + "$ref": "#/components/schemas/GetCommentsResponseWithPresence_PublicComment_" } } } @@ -16471,6 +18972,7 @@ } } }, + "description": "\nreq\ntenantId\nurlId", "tags": [ "Public" ], @@ -16481,12 +18983,89 @@ "name": "tenantId", "required": true, "schema": { - "type": "string" + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "direction", + "required": false, + "schema": { + "$ref": "#/components/schemas/SortDirections" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "skip", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "skipChildren", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "limitChildren", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "countChildren", + "required": false, + "schema": { + "type": "boolean" } }, { "in": "query", - "name": "broadcastId", + "name": "fetchPageForCommentId", "required": false, "schema": { "type": "string" @@ -16494,74 +19073,47 @@ }, { "in": "query", - "name": "sso", + "name": "includeConfig", "required": false, "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFeedPostParams" - } + "type": "boolean" } - } - } - } - }, - "/feed-posts/{tenantId}/react/{postId}": { - "post": { - "operationId": "ReactFeedPostPublic", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReactFeedPostResponse" - } - } + }, + { + "in": "query", + "name": "countAll", + "required": false, + "schema": { + "type": "boolean" } }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } + { + "in": "query", + "name": "includei10n", + "required": false, + "schema": { + "type": "boolean" } - } - }, - "tags": [ - "Public" - ], - "security": [], - "parameters": [ + }, { - "in": "path", - "name": "tenantId", - "required": true, + "in": "query", + "name": "locale", + "required": false, "schema": { "type": "string" } }, { - "in": "path", - "name": "postId", - "required": true, + "in": "query", + "name": "modules", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "isUndo", + "name": "isCrawler", "required": false, "schema": { "type": "boolean" @@ -16569,142 +19121,67 @@ }, { "in": "query", - "name": "broadcastId", + "name": "includeNotificationCount", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { "in": "query", - "name": "sso", + "name": "asTree", "required": false, "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReactBodyParams" - } - } - } - } - } - }, - "/feed-posts/{tenantId}/user-reacts": { - "get": { - "operationId": "GetUserReactsPublic", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserReactsResponse" - } - } + "type": "boolean" } }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - }, - "tags": [ - "Public" - ], - "security": [], - "parameters": [ { - "in": "path", - "name": "tenantId", - "required": true, + "in": "query", + "name": "maxTreeDepth", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "postIds", + "name": "useFullTranslationIds", "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "boolean" } }, { "in": "query", - "name": "sso", + "name": "parentId", "required": false, "schema": { "type": "string" } - } - ] - } - }, - "/feed-posts/{tenantId}/{postId}": { - "put": { - "operationId": "UpdateFeedPostPublic", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFeedPostResponse" - } - } - } }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - }, - "tags": [ - "Public" - ], - "security": [], - "parameters": [ { - "in": "path", - "name": "tenantId", - "required": true, + "in": "query", + "name": "searchText", + "required": false, "schema": { "type": "string" } }, { - "in": "path", - "name": "postId", - "required": true, + "in": "query", + "name": "hashTags", + "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } }, { "in": "query", - "name": "broadcastId", + "name": "userId", "required": false, "schema": { "type": "string" @@ -16712,81 +19189,31 @@ }, { "in": "query", - "name": "sso", + "name": "customConfigStr", "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateFeedPostParams" - } - } - } - } - }, - "delete": { - "operationId": "DeleteFeedPostPublic", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "title": "DeleteFeedPostPublicResponse", - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - } - }, - "required": [ - "status" - ], - "type": "object" - } - } - } }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } - } - } - }, - "tags": [ - "Public" - ], - "security": [], - "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, + { + "in": "query", + "name": "afterCommentId", + "required": false, "schema": { "type": "string" } }, { - "in": "path", - "name": "postId", - "required": true, + "in": "query", + "name": "beforeCommentId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "broadcastId", + "name": "questionId", "required": false, "schema": { "type": "string" @@ -16794,25 +19221,24 @@ }, { "in": "query", - "name": "sso", + "name": "questionValue", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ] - } - }, - "/feed-posts/{tenantId}/stats": { - "get": { - "operationId": "GetFeedPostsStats", + }, + "post": { + "operationId": "CreateCommentPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedPostsStatsResponse" + "$ref": "#/components/schemas/SaveCommentsResponseWithPresence" } } } @@ -16843,13 +19269,26 @@ }, { "in": "query", - "name": "postIds", + "name": "urlId", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "in": "query", + "name": "broadcastId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sessionId", + "required": false, + "schema": { + "type": "string" } }, { @@ -16859,20 +19298,38 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "locale", + "required": false, + "schema": { + "type": "string" + } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentData" + } + } + } + } } }, - "/event-log/{tenantId}": { - "get": { - "operationId": "GetEventLog", + "/comments/{tenantId}/{commentId}": { + "delete": { + "operationId": "DeleteCommentPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetEventLogResponse" + "$ref": "#/components/schemas/PublicAPIDeleteCommentResponse" } } } @@ -16888,7 +19345,6 @@ } } }, - "description": "\nreq\ntenantId\nurlId\nuserIdWS", "tags": [ "Public" ], @@ -16903,8 +19359,8 @@ } }, { - "in": "query", - "name": "urlId", + "in": "path", + "name": "commentId", "required": true, "schema": { "type": "string" @@ -16912,7 +19368,7 @@ }, { "in": "query", - "name": "userIdWS", + "name": "broadcastId", "required": true, "schema": { "type": "string" @@ -16920,35 +19376,33 @@ }, { "in": "query", - "name": "startTime", - "required": true, + "name": "editKey", + "required": false, "schema": { - "format": "int64", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "endTime", + "name": "sso", "required": false, "schema": { - "format": "int64", - "type": "integer" + "type": "string" } } ] } }, - "/event-log/global/{tenantId}": { + "/check-blocked-comments": { "get": { - "operationId": "GetGlobalEventLog", + "operationId": "CheckedCommentsForBlocked", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetEventLogResponse" + "$ref": "#/components/schemas/CheckBlockedCommentsResponse" } } } @@ -16964,31 +19418,23 @@ } } }, - "description": "\nreq\ntenantId\nurlId\nuserIdWS", "tags": [ "Public" ], "security": [], "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "query", - "name": "urlId", + "name": "tenantId", "required": true, "schema": { "type": "string" } }, { + "description": "A comma separated list of comment ids.", "in": "query", - "name": "userIdWS", + "name": "commentIds", "required": true, "schema": { "type": "string" @@ -16996,35 +19442,25 @@ }, { "in": "query", - "name": "startTime", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "in": "query", - "name": "endTime", + "name": "sso", "required": false, "schema": { - "format": "int64", - "type": "integer" + "type": "string" } } ] } }, - "/comments/{tenantId}/{commentId}/text": { - "get": { - "operationId": "GetCommentText", + "/comments/{tenantId}/{commentId}/vote": { + "post": { + "operationId": "VoteComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicAPIGetCommentTextResponse" + "$ref": "#/components/schemas/VoteResponse" } } } @@ -17063,7 +19499,23 @@ }, { "in": "query", - "name": "editKey", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "broadcastId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sessionId", "required": false, "schema": { "type": "string" @@ -17077,19 +19529,29 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoteBodyParams" + } + } + } + } } }, - "/comments/{tenantId}/{commentId}/update-text": { - "post": { - "operationId": "SetCommentText", + "/comments/{tenantId}/{commentId}/vote/{voteId}": { + "delete": { + "operationId": "DeleteCommentVote", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicAPISetCommentTextResponse" + "$ref": "#/components/schemas/VoteDeleteResponse" } } } @@ -17126,6 +19588,22 @@ "type": "string" } }, + { + "in": "path", + "name": "voteId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "broadcastId", @@ -17150,29 +19628,19 @@ "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommentTextUpdateRequest" - } - } - } - } + ] } }, - "/comments-for-user": { + "/comments/{tenantId}/{commentId}/votes": { "get": { - "operationId": "GetCommentsForUser", + "operationId": "GetCommentVoteUserNames", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetCommentsForUserResponse" + "$ref": "#/components/schemas/GetCommentVoteUserNamesSuccessResponse" } } } @@ -17194,75 +19662,51 @@ "security": [], "parameters": [ { - "in": "query", - "name": "userId", - "required": false, + "in": "path", + "name": "tenantId", + "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "direction", - "required": false, - "schema": { - "$ref": "#/components/schemas/SortDirections" - } - }, - { - "in": "query", - "name": "repliesToUserId", - "required": false, + "in": "path", + "name": "commentId", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "double", - "type": "number" - } - }, - { - "in": "query", - "name": "includei10n", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "locale", - "required": false, + "name": "dir", + "required": true, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "isCrawler", + "name": "sso", "required": false, "schema": { - "type": "boolean" + "type": "string" } } ] } }, - "/comments/{tenantId}": { - "get": { - "operationId": "GetCommentsPublic", + "/comments/{tenantId}/translations": { + "post": { + "operationId": "TranslateComments", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetCommentsResponseWithPresence_PublicComment_" + "$ref": "#/components/schemas/CommentTranslationsResponse" } } } @@ -17278,7 +19722,7 @@ } } }, - "description": "\nreq\ntenantId\nurlId", + "description": "Translates the given comments into the widget locale. Only available when the matching widget\ncustomization rule has Comment Translation set to Automatic or Manual.", "tags": [ "Public" ], @@ -17300,23 +19744,6 @@ "type": "string" } }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "direction", - "required": false, - "schema": { - "$ref": "#/components/schemas/SortDirections" - } - }, { "in": "query", "name": "sso", @@ -17327,207 +19754,165 @@ }, { "in": "query", - "name": "skip", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "skipChildren", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "limitChildren", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "countChildren", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "fetchPageForCommentId", + "name": "locale", "required": false, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "includeConfig", - "required": false, - "schema": { - "type": "boolean" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentTranslationsRequest" + } } - }, - { - "in": "query", - "name": "countAll", - "required": false, - "schema": { - "type": "boolean" + } + } + } + }, + "/comments/{tenantId}/{commentId}/pin": { + "post": { + "operationId": "PinComment", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeCommentPinStatusResponse" + } + } } }, - { - "in": "query", - "name": "includei10n", - "required": false, - "schema": { - "type": "boolean" + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } } - }, + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ { - "in": "query", - "name": "locale", - "required": false, + "in": "path", + "name": "tenantId", + "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "modules", - "required": false, + "in": "path", + "name": "commentId", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "isCrawler", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "includeNotificationCount", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "asTree", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "maxTreeDepth", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "useFullTranslationIds", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "parentId", - "required": false, + "name": "broadcastId", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "searchText", + "name": "sso", "required": false, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "hashTags", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" + } + ] + } + }, + "/comments/{tenantId}/{commentId}/unpin": { + "post": { + "operationId": "UnPinComment", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeCommentPinStatusResponse" + } } } }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ { - "in": "query", - "name": "userId", - "required": false, + "in": "path", + "name": "tenantId", + "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "customConfigStr", - "required": false, + "in": "path", + "name": "commentId", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "afterCommentId", - "required": false, + "name": "broadcastId", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "beforeCommentId", + "name": "sso", "required": false, "schema": { "type": "string" } } ] - }, + } + }, + "/comments/{tenantId}/{commentId}/lock": { "post": { - "operationId": "CreateCommentPublic", + "operationId": "LockComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SaveCommentsResponseWithPresence" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -17557,8 +19942,8 @@ } }, { - "in": "query", - "name": "urlId", + "in": "path", + "name": "commentId", "required": true, "schema": { "type": "string" @@ -17572,14 +19957,6 @@ "type": "string" } }, - { - "in": "query", - "name": "sessionId", - "required": false, - "schema": { - "type": "string" - } - }, { "in": "query", "name": "sso", @@ -17588,29 +19965,19 @@ "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommentData" - } - } - } - } + ] } }, - "/comments/{tenantId}/{commentId}": { - "delete": { - "operationId": "DeleteCommentPublic", + "/comments/{tenantId}/{commentId}/unlock": { + "post": { + "operationId": "UnLockComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicAPIDeleteCommentResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -17655,14 +20022,6 @@ "type": "string" } }, - { - "in": "query", - "name": "editKey", - "required": false, - "schema": { - "type": "string" - } - }, { "in": "query", "name": "sso", @@ -17674,16 +20033,16 @@ ] } }, - "/check-blocked-comments": { - "get": { - "operationId": "CheckedCommentsForBlocked", + "/block-from-comment/{commentId}": { + "post": { + "operationId": "BlockFromCommentPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CheckBlockedCommentsResponse" + "$ref": "#/components/schemas/BlockSuccess" } } } @@ -17713,9 +20072,8 @@ } }, { - "description": "A comma separated list of comment ids.", - "in": "query", - "name": "commentIds", + "in": "path", + "name": "commentId", "required": true, "schema": { "type": "string" @@ -17729,19 +20087,27 @@ "type": "string" } } - ] - } - }, - "/comments/{tenantId}/{commentId}/vote": { - "post": { - "operationId": "VoteComment", + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicBlockFromCommentParams" + } + } + } + } + }, + "delete": { + "operationId": "UnBlockCommentPublic", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VoteResponse" + "$ref": "#/components/schemas/UnblockSuccess" } } } @@ -17763,7 +20129,7 @@ "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -17780,15 +20146,71 @@ }, { "in": "query", - "name": "urlId", - "required": true, + "name": "sso", + "required": false, "schema": { "type": "string" } - }, + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicBlockFromCommentParams" + } + } + } + } + } + }, + "/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", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionsAPIResponse" + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "parameters": [ { "in": "query", - "name": "broadcastId", + "name": "tenantId", "required": true, "schema": { "type": "string" @@ -17796,16 +20218,38 @@ }, { "in": "query", - "name": "sessionId", + "name": "userId", "required": false, "schema": { "type": "string" } - }, + } + ] + }, + "post": { + "operationId": "CreateSubscription", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionAPIResponse" + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "parameters": [ { "in": "query", - "name": "sso", - "required": false, + "name": "tenantId", + "required": true, "schema": { "type": "string" } @@ -17816,45 +20260,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VoteBodyParams" + "$ref": "#/components/schemas/CreateAPIUserSubscriptionData" } } } } } }, - "/comments/{tenantId}/{commentId}/vote/{voteId}": { - "delete": { - "operationId": "DeleteCommentVote", + "/api/v1/subscriptions/{id}": { + "patch": { + "operationId": "UpdateSubscription", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VoteDeleteResponse" - } - } - } - }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/UpdateSubscriptionAPIResponse" } } } } }, - "tags": [ - "Public" + "security": [ + { + "api_key": [] + } ], - "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -17863,15 +20298,7 @@ }, { "in": "path", - "name": "commentId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "voteId", + "name": "id", "required": true, "schema": { "type": "string" @@ -17879,31 +20306,63 @@ }, { "in": "query", - "name": "urlId", - "required": true, + "name": "userId", + "required": false, "schema": { "type": "string" } - }, + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAPIUserSubscriptionData" + } + } + } + } + }, + "delete": { + "operationId": "DeleteSubscription", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteSubscriptionAPIResponse" + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "parameters": [ { "in": "query", - "name": "broadcastId", + "name": "tenantId", "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "editKey", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "sso", + "name": "userId", "required": false, "schema": { "type": "string" @@ -17912,104 +20371,126 @@ ] } }, - "/comments/{tenantId}/{commentId}/votes": { + "/api/v1/sso-users": { "get": { - "operationId": "GetCommentVoteUserNames", + "operationId": "GetSSOUsers", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetCommentVoteUserNamesSuccessResponse" - } - } - } - }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "title": "GetSSOUsersResponse", + "properties": { + "users": { + "items": { + "$ref": "#/components/schemas/APISSOUser" + }, + "type": "array" + }, + "status": { + "type": "string" + } + }, + "required": [ + "users", + "status" + ], + "type": "object" } } } } }, - "tags": [ - "Public" + "security": [ + { + "api_key": [] + } ], - "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { "type": "string" } }, - { - "in": "path", - "name": "commentId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "query", - "name": "dir", - "required": true, + "name": "skip", + "required": false, "schema": { "format": "int32", "type": "integer" } - }, - { - "in": "query", - "name": "sso", - "required": false, - "schema": { - "type": "string" - } } ] - } - }, - "/comments/{tenantId}/{commentId}/pin": { + }, "post": { - "operationId": "PinComment", + "operationId": "AddSSOUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChangeCommentPinStatusResponse" + "$ref": "#/components/schemas/AddSSOUserAPIResponse" } } } - }, - "default": { - "description": "Error", + } + }, + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAPISSOUserData" + } + } + } + } + } + }, + "/api/v1/sso-users/by-id/{id}": { + "get": { + "operationId": "GetSSOUserById", + "responses": { + "200": { + "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/GetSSOUserByIdAPIResponse" } } } } }, - "tags": [ - "Public" + "security": [ + { + "api_key": [] + } ], - "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -18018,63 +20499,38 @@ }, { "in": "path", - "name": "commentId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "broadcastId", + "name": "id", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "sso", - "required": false, - "schema": { - "type": "string" - } } ] } }, - "/comments/{tenantId}/{commentId}/unpin": { - "post": { - "operationId": "UnPinComment", + "/api/v1/sso-users/by-email/{email}": { + "get": { + "operationId": "GetSSOUserByEmail", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChangeCommentPinStatusResponse" - } - } - } - }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/GetSSOUserByEmailAPIResponse" } } } } }, - "tags": [ - "Public" + "security": [ + { + "api_key": [] + } ], - "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -18083,63 +20539,38 @@ }, { "in": "path", - "name": "commentId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "broadcastId", + "name": "email", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "sso", - "required": false, - "schema": { - "type": "string" - } } ] } }, - "/comments/{tenantId}/{commentId}/lock": { - "post": { - "operationId": "LockComment", + "/api/v1/sso-users/{id}": { + "delete": { + "operationId": "DeleteSSOUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" - } - } - } - }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/DeleteSSOUserAPIResponse" } } } } }, - "tags": [ - "Public" + "security": [ + { + "api_key": [] + } ], - "security": [], "parameters": [ { - "in": "path", + "in": "query", "name": "tenantId", "required": true, "schema": { @@ -18148,7 +20579,7 @@ }, { "in": "path", - "name": "commentId", + "name": "id", "required": true, "schema": { "type": "string" @@ -18156,72 +20587,53 @@ }, { "in": "query", - "name": "broadcastId", - "required": true, + "name": "deleteComments", + "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { "in": "query", - "name": "sso", + "name": "commentDeleteMode", "required": false, "schema": { "type": "string" } } ] - } - }, - "/comments/{tenantId}/{commentId}/unlock": { - "post": { - "operationId": "UnLockComment", + }, + "patch": { + "operationId": "PatchSSOUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" - } - } - } - }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/PatchSSOUserAPIResponse" } } } } }, - "tags": [ - "Public" - ], - "security": [], - "parameters": [ + "security": [ { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, + "api_key": [] + } + ], + "parameters": [ { - "in": "path", - "name": "commentId", + "in": "query", + "name": "tenantId", "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "broadcastId", + "in": "path", + "name": "id", "required": true, "schema": { "type": "string" @@ -18229,44 +20641,43 @@ }, { "in": "query", - "name": "sso", + "name": "updateComments", "required": false, "schema": { - "type": "string" + "type": "boolean" } } - ] - } - }, - "/block-from-comment/{commentId}": { - "post": { - "operationId": "BlockFromCommentPublic", + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAPISSOUserData" + } + } + } + } + }, + "put": { + "operationId": "PutSSOUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BlockSuccess" - } - } - } - }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/PutSSOUserAPIResponse" } } } } }, - "tags": [ - "Public" + "security": [ + { + "api_key": [] + } ], - "security": [], "parameters": [ { "in": "query", @@ -18278,7 +20689,7 @@ }, { "in": "path", - "name": "commentId", + "name": "id", "required": true, "schema": { "type": "string" @@ -18286,10 +20697,10 @@ }, { "in": "query", - "name": "sso", + "name": "updateComments", "required": false, "schema": { - "type": "string" + "type": "boolean" } } ], @@ -18298,40 +20709,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicBlockFromCommentParams" + "$ref": "#/components/schemas/UpdateAPISSOUserData" } } } } - }, - "delete": { - "operationId": "UnBlockCommentPublic", + } + }, + "/api/v1/pages": { + "get": { + "operationId": "GetPages", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnblockSuccess" - } - } - } - }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/GetPagesAPIResponse" } } } } }, - "tags": [ - "Public" + "security": [ + { + "api_key": [] + } ], - "security": [], "parameters": [ { "in": "query", @@ -18340,19 +20744,33 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "commentId", - "required": true, - "schema": { - "type": "string" + } + ] + }, + "post": { + "operationId": "AddPage", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddPageAPIResponse" + } + } } - }, + } + }, + "security": [ + { + "api_key": [] + } + ], + "parameters": [ { "in": "query", - "name": "sso", - "required": false, + "name": "tenantId", + "required": true, "schema": { "type": "string" } @@ -18363,50 +20781,69 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicBlockFromCommentParams" + "$ref": "#/components/schemas/CreateAPIPageData" } } } } } }, - "/auth/logout": { - "put": { - "operationId": "LogoutPublic", + "/api/v1/pages/by-url-id": { + "get": { + "operationId": "GetPageByURLId", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/GetPageByURLIdAPIResponse" } } } } }, - "tags": [ - "Public" + "security": [ + { + "api_key": [] + } ], - "security": [], - "parameters": [] + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + } + ] } }, - "/api/v1/subscriptions": { + "/api/v1/pages/likes": { "get": { - "operationId": "GetSubscriptions", + "operationId": "GetPageLikes", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetSubscriptionsAPIResponse" + "$ref": "#/components/schemas/GetPageLikesAPIResponse" } } } } }, + "description": "Like count for a page, optionally with the users who liked it.", "security": [ { "api_key": [] @@ -18423,28 +20860,90 @@ }, { "in": "query", - "name": "userId", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "\"public\" omits users with private profiles, \"include-private\" includes them.", + "in": "query", + "name": "includeUserInfo", "required": false, + "schema": { + "$ref": "#/components/schemas/PageReactIncludeUserInfo" + } + } + ] + } + }, + "/api/v1/pages/reacts": { + "get": { + "operationId": "GetPageReacts", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPageReactsAPIResponse" + } + } + } + } + }, + "description": "Custom react counts for a page, optionally with the users who reacted.", + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, "schema": { "type": "string" } + }, + { + "description": "\"public\" omits users with private profiles, \"include-private\" includes them.", + "in": "query", + "name": "includeUserInfo", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageReactIncludeUserInfo" + } } ] - }, + } + }, + "/api/v1/pages/migrations": { "post": { - "operationId": "CreateSubscription", + "operationId": "MigratePages", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSubscriptionAPIResponse" + "$ref": "#/components/schemas/QueuePageMigrationJobAPIResponse" } } } } }, + "description": "Queues a batch job that moves comments, pages and related records from one urlId or domain to another.\n\"urlId\" migrations only match the exact urlId. \"domain\" migrations find/replace the value inside every urlId and url.\nPoll GET /api/v1/batch-jobs/{batchJobId}: once it is done it carries per-migration results and an undoId.", "security": [ { "api_key": [] @@ -18465,28 +20964,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAPIUserSubscriptionData" + "$ref": "#/components/schemas/MigrateAPIPagesData" } } } } } }, - "/api/v1/subscriptions/{id}": { - "patch": { - "operationId": "UpdateSubscription", + "/api/v1/pages/migrations/{undoId}/undo": { + "post": { + "operationId": "UndoPageMigrations", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriptionAPIResponse" + "$ref": "#/components/schemas/QueuePageMigrationJobAPIResponse" } } } } }, + "description": "Queues a batch job that reverses every migration from one migrate-pages job, newest first. Available for 90 days.\nRecords changed since the migration are left alone, so a later edit is never overwritten.\nPoll GET /api/v1/batch-jobs/{batchJobId} for the restored/skipped counts.", "security": [ { "api_key": [] @@ -18503,16 +21003,48 @@ }, { "in": "path", - "name": "id", + "name": "undoId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/api/v1/pages/{id}": { + "patch": { + "operationId": "PatchPage", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchPageAPIResponse" + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "tenantId", "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "userId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } @@ -18523,21 +21055,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAPIUserSubscriptionData" + "$ref": "#/components/schemas/UpdateAPIPageData" } } } } }, "delete": { - "operationId": "DeleteSubscription", + "operationId": "DeletePage", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSubscriptionAPIResponse" + "$ref": "#/components/schemas/DeletePageAPIResponse" } } } @@ -18564,49 +21096,36 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "userId", - "required": false, - "schema": { - "type": "string" - } } ] } }, - "/api/v1/sso-users": { + "/api/v1/webhooks": { "get": { - "operationId": "GetSSOUsers", + "operationId": "GetWebhooks", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "title": "GetSSOUsersResponse", - "properties": { - "users": { - "items": { - "$ref": "#/components/schemas/APISSOUser" - }, - "type": "array" - }, - "status": { - "type": "string" - } - }, - "required": [ - "users", - "status" - ], - "type": "object" + "$ref": "#/components/schemas/GetWebhooksResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, + "description": "Lists the webhooks configured for the tenant, both dashboard-managed rows and API subscriptions.", "security": [ { "api_key": [] @@ -18621,31 +21140,66 @@ "type": "string" } }, + { + "in": "query", + "name": "event", + "required": false, + "schema": { + "$ref": "#/components/schemas/WebhookEventName" + } + }, + { + "in": "query", + "name": "domain", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "source", + "required": false, + "schema": { + "$ref": "#/components/schemas/WebhookSource" + } + }, { "in": "query", "name": "skip", "required": false, "schema": { - "format": "int32", - "type": "integer" + "format": "double", + "type": "number" } } ] }, "post": { - "operationId": "AddSSOUser", + "operationId": "CreateWebhook", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddSSOUserAPIResponse" + "$ref": "#/components/schemas/CreateWebhookResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, + "description": "Subscribes a URL to a comment event (REST hook subscribe). Subscribing the same URL to the same\nevent and domain again returns the existing subscription. Deliveries are HMAC signed, see the\nwebhooks guide; the legacy `token` header is never sent to API subscriptions.", "security": [ { "api_key": [] @@ -18666,28 +21220,99 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAPISSOUserData" + "$ref": "#/components/schemas/CreateWebhookParams" } } } } } }, - "/api/v1/sso-users/by-id/{id}": { + "/api/v1/webhooks/sample-payloads": { "get": { - "operationId": "GetSSOUserById", + "operationId": "GetWebhookSamplePayloads", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetSSOUserByIdAPIResponse" + "$ref": "#/components/schemas/GetWebhookSamplePayloadsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "description": "Recent comments in exactly the shape webhook deliveries use, for building integrations (for example Zapier\nsample data). Every event delivers the same comment object, so `event` only has to be valid.", + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "event", + "required": false, + "schema": { + "$ref": "#/components/schemas/WebhookEventName" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + } + ] + } + }, + "/api/v1/webhooks/{id}": { + "delete": { + "operationId": "DeleteWebhook", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, + "description": "Unsubscribes (REST hook unsubscribe). Only subscriptions created through this API can be\ndeleted here; dashboard-managed webhooks are edited in the dashboard.", "security": [ { "api_key": [] @@ -18713,16 +21338,26 @@ ] } }, - "/api/v1/sso-users/by-email/{email}": { + "/api/v1/votes": { "get": { - "operationId": "GetSSOUserByEmail", + "operationId": "GetVotes", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetSSOUserByEmailAPIResponse" + "$ref": "#/components/schemas/GetVotesResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18743,26 +21378,34 @@ } }, { - "in": "path", - "name": "email", + "in": "query", + "name": "urlId", "required": true, "schema": { "type": "string" } } ] - } - }, - "/api/v1/sso-users/{id}": { - "delete": { - "operationId": "DeleteSSOUser", + }, + "post": { + "operationId": "CreateVote", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSSOUserAPIResponse" + "$ref": "#/components/schemas/VoteResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18783,8 +21426,8 @@ } }, { - "in": "path", - "name": "id", + "in": "query", + "name": "commentId", "required": true, "schema": { "type": "string" @@ -18792,31 +21435,55 @@ }, { "in": "query", - "name": "deleteComments", + "name": "direction", + "required": true, + "schema": { + "type": "string", + "enum": [ + "up", + "down" + ] + } + }, + { + "in": "query", + "name": "userId", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "commentDeleteMode", + "name": "anonUserId", "required": false, "schema": { "type": "string" } } ] - }, - "patch": { - "operationId": "PatchSSOUser", + } + }, + "/api/v1/votes/for-user": { + "get": { + "operationId": "GetVotesForUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchSSOUserAPIResponse" + "$ref": "#/components/schemas/GetVotesForUserResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18837,8 +21504,8 @@ } }, { - "in": "path", - "name": "id", + "in": "query", + "name": "urlId", "required": true, "schema": { "type": "string" @@ -18846,33 +21513,43 @@ }, { "in": "query", - "name": "updateComments", + "name": "userId", "required": false, "schema": { - "type": "boolean" + "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAPISSOUserData" - } + }, + { + "in": "query", + "name": "anonUserId", + "required": false, + "schema": { + "type": "string" } } - } - }, - "put": { - "operationId": "PutSSOUser", + ] + } + }, + "/api/v1/votes/{id}": { + "delete": { + "operationId": "DeleteVote", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PutSSOUserAPIResponse" + "$ref": "#/components/schemas/VoteDeleteResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18902,65 +21579,35 @@ }, { "in": "query", - "name": "updateComments", + "name": "editKey", "required": false, "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAPISSOUserData" - } + "type": "string" } } - } + ] } }, - "/api/v1/pages": { + "/api/v1/users/{id}": { "get": { - "operationId": "GetPages", + "operationId": "GetUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetPagesAPIResponse" + "$ref": "#/components/schemas/GetUserResponse" } } } - } - }, - "security": [ - { - "api_key": [] - } - ], - "parameters": [ - { - "in": "query", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "post": { - "operationId": "AddPage", - "responses": { - "200": { - "description": "Ok", + }, + "default": { + "description": "Error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddPageAPIResponse" + "$ref": "#/components/schemas/APIError" } } } @@ -18979,30 +21626,38 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAPIPageData" - } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, - "/api/v1/pages/by-url-id": { + "/api/v1/user-badges/{id}": { "get": { - "operationId": "GetPageByURLId", + "operationId": "GetUserBadge", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetPageByURLIdAPIResponse" + "$ref": "#/components/schemas/APIGetUserBadgeResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -19023,26 +21678,34 @@ } }, { - "in": "query", - "name": "urlId", + "in": "path", + "name": "id", "required": true, "schema": { "type": "string" } } ] - } - }, - "/api/v1/pages/{id}": { - "patch": { - "operationId": "PatchPage", + }, + "put": { + "operationId": "UpdateUserBadge", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchPageAPIResponse" + "$ref": "#/components/schemas/APIEmptySuccessResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -19076,21 +21739,31 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAPIPageData" + "$ref": "#/components/schemas/UpdateUserBadgeParams" } } } } }, "delete": { - "operationId": "DeletePage", + "operationId": "DeleteUserBadge", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeletePageAPIResponse" + "$ref": "#/components/schemas/APIEmptySuccessResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -19121,16 +21794,16 @@ ] } }, - "/api/v1/votes": { + "/api/v1/user-badges": { "get": { - "operationId": "GetVotes", + "operationId": "GetUserBadges", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetVotesResponse" + "$ref": "#/components/schemas/APIGetUserBadgesResponse" } } } @@ -19162,23 +21835,66 @@ }, { "in": "query", - "name": "urlId", - "required": true, + "name": "userId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "badgeId", + "required": false, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "type", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "displayedOnComments", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "skip", + "required": false, + "schema": { + "format": "double", + "type": "number" + } } ] }, "post": { - "operationId": "CreateVote", + "operationId": "CreateUserBadge", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VoteResponse" + "$ref": "#/components/schemas/APICreateUserBadgeResponse" } } } @@ -19207,56 +21923,30 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "commentId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "direction", - "required": true, - "schema": { - "type": "string", - "enum": [ - "up", - "down" - ] - } - }, - { - "in": "query", - "name": "userId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "anonUserId", - "required": false, - "schema": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserBadgeParams" + } } } - ] + } } }, - "/api/v1/votes/for-user": { + "/api/v1/user-badge-progress/{id}": { "get": { - "operationId": "GetVotesForUser", + "operationId": "GetUserBadgeProgressById", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetVotesForUserResponse" + "$ref": "#/components/schemas/APIGetUserBadgeProgressResponse" } } } @@ -19287,42 +21977,26 @@ } }, { - "in": "query", - "name": "urlId", + "in": "path", + "name": "id", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "userId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "anonUserId", - "required": false, - "schema": { - "type": "string" - } } ] } }, - "/api/v1/votes/{id}": { - "delete": { - "operationId": "DeleteVote", + "/api/v1/user-badge-progress": { + "get": { + "operationId": "GetUserBadgeProgressList", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VoteDeleteResponse" + "$ref": "#/components/schemas/APIGetUserBadgeProgressListResponse" } } } @@ -19353,34 +22027,44 @@ } }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "userId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "editKey", + "name": "limit", "required": false, "schema": { - "type": "string" + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "skip", + "required": false, + "schema": { + "format": "double", + "type": "number" } } ] } }, - "/api/v1/users/{id}": { + "/api/v1/user-badge-progress/user/{userId}": { "get": { - "operationId": "GetUser", + "operationId": "GetUserBadgeProgressByUserId", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUserResponse" + "$ref": "#/components/schemas/APIGetUserBadgeProgressResponse" } } } @@ -19412,7 +22096,7 @@ }, { "in": "path", - "name": "id", + "name": "userId", "required": true, "schema": { "type": "string" @@ -19421,16 +22105,16 @@ ] } }, - "/api/v1/user-badges/{id}": { + "/api/v1/tickets": { "get": { - "operationId": "GetUserBadge", + "operationId": "GetTickets", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIGetUserBadgeResponse" + "$ref": "#/components/schemas/GetTicketsResponse" } } } @@ -19461,24 +22145,51 @@ } }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "userId", + "required": false, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "state", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "skip", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "format": "double", + "type": "number" + } } ] }, - "put": { - "operationId": "UpdateUserBadge", + "post": { + "operationId": "CreateTicket", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptySuccessResponse" + "$ref": "#/components/schemas/CreateTicketResponse" } } } @@ -19509,8 +22220,8 @@ } }, { - "in": "path", - "name": "id", + "in": "query", + "name": "userId", "required": true, "schema": { "type": "string" @@ -19522,21 +22233,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateUserBadgeParams" + "$ref": "#/components/schemas/CreateTicketBody" } } } } - }, - "delete": { - "operationId": "DeleteUserBadge", + } + }, + "/api/v1/tickets/{id}": { + "get": { + "operationId": "GetTicket", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptySuccessResponse" + "$ref": "#/components/schemas/GetTicketResponse" } } } @@ -19573,20 +22286,28 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "userId", + "required": false, + "schema": { + "type": "string" + } } ] } }, - "/api/v1/user-badges": { - "get": { - "operationId": "GetUserBadges", + "/api/v1/tickets/{id}/state": { + "patch": { + "operationId": "ChangeTicketState", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIGetUserBadgesResponse" + "$ref": "#/components/schemas/ChangeTicketStateResponse" } } } @@ -19619,65 +22340,90 @@ { "in": "query", "name": "userId", - "required": false, + "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "badgeId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "type", - "required": false, - "schema": { - "format": "double", - "type": "number" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeTicketStateBody" + } } - }, - { - "in": "query", - "name": "displayedOnComments", - "required": false, - "schema": { - "type": "boolean" + } + } + } + }, + "/api/v1/tenants/{id}": { + "get": { + "operationId": "GetTenant", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTenantResponse" + } + } } }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "parameters": [ { "in": "query", - "name": "limit", - "required": false, + "name": "tenantId", + "required": true, "schema": { - "format": "double", - "type": "number" + "type": "string" } }, { - "in": "query", - "name": "skip", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "double", - "type": "number" + "type": "string" } } ] }, - "post": { - "operationId": "CreateUserBadge", + "patch": { + "operationId": "UpdateTenant", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APICreateUserBadgeResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -19706,6 +22452,14 @@ "schema": { "type": "string" } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -19713,23 +22467,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateUserBadgeParams" + "$ref": "#/components/schemas/UpdateTenantBody" } } } } - } - }, - "/api/v1/user-badge-progress/{id}": { - "get": { - "operationId": "GetUserBadgeProgressById", + }, + "delete": { + "operationId": "DeleteTenant", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIGetUserBadgeProgressResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -19766,20 +22518,28 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "sure", + "required": false, + "schema": { + "type": "string" + } } ] } }, - "/api/v1/user-badge-progress": { + "/api/v1/tenants": { "get": { - "operationId": "GetUserBadgeProgressList", + "operationId": "GetTenants", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIGetUserBadgeProgressListResponse" + "$ref": "#/components/schemas/GetTenantsResponse" } } } @@ -19811,21 +22571,12 @@ }, { "in": "query", - "name": "userId", + "name": "meta", "required": false, "schema": { "type": "string" } }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "format": "double", - "type": "number" - } - }, { "in": "query", "name": "skip", @@ -19836,18 +22587,16 @@ } } ] - } - }, - "/api/v1/user-badge-progress/user/{userId}": { - "get": { - "operationId": "GetUserBadgeProgressByUserId", + }, + "post": { + "operationId": "CreateTenant", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIGetUserBadgeProgressResponse" + "$ref": "#/components/schemas/CreateTenantResponse" } } } @@ -19876,28 +22625,30 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "userId", - "required": true, - "schema": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTenantBody" + } } } - ] + } } }, - "/api/v1/tickets": { + "/api/v1/tenant-users/{id}": { "get": { - "operationId": "GetTickets", + "operationId": "GetTenantUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTicketsResponse" + "$ref": "#/components/schemas/GetTenantUserResponse" } } } @@ -19928,51 +22679,24 @@ } }, { - "in": "query", - "name": "userId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "state", - "required": false, - "schema": { - "format": "double", - "type": "number" - } - }, - { - "in": "query", - "name": "skip", - "required": false, - "schema": { - "format": "double", - "type": "number" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "format": "double", - "type": "number" - } } ] }, - "post": { - "operationId": "CreateTicket", + "put": { + "operationId": "ReplaceTenantUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTicketResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -20003,12 +22727,20 @@ } }, { - "in": "query", - "name": "userId", + "in": "path", + "name": "id", "required": true, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "updateComments", + "required": false, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -20016,23 +22748,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTicketBody" + "$ref": "#/components/schemas/ReplaceTenantUserBody" } } } } - } - }, - "/api/v1/tickets/{id}": { - "get": { - "operationId": "GetTicket", + }, + "patch": { + "operationId": "UpdateTenantUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTicketResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -20072,25 +22802,33 @@ }, { "in": "query", - "name": "userId", + "name": "updateComments", "required": false, "schema": { "type": "string" } } - ] - } - }, - "/api/v1/tickets/{id}/state": { - "patch": { - "operationId": "ChangeTicketState", + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTenantUserBody" + } + } + } + } + }, + "delete": { + "operationId": "DeleteTenantUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChangeTicketStateResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -20121,44 +22859,42 @@ } }, { - "in": "query", - "name": "userId", + "in": "path", + "name": "id", "required": true, "schema": { "type": "string" } }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "deleteComments", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChangeTicketStateBody" - } + }, + { + "in": "query", + "name": "commentDeleteMode", + "required": false, + "schema": { + "type": "string" } } - } + ] } }, - "/api/v1/tenants/{id}": { + "/api/v1/tenant-users": { "get": { - "operationId": "GetTenant", + "operationId": "GetTenantUsers", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTenantResponse" + "$ref": "#/components/schemas/GetTenantUsersResponse" } } } @@ -20189,24 +22925,25 @@ } }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "skip", + "required": false, "schema": { - "type": "string" + "format": "double", + "type": "number" } } ] }, - "patch": { - "operationId": "UpdateTenant", + "post": { + "operationId": "CreateTenantUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/CreateTenantUserResponse" } } } @@ -20235,14 +22972,6 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { @@ -20250,14 +22979,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantBody" + "$ref": "#/components/schemas/CreateTenantUserBody" } } } } - }, - "delete": { - "operationId": "DeleteTenant", + } + }, + "/api/v1/tenant-users/{id}/send-login-link": { + "post": { + "operationId": "SendLoginLink", "responses": { "200": { "description": "Ok", @@ -20304,7 +23035,7 @@ }, { "in": "query", - "name": "sure", + "name": "redirectURL", "required": false, "schema": { "type": "string" @@ -20313,16 +23044,64 @@ ] } }, - "/api/v1/tenants": { + "/api/v1/tenant-packages/{id}": { "get": { - "operationId": "GetTenants", + "operationId": "GetTenantPackage", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTenantsResponse" + "$ref": "#/components/schemas/GetTenantPackageResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "put": { + "operationId": "ReplaceTenantPackage", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -20353,33 +23132,34 @@ } }, { - "in": "query", - "name": "meta", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "skip", - "required": false, - "schema": { - "format": "double", - "type": "number" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplaceTenantPackageBody" + } } } - ] + } }, - "post": { - "operationId": "CreateTenant", + "patch": { + "operationId": "UpdateTenantPackage", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTenantResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -20408,6 +23188,14 @@ "schema": { "type": "string" } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -20415,23 +23203,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTenantBody" + "$ref": "#/components/schemas/UpdateTenantPackageBody" } } } } - } - }, - "/api/v1/tenant-users/{id}": { - "get": { - "operationId": "GetTenantUser", + }, + "delete": { + "operationId": "DeleteTenantPackage", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTenantUserResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -20470,16 +23256,18 @@ } } ] - }, - "put": { - "operationId": "ReplaceTenantUser", + } + }, + "/api/v1/tenant-packages": { + "get": { + "operationId": "GetTenantPackages", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/GetTenantPackagesResponse" } } } @@ -20509,43 +23297,26 @@ "type": "string" } }, - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "query", - "name": "updateComments", + "name": "skip", "required": false, "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReplaceTenantUserBody" - } + "format": "double", + "type": "number" } } - } + ] }, - "patch": { - "operationId": "UpdateTenantUser", + "post": { + "operationId": "CreateTenantPackage", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/CreateTenantPackageResponse" } } } @@ -20574,22 +23345,6 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "updateComments", - "required": false, - "schema": { - "type": "string" - } } ], "requestBody": { @@ -20597,21 +23352,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantUserBody" + "$ref": "#/components/schemas/CreateTenantPackageBody" } } } } - }, - "delete": { - "operationId": "DeleteTenantUser", + } + }, + "/api/v1/tenant-daily-usage": { + "get": { + "operationId": "GetTenantDailyUsages", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/GetTenantDailyUsagesResponse" } } } @@ -20642,42 +23399,54 @@ } }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "yearNumber", + "required": false, "schema": { - "type": "string" + "format": "double", + "type": "number" } }, { "in": "query", - "name": "deleteComments", + "name": "monthNumber", "required": false, "schema": { - "type": "string" + "format": "double", + "type": "number" } }, { "in": "query", - "name": "commentDeleteMode", + "name": "dayNumber", "required": false, "schema": { - "type": "string" + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "skip", + "required": false, + "schema": { + "format": "double", + "type": "number" } } ] } }, - "/api/v1/tenant-users": { + "/api/v1/question-results/{id}": { "get": { - "operationId": "GetTenantUsers", + "operationId": "GetQuestionResult", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTenantUsersResponse" + "$ref": "#/components/schemas/GetQuestionResultResponse" } } } @@ -20708,25 +23477,24 @@ } }, { - "in": "query", - "name": "skip", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "double", - "type": "number" + "type": "string" } } ] }, - "post": { - "operationId": "CreateTenantUser", + "patch": { + "operationId": "UpdateQuestionResult", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTenantUserResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -20755,6 +23523,14 @@ "schema": { "type": "string" } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -20762,16 +23538,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTenantUserBody" + "$ref": "#/components/schemas/UpdateQuestionResultBody" } } } } - } - }, - "/api/v1/tenant-users/{id}/send-login-link": { - "post": { - "operationId": "SendLoginLink", + }, + "delete": { + "operationId": "DeleteQuestionResult", "responses": { "200": { "description": "Ok", @@ -20815,28 +23589,20 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "redirectURL", - "required": false, - "schema": { - "type": "string" - } } ] } }, - "/api/v1/tenant-packages/{id}": { + "/api/v1/question-results": { "get": { - "operationId": "GetTenantPackage", + "operationId": "GetQuestionResults", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTenantPackageResponse" + "$ref": "#/components/schemas/GetQuestionResultsResponse" } } } @@ -20867,82 +23633,65 @@ } }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "urlId", + "required": false, "schema": { "type": "string" } - } - ] - }, - "put": { - "operationId": "ReplaceTenantPackage", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" - } - } - } }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } + { + "in": "query", + "name": "userId", + "required": false, + "schema": { + "type": "string" } - } - }, - "security": [ + }, { - "api_key": [] - } - ], - "parameters": [ + "in": "query", + "name": "startDate", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "tenantId", - "required": true, + "name": "questionId", + "required": false, "schema": { "type": "string" } }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "questionIds", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReplaceTenantPackageBody" - } + }, + { + "in": "query", + "name": "skip", + "required": false, + "schema": { + "format": "double", + "type": "number" } } - } + ] }, - "patch": { - "operationId": "UpdateTenantPackage", + "post": { + "operationId": "CreateQuestionResult", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/CreateQuestionResultResponse" } } } @@ -20971,14 +23720,6 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { @@ -20986,21 +23727,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantPackageBody" + "$ref": "#/components/schemas/CreateQuestionResultBody" } } } } - }, - "delete": { - "operationId": "DeleteTenantPackage", + } + }, + "/api/v1/question-results-aggregation": { + "get": { + "operationId": "AggregateQuestionResults", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/AggregateQuestionResultsResponse" } } } @@ -21031,75 +23774,70 @@ } }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "questionId", + "required": false, "schema": { "type": "string" } - } - ] - } - }, - "/api/v1/tenant-packages": { - "get": { - "operationId": "GetTenantPackages", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTenantPackagesResponse" - } + }, + { + "in": "query", + "name": "questionIds", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } }, - "default": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIError" - } - } + { + "in": "query", + "name": "urlId", + "required": false, + "schema": { + "type": "string" } - } - }, - "security": [ + }, { - "api_key": [] - } - ], - "parameters": [ + "in": "query", + "name": "timeBucket", + "required": false, + "schema": { + "$ref": "#/components/schemas/AggregateTimeBucket" + } + }, { "in": "query", - "name": "tenantId", - "required": true, + "name": "startDate", + "required": false, "schema": { + "format": "date-time", "type": "string" } }, { "in": "query", - "name": "skip", + "name": "forceRecalculate", "required": false, "schema": { - "format": "double", - "type": "number" + "type": "boolean" } } ] - }, + } + }, + "/api/v1/question-results-aggregation/bulk": { "post": { - "operationId": "CreateTenantPackage", + "operationId": "BulkAggregateQuestionResults", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTenantPackageResponse" + "$ref": "#/components/schemas/BulkAggregateQuestionResultsResponse" } } } @@ -21128,6 +23866,14 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "forceRecalculate", + "required": false, + "schema": { + "type": "boolean" + } } ], "requestBody": { @@ -21135,23 +23881,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTenantPackageBody" + "$ref": "#/components/schemas/BulkAggregateQuestionResultsRequest" } } } } } }, - "/api/v1/tenant-daily-usage": { + "/api/v1/question-results-aggregation/combine/comments": { "get": { - "operationId": "GetTenantDailyUsages", + "operationId": "CombineCommentsWithQuestionResults", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTenantDailyUsagesResponse" + "$ref": "#/components/schemas/CombineQuestionResultsWithCommentsResponse" } } } @@ -21183,16 +23929,51 @@ }, { "in": "query", - "name": "yearNumber", + "name": "questionId", "required": false, "schema": { - "format": "double", - "type": "number" + "type": "string" } }, { "in": "query", - "name": "monthNumber", + "name": "questionIds", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "urlId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "startDate", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "in": "query", + "name": "forceRecalculate", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "minValue", "required": false, "schema": { "format": "double", @@ -21201,7 +23982,7 @@ }, { "in": "query", - "name": "dayNumber", + "name": "maxValue", "required": false, "schema": { "format": "double", @@ -21210,7 +23991,7 @@ }, { "in": "query", - "name": "skip", + "name": "limit", "required": false, "schema": { "format": "double", @@ -21220,16 +24001,16 @@ ] } }, - "/api/v1/question-results/{id}": { + "/api/v1/question-configs/{id}": { "get": { - "operationId": "GetQuestionResult", + "operationId": "GetQuestionConfig", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetQuestionResultResponse" + "$ref": "#/components/schemas/GetQuestionConfigResponse" } } } @@ -21270,7 +24051,7 @@ ] }, "patch": { - "operationId": "UpdateQuestionResult", + "operationId": "UpdateQuestionConfig", "responses": { "200": { "description": "Ok", @@ -21321,14 +24102,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateQuestionResultBody" + "$ref": "#/components/schemas/UpdateQuestionConfigBody" } } } } }, "delete": { - "operationId": "DeleteQuestionResult", + "operationId": "DeleteQuestionConfig", "responses": { "200": { "description": "Ok", @@ -21376,16 +24157,16 @@ ] } }, - "/api/v1/question-results": { + "/api/v1/question-configs": { "get": { - "operationId": "GetQuestionResults", + "operationId": "GetQuestionConfigs", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetQuestionResultsResponse" + "$ref": "#/components/schemas/GetQuestionConfigsResponse" } } } @@ -21399,58 +24180,18 @@ } } } - } - }, - "security": [ - { - "api_key": [] - } - ], - "parameters": [ - { - "in": "query", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "urlId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "userId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "startDate", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "questionId", - "required": false, - "schema": { - "type": "string" - } - }, + } + }, + "security": [ + { + "api_key": [] + } + ], + "parameters": [ { "in": "query", - "name": "questionIds", - "required": false, + "name": "tenantId", + "required": true, "schema": { "type": "string" } @@ -21467,14 +24208,14 @@ ] }, "post": { - "operationId": "CreateQuestionResult", + "operationId": "CreateQuestionConfig", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateQuestionResultResponse" + "$ref": "#/components/schemas/CreateQuestionConfigResponse" } } } @@ -21510,23 +24251,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateQuestionResultBody" + "$ref": "#/components/schemas/CreateQuestionConfigBody" } } } } } }, - "/api/v1/question-results-aggregation": { + "/api/v1/polls/{commentId}": { "get": { - "operationId": "AggregateQuestionResults", + "operationId": "GetPoll", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AggregateQuestionResultsResponse" + "$ref": "#/components/schemas/GetPollResponse" } } } @@ -21557,70 +24298,24 @@ } }, { - "in": "query", - "name": "questionId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "questionIds", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "in": "query", - "name": "urlId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "timeBucket", - "required": false, - "schema": { - "$ref": "#/components/schemas/AggregateTimeBucket" - } - }, - { - "in": "query", - "name": "startDate", - "required": false, + "in": "path", + "name": "commentId", + "required": true, "schema": { - "format": "date-time", "type": "string" } - }, - { - "in": "query", - "name": "forceRecalculate", - "required": false, - "schema": { - "type": "boolean" - } } ] - } - }, - "/api/v1/question-results-aggregation/bulk": { - "post": { - "operationId": "BulkAggregateQuestionResults", + }, + "put": { + "operationId": "PutPoll", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkAggregateQuestionResultsResponse" + "$ref": "#/components/schemas/SavePollResponse" } } } @@ -21636,6 +24331,7 @@ } } }, + "description": "Attach a poll to a comment, or set the full state of the poll it already has.\n\nOptions are matched by id: an option sent with the id of an existing option keeps its votes (and takes the\nnew label and position), an option sent without an id is added, and existing options left out of the list\nare removed along with the votes cast on them.\n\nKeeping no existing option ids on a poll that has votes deletes all of them, so that needs replaceVotes=true.", "security": [ { "api_key": [] @@ -21650,9 +24346,17 @@ "type": "string" } }, + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "forceRecalculate", + "name": "replaceVotes", "required": false, "schema": { "type": "boolean" @@ -21664,23 +24368,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkAggregateQuestionResultsRequest" + "$ref": "#/components/schemas/CommentPollPutInput" } } } } - } - }, - "/api/v1/question-results-aggregation/combine/comments": { - "get": { - "operationId": "CombineCommentsWithQuestionResults", + }, + "patch": { + "operationId": "PatchPoll", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CombineQuestionResultsWithCommentsResponse" + "$ref": "#/components/schemas/SavePollResponse" } } } @@ -21696,6 +24398,7 @@ } } }, + "description": "Edit a poll in place, keeping its tallies: change the question, relabel an option, close or reopen it,\nor change who may see the voters. Options are addressed by id - to add, remove or reorder them, PUT the full list.", "security": [ { "api_key": [] @@ -21711,89 +24414,34 @@ } }, { - "in": "query", - "name": "questionId", - "required": false, + "in": "path", + "name": "commentId", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "questionIds", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentPollPatch" } } - }, - { - "in": "query", - "name": "urlId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "startDate", - "required": false, - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "in": "query", - "name": "forceRecalculate", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "minValue", - "required": false, - "schema": { - "format": "double", - "type": "number" - } - }, - { - "in": "query", - "name": "maxValue", - "required": false, - "schema": { - "format": "double", - "type": "number" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "format": "double", - "type": "number" - } } - ] - } - }, - "/api/v1/question-configs/{id}": { - "get": { - "operationId": "GetQuestionConfig", + } + }, + "delete": { + "operationId": "DeletePoll", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetQuestionConfigResponse" + "$ref": "#/components/schemas/APIEmptyResponse" } } } @@ -21809,6 +24457,7 @@ } } }, + "description": "Remove a poll from its comment, along with every vote cast on it. The comment itself is left alone.", "security": [ { "api_key": [] @@ -21825,23 +24474,25 @@ }, { "in": "path", - "name": "id", + "name": "commentId", "required": true, "schema": { "type": "string" } } ] - }, - "patch": { - "operationId": "UpdateQuestionConfig", + } + }, + "/api/v1/poll-votes": { + "get": { + "operationId": "GetPollVotes", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/GetPollVotesResponse" } } } @@ -21857,6 +24508,7 @@ } } }, + "description": "The individual votes behind one poll's tallies, oldest first.\n\nA poll belongs to a comment, so votes are always read one poll at a time - commentId is required. That\nkeeps every query on the indexes the collection already has.\n\nObeys the poll's privacy: an anonymous poll's votes cannot be read (poll-anonymous), here or by id.", "security": [ { "api_key": [] @@ -21872,34 +24524,49 @@ } }, { - "in": "path", - "name": "id", + "in": "query", + "name": "commentId", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateQuestionConfigBody" - } + }, + { + "in": "query", + "name": "voterId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "optionId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "skip", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } } - } + ] }, - "delete": { - "operationId": "DeleteQuestionConfig", + "post": { + "operationId": "CreatePollVote", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIEmptyResponse" + "$ref": "#/components/schemas/CreatePollVoteResponse" } } } @@ -21915,6 +24582,7 @@ } } }, + "description": "Record a vote on a poll, or move an existing one to a different option. A voter has at most one vote per\npoll, so calling this again for the same voter moves their vote rather than adding one.\n\nThis obeys the site's poll settings: if voting is set to logged-in users only, a vote with just an\nanonUserId is rejected, and anonymous votes are rate limited per IP per poll.", "security": [ { "api_key": [] @@ -21928,28 +24596,30 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePollVoteBody" + } } } - ] + } } }, - "/api/v1/question-configs": { + "/api/v1/poll-votes/{id}": { "get": { - "operationId": "GetQuestionConfigs", + "operationId": "GetPollVote", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetQuestionConfigsResponse" + "$ref": "#/components/schemas/GetPollVoteResponse" } } } @@ -21980,25 +24650,24 @@ } }, { - "in": "query", - "name": "skip", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "double", - "type": "number" + "type": "string" } } ] }, - "post": { - "operationId": "CreateQuestionConfig", + "delete": { + "operationId": "DeletePollVote", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateQuestionConfigResponse" + "$ref": "#/components/schemas/DeletePollVoteResponse" } } } @@ -22014,6 +24683,7 @@ } } }, + "description": "Retract a vote. The option it was cast on gives its tally back.", "security": [ { "api_key": [] @@ -22027,18 +24697,16 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateQuestionConfigBody" - } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, "/api/v1/pending-webhook-events": { @@ -22944,6 +25612,49 @@ ] } }, + "/api/v1/me": { + "get": { + "operationId": "GetMe", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMeResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "description": "Identifies the credential in use: the tenant it belongs to and, for OAuth tokens, the user who authorized it.\nIntegrations use this to test a connection and label it.", + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, "/api/v1/hash-tags": { "get": { "operationId": "GetHashTags", @@ -25143,6 +27854,108 @@ } } }, + "/api/v1/batch-jobs": { + "get": { + "operationId": "GetBatchJobs", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetBatchJobsAPIResponse" + } + } + } + } + }, + "description": "The tenant's batch jobs (imports, exports, page migrations...), newest first.", + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Only jobs of this type, for example migrate-pages.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Only jobs in this status: requested, running, success or failed.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "How many jobs to skip, for paging.", + "in": "query", + "name": "skip", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + } + ] + } + }, + "/api/v1/batch-jobs/{id}": { + "get": { + "operationId": "GetBatchJob", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetBatchJobAPIResponse" + } + } + } + } + }, + "description": "Status, progress and, once done, the result of one batch job.", + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, "/api/v1/audit-logs": { "get": { "operationId": "GetAuditLogs", @@ -25175,6 +27988,7 @@ ], "parameters": [ { + "description": "The tenant to read audit logs for.", "in": "query", "name": "tenantId", "required": true, @@ -25183,24 +27997,27 @@ } }, { + "description": "How many logs to return. Max 10000, defaults to 1000.", "in": "query", "name": "limit", "required": false, "schema": { - "format": "double", - "type": "number" + "format": "int32", + "type": "integer" } }, { + "description": "How many logs to skip, for paging.", "in": "query", "name": "skip", "required": false, "schema": { - "format": "double", - "type": "number" + "format": "int32", + "type": "integer" } }, { + "description": "Sort direction on the event time. Defaults to DESC (newest first).", "in": "query", "name": "order", "required": false, @@ -25213,8 +28030,8 @@ "name": "after", "required": false, "schema": { - "format": "double", - "type": "number" + "format": "int64", + "type": "integer" } }, { @@ -25222,8 +28039,71 @@ "name": "before", "required": false, "schema": { - "format": "double", - "type": "number" + "format": "int64", + "type": "integer" + } + }, + { + "description": "Only return events performed by this username.", + "in": "query", + "name": "username", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Only return events from this IP address.", + "in": "query", + "name": "ip", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Only return events of this type: c, r, u, d, or login.", + "in": "query", + "name": "crudType", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Only return events for this resource, e.g. User or Moderator.", + "in": "query", + "name": "resourceName", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Only return events whose affected object has this id.", + "in": "query", + "name": "targetId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Case-insensitive substring match on the affected object's label, e.g. a username or email.", + "in": "query", + "name": "target", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Also return events from tenants this tenant manages.", + "in": "query", + "name": "includeManagedTenants", + "required": false, + "schema": { + "type": "boolean" } } ] @@ -25295,6 +28175,46 @@ } } } + }, + "/api/v1/agent-tenants": { + "post": { + "operationId": "CreateAgentTenant", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentTenantResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "description": "Creates a new trial account for an AI agent without a human signup. No API key is needed to call this.\n\nThe response contains the tenant id, an API key that works immediately against the REST API and the\nMCP server, and a claim URL. Give the claim URL to the human you are working for: opening it while\nlogged in to FastComments attaches the account to them. Unclaimed accounts, and their keys, are\ndeleted 72 hours after creation. Until claimed, the account has the standard trial limits.", + "security": [], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentTenantBody" + } + } + } + } + } } }, "servers": [ diff --git a/pubsub/README.md b/pubsub/README.md index 47237256..c22fb0c8 100644 --- a/pubsub/README.md +++ b/pubsub/README.md @@ -32,7 +32,7 @@ Then add the dependency: com.fastcomments pubsub - 3.0.1 + 3.1.0 ``` @@ -52,7 +52,7 @@ repositories { Then add the dependency: ```groovy -implementation 'com.fastcomments:pubsub:3.0.1' +implementation 'com.fastcomments:pubsub:3.1.0' ``` ## Key Components