mencoro 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +304 -0
  4. data/Rakefile +10 -0
  5. data/docs/AcceptedJobResource.md +22 -0
  6. data/docs/AccountApi.md +141 -0
  7. data/docs/AiResponseReportResource.md +28 -0
  8. data/docs/AiResponseResource.md +36 -0
  9. data/docs/AnalyticsApi.md +1320 -0
  10. data/docs/ApplyClusteringJobOutcome.md +26 -0
  11. data/docs/ApplyClusteringJobOutcomeClustersInner.md +22 -0
  12. data/docs/ApplyClusteringJobOutcomeFailedInner.md +22 -0
  13. data/docs/ApplyClusteringJobOutcomeSkippedClustersInner.md +20 -0
  14. data/docs/ApplyClusteringJobOutcomeSuccessfulInner.md +20 -0
  15. data/docs/AsyncJobResource.md +24 -0
  16. data/docs/BatchChangeTrackedQueryCheckFrequencyRequestData.md +20 -0
  17. data/docs/BatchChangeTrackedQueryPassesRequestData.md +20 -0
  18. data/docs/BatchCreateQueryClustersOutcome.md +20 -0
  19. data/docs/BatchCreateQueryClustersOutcomeFailedInner.md +22 -0
  20. data/docs/BatchCreateQueryClustersOutcomeSuccessfulInner.md +20 -0
  21. data/docs/BatchCreateQueryClustersRequestData.md +18 -0
  22. data/docs/BatchCreateTrackedQueriesRequestData.md +30 -0
  23. data/docs/BatchCreateTrackedQueriesResultResource.md +20 -0
  24. data/docs/BatchCreateTrackedQueriesResultResourceFailedInner.md +26 -0
  25. data/docs/BatchCreateTrackedQueriesResultResourceSuccessfulInner.md +24 -0
  26. data/docs/BatchForceCheckTrackedQueries200Response.md +20 -0
  27. data/docs/BatchForceCheckTrackedQueries200ResponseFailedInner.md +22 -0
  28. data/docs/BatchPauseTrackedQueries200Response.md +20 -0
  29. data/docs/BatchPauseTrackedQueries200ResponseFailedInner.md +22 -0
  30. data/docs/BatchPauseTrackedQueries200ResponseSuccessfulInner.md +18 -0
  31. data/docs/BatchResumeTrackedQueries200Response.md +20 -0
  32. data/docs/BatchTargetsRequestData.md +18 -0
  33. data/docs/BatchWriteOutcome.md +20 -0
  34. data/docs/BatchWriteOutcomeFailedInner.md +22 -0
  35. data/docs/BillingApi.md +77 -0
  36. data/docs/BrandProfileResource.md +24 -0
  37. data/docs/BulkAddClustersToTrackedQueries200Response.md +20 -0
  38. data/docs/BulkAddClustersToTrackedQueriesRequest.md +20 -0
  39. data/docs/BulkRemoveClustersFromTrackedQueries200Response.md +20 -0
  40. data/docs/BulkRemoveClustersFromTrackedQueriesRequest.md +20 -0
  41. data/docs/CapturesApi.md +267 -0
  42. data/docs/ChangeMemberRoleRequest.md +18 -0
  43. data/docs/ChangeTrackedQueryCheckFrequencyRequestData.md +18 -0
  44. data/docs/ChangeTrackedQueryPassesRequestData.md +18 -0
  45. data/docs/CitationResource.md +36 -0
  46. data/docs/ClusterMembershipRequestData.md +18 -0
  47. data/docs/ClustersApi.md +465 -0
  48. data/docs/CompetitorResource.md +24 -0
  49. data/docs/CreateCompetitorRequest.md +22 -0
  50. data/docs/CreateInvitation200Response.md +22 -0
  51. data/docs/CreateInvitation201Response.md +32 -0
  52. data/docs/CreateInvitationRequest.md +20 -0
  53. data/docs/CreateOrganization201Response.md +22 -0
  54. data/docs/CreateOrganizationRequest.md +18 -0
  55. data/docs/CreateProjectRequest.md +24 -0
  56. data/docs/CreateProjectRequestCompetitorsInner.md +22 -0
  57. data/docs/CreateQueryCluster409Response.md +22 -0
  58. data/docs/CreateQueryClusterRequest.md +18 -0
  59. data/docs/DeleteQueryCluster200Response.md +22 -0
  60. data/docs/DiscoveryApi.md +311 -0
  61. data/docs/EntitlementsResource.md +38 -0
  62. data/docs/GetAvailableFilters200Response.md +22 -0
  63. data/docs/GetAvailableFilters200ResponseClustersInner.md +20 -0
  64. data/docs/GetMeStats200Response.md +20 -0
  65. data/docs/GetMeStats200ResponseOrganizations.md +18 -0
  66. data/docs/GetMeStats200ResponseProjects.md +20 -0
  67. data/docs/GetMembershipStats200Response.md +30 -0
  68. data/docs/GetMentionSamples400Response.md +24 -0
  69. data/docs/GetMentionSamples400ResponseDetailsValueInner.md +22 -0
  70. data/docs/GetMetricGlossary200Response.md +18 -0
  71. data/docs/GetMetricGlossary200ResponseMetricsInner.md +30 -0
  72. data/docs/GetOrganizationOverview200Response.md +20 -0
  73. data/docs/GetOrganizationOverview200ResponseAggregate.md +30 -0
  74. data/docs/GetOrganizationOverview200ResponseProjectsInner.md +32 -0
  75. data/docs/GetOrganizationStats200Response.md +22 -0
  76. data/docs/GetOrganizationStats200ResponseInvitations.md +18 -0
  77. data/docs/GetOrganizationStats200ResponseMembers.md +18 -0
  78. data/docs/GetOrganizationStats200ResponseProjects.md +20 -0
  79. data/docs/GetShareOfVoiceFormula200Response.md +24 -0
  80. data/docs/GetTrackingCoverage200Response.md +30 -0
  81. data/docs/GetTrackingCoverage200ResponseSampleInner.md +28 -0
  82. data/docs/InvitationResource.md +30 -0
  83. data/docs/InvitationsApi.md +243 -0
  84. data/docs/JobsApi.md +79 -0
  85. data/docs/KeywordListingResource.md +88 -0
  86. data/docs/KeywordListingResourceMentionTypeCounts.md +26 -0
  87. data/docs/ListAiResponses200Response.md +20 -0
  88. data/docs/ListCompetitors200Response.md +20 -0
  89. data/docs/ListInvitations200Response.md +20 -0
  90. data/docs/ListKeywordListings200Response.md +24 -0
  91. data/docs/ListMembers200Response.md +20 -0
  92. data/docs/ListOrganizations200Response.md +20 -0
  93. data/docs/ListProjects200Response.md +20 -0
  94. data/docs/ListQueryClusters200Response.md +20 -0
  95. data/docs/ListSearchSnapshots200Response.md +20 -0
  96. data/docs/ListShoppingSnapshots200Response.md +20 -0
  97. data/docs/MeResource.md +34 -0
  98. data/docs/MemberResource.md +28 -0
  99. data/docs/MembersApi.md +391 -0
  100. data/docs/OperationEffect.md +22 -0
  101. data/docs/OrganizationOperationsApi.md +77 -0
  102. data/docs/OrganizationResource.md +32 -0
  103. data/docs/OrganizationsApi.md +807 -0
  104. data/docs/PreviewOrganizationOperation200Response.md +34 -0
  105. data/docs/PreviewOrganizationOperation200ResponseOrganization.md +20 -0
  106. data/docs/PreviewOrganizationOperationRequest.md +24 -0
  107. data/docs/ProjectDetailResource.md +32 -0
  108. data/docs/ProjectDetailResourceCompetitorsInner.md +24 -0
  109. data/docs/ProjectResource.md +50 -0
  110. data/docs/ProjectedMonthlyChecksResource.md +20 -0
  111. data/docs/ProjectsApi.md +999 -0
  112. data/docs/QueryClusterResource.md +22 -0
  113. data/docs/ReportAiResponseRequest.md +22 -0
  114. data/docs/SearchResultResource.md +32 -0
  115. data/docs/SearchSnapshotResource.md +28 -0
  116. data/docs/SearchTrackedQueries200Response.md +20 -0
  117. data/docs/ShoppingOfferResource.md +38 -0
  118. data/docs/ShoppingSnapshotResource.md +28 -0
  119. data/docs/StartBrandDiscoveryJobRequest.md +20 -0
  120. data/docs/StartBrandNameSuggestionJobRequest.md +24 -0
  121. data/docs/StartClusteringJobRequestData.md +22 -0
  122. data/docs/StartKeywordDiscoveryJobRequest.md +24 -0
  123. data/docs/StartPromptDiscoveryJobRequest.md +24 -0
  124. data/docs/SubmittedChecksResource.md +20 -0
  125. data/docs/SubscriptionResource.md +42 -0
  126. data/docs/TrackedQueriesApi.md +1549 -0
  127. data/docs/TrackedQueryCountResource.md +20 -0
  128. data/docs/TrackedQueryDetailResource.md +38 -0
  129. data/docs/TrackedQueryResource.md +52 -0
  130. data/docs/TrackedQueryUsageResource.md +18 -0
  131. data/docs/UpdateOrganizationRequest.md +22 -0
  132. data/docs/UpdateProjectBrandProfileRequest.md +20 -0
  133. data/docs/UpdateProjectRequest.md +18 -0
  134. data/git_push.sh +57 -0
  135. data/lib/mencoro/api/account_api.rb +136 -0
  136. data/lib/mencoro/api/analytics_api.rb +1555 -0
  137. data/lib/mencoro/api/billing_api.rb +85 -0
  138. data/lib/mencoro/api/captures_api.rb +338 -0
  139. data/lib/mencoro/api/clusters_api.rb +548 -0
  140. data/lib/mencoro/api/discovery_api.rb +360 -0
  141. data/lib/mencoro/api/invitations_api.rb +302 -0
  142. data/lib/mencoro/api/jobs_api.rb +91 -0
  143. data/lib/mencoro/api/members_api.rb +453 -0
  144. data/lib/mencoro/api/organization_operations_api.rb +90 -0
  145. data/lib/mencoro/api/organizations_api.rb +835 -0
  146. data/lib/mencoro/api/projects_api.rb +1158 -0
  147. data/lib/mencoro/api/tracked_queries_api.rb +1792 -0
  148. data/lib/mencoro/api_client.rb +441 -0
  149. data/lib/mencoro/api_error.rb +58 -0
  150. data/lib/mencoro/api_model_base.rb +88 -0
  151. data/lib/mencoro/configuration.rb +392 -0
  152. data/lib/mencoro/models/accepted_job_resource.rb +220 -0
  153. data/lib/mencoro/models/ai_response_report_resource.rb +311 -0
  154. data/lib/mencoro/models/ai_response_resource.rb +412 -0
  155. data/lib/mencoro/models/apply_clustering_job_outcome.rb +199 -0
  156. data/lib/mencoro/models/apply_clustering_job_outcome_clusters_inner.rb +165 -0
  157. data/lib/mencoro/models/apply_clustering_job_outcome_failed_inner.rb +165 -0
  158. data/lib/mencoro/models/apply_clustering_job_outcome_skipped_clusters_inner.rb +156 -0
  159. data/lib/mencoro/models/apply_clustering_job_outcome_successful_inner.rb +158 -0
  160. data/lib/mencoro/models/async_job_resource.rb +256 -0
  161. data/lib/mencoro/models/batch_change_tracked_query_check_frequency_request_data.rb +237 -0
  162. data/lib/mencoro/models/batch_change_tracked_query_passes_request_data.rb +231 -0
  163. data/lib/mencoro/models/batch_create_query_clusters_outcome.rb +163 -0
  164. data/lib/mencoro/models/batch_create_query_clusters_outcome_failed_inner.rb +165 -0
  165. data/lib/mencoro/models/batch_create_query_clusters_outcome_successful_inner.rb +156 -0
  166. data/lib/mencoro/models/batch_create_query_clusters_request_data.rb +186 -0
  167. data/lib/mencoro/models/batch_create_tracked_queries_request_data.rb +399 -0
  168. data/lib/mencoro/models/batch_create_tracked_queries_result_resource.rb +163 -0
  169. data/lib/mencoro/models/batch_create_tracked_queries_result_resource_failed_inner.rb +183 -0
  170. data/lib/mencoro/models/batch_create_tracked_queries_result_resource_successful_inner.rb +174 -0
  171. data/lib/mencoro/models/batch_force_check_tracked_queries200_response.rb +162 -0
  172. data/lib/mencoro/models/batch_force_check_tracked_queries200_response_failed_inner.rb +165 -0
  173. data/lib/mencoro/models/batch_pause_tracked_queries200_response.rb +162 -0
  174. data/lib/mencoro/models/batch_pause_tracked_queries200_response_failed_inner.rb +165 -0
  175. data/lib/mencoro/models/batch_pause_tracked_queries200_response_successful_inner.rb +147 -0
  176. data/lib/mencoro/models/batch_resume_tracked_queries200_response.rb +162 -0
  177. data/lib/mencoro/models/batch_targets_request_data.rb +186 -0
  178. data/lib/mencoro/models/batch_write_outcome.rb +163 -0
  179. data/lib/mencoro/models/batch_write_outcome_failed_inner.rb +166 -0
  180. data/lib/mencoro/models/brand_profile_resource.rb +235 -0
  181. data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries200_response.rb +162 -0
  182. data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries_request.rb +218 -0
  183. data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries200_response.rb +162 -0
  184. data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries_request.rb +218 -0
  185. data/lib/mencoro/models/change_member_role_request.rb +181 -0
  186. data/lib/mencoro/models/change_tracked_query_check_frequency_request_data.rb +190 -0
  187. data/lib/mencoro/models/change_tracked_query_passes_request_data.rb +184 -0
  188. data/lib/mencoro/models/citation_resource.rb +306 -0
  189. data/lib/mencoro/models/cluster_membership_request_data.rb +186 -0
  190. data/lib/mencoro/models/competitor_resource.rb +250 -0
  191. data/lib/mencoro/models/create_competitor_request.rb +247 -0
  192. data/lib/mencoro/models/create_invitation200_response.rb +202 -0
  193. data/lib/mencoro/models/create_invitation201_response.rb +347 -0
  194. data/lib/mencoro/models/create_invitation_request.rb +192 -0
  195. data/lib/mencoro/models/create_organization201_response.rb +166 -0
  196. data/lib/mencoro/models/create_organization_request.rb +175 -0
  197. data/lib/mencoro/models/create_project_request.rb +307 -0
  198. data/lib/mencoro/models/create_project_request_competitors_inner.rb +256 -0
  199. data/lib/mencoro/models/create_query_cluster409_response.rb +165 -0
  200. data/lib/mencoro/models/create_query_cluster_request.rb +167 -0
  201. data/lib/mencoro/models/delete_query_cluster200_response.rb +168 -0
  202. data/lib/mencoro/models/entitlements_resource.rb +328 -0
  203. data/lib/mencoro/models/get_available_filters200_response.rb +173 -0
  204. data/lib/mencoro/models/get_available_filters200_response_clusters_inner.rb +157 -0
  205. data/lib/mencoro/models/get_me_stats200_response.rb +156 -0
  206. data/lib/mencoro/models/get_me_stats200_response_organizations.rb +167 -0
  207. data/lib/mencoro/models/get_me_stats200_response_projects.rb +196 -0
  208. data/lib/mencoro/models/get_membership_stats200_response.rb +322 -0
  209. data/lib/mencoro/models/get_mention_samples400_response.rb +231 -0
  210. data/lib/mencoro/models/get_mention_samples400_response_details_value_inner.rb +168 -0
  211. data/lib/mencoro/models/get_metric_glossary200_response.rb +149 -0
  212. data/lib/mencoro/models/get_metric_glossary200_response_metrics_inner.rb +240 -0
  213. data/lib/mencoro/models/get_organization_overview200_response.rb +158 -0
  214. data/lib/mencoro/models/get_organization_overview200_response_aggregate.rb +209 -0
  215. data/lib/mencoro/models/get_organization_overview200_response_projects_inner.rb +218 -0
  216. data/lib/mencoro/models/get_organization_stats200_response.rb +165 -0
  217. data/lib/mencoro/models/get_organization_stats200_response_invitations.rb +167 -0
  218. data/lib/mencoro/models/get_organization_stats200_response_members.rb +167 -0
  219. data/lib/mencoro/models/get_organization_stats200_response_projects.rb +196 -0
  220. data/lib/mencoro/models/get_share_of_voice_formula200_response.rb +182 -0
  221. data/lib/mencoro/models/get_tracking_coverage200_response.rb +209 -0
  222. data/lib/mencoro/models/get_tracking_coverage200_response_sample_inner.rb +229 -0
  223. data/lib/mencoro/models/invitation_resource.rb +331 -0
  224. data/lib/mencoro/models/keyword_listing_resource.rb +798 -0
  225. data/lib/mencoro/models/keyword_listing_resource_mention_type_counts.rb +184 -0
  226. data/lib/mencoro/models/list_ai_responses200_response.rb +159 -0
  227. data/lib/mencoro/models/list_competitors200_response.rb +159 -0
  228. data/lib/mencoro/models/list_invitations200_response.rb +158 -0
  229. data/lib/mencoro/models/list_keyword_listings200_response.rb +180 -0
  230. data/lib/mencoro/models/list_members200_response.rb +158 -0
  231. data/lib/mencoro/models/list_organizations200_response.rb +158 -0
  232. data/lib/mencoro/models/list_projects200_response.rb +159 -0
  233. data/lib/mencoro/models/list_query_clusters200_response.rb +159 -0
  234. data/lib/mencoro/models/list_search_snapshots200_response.rb +159 -0
  235. data/lib/mencoro/models/list_shopping_snapshots200_response.rb +159 -0
  236. data/lib/mencoro/models/me_resource.rb +394 -0
  237. data/lib/mencoro/models/member_resource.rb +322 -0
  238. data/lib/mencoro/models/operation_effect.rb +204 -0
  239. data/lib/mencoro/models/organization_resource.rb +326 -0
  240. data/lib/mencoro/models/preview_organization_operation200_response.rb +236 -0
  241. data/lib/mencoro/models/preview_organization_operation200_response_organization.rb +158 -0
  242. data/lib/mencoro/models/preview_organization_operation_request.rb +213 -0
  243. data/lib/mencoro/models/project_detail_resource.rb +380 -0
  244. data/lib/mencoro/models/project_detail_resource_competitors_inner.rb +178 -0
  245. data/lib/mencoro/models/project_resource.rb +422 -0
  246. data/lib/mencoro/models/projected_monthly_checks_resource.rb +211 -0
  247. data/lib/mencoro/models/query_cluster_resource.rb +229 -0
  248. data/lib/mencoro/models/report_ai_response_request.rb +227 -0
  249. data/lib/mencoro/models/search_result_resource.rb +284 -0
  250. data/lib/mencoro/models/search_snapshot_resource.rb +302 -0
  251. data/lib/mencoro/models/search_tracked_queries200_response.rb +158 -0
  252. data/lib/mencoro/models/shopping_offer_resource.rb +381 -0
  253. data/lib/mencoro/models/shopping_snapshot_resource.rb +302 -0
  254. data/lib/mencoro/models/start_brand_discovery_job_request.rb +185 -0
  255. data/lib/mencoro/models/start_brand_name_suggestion_job_request.rb +287 -0
  256. data/lib/mencoro/models/start_clustering_job_request_data.rb +249 -0
  257. data/lib/mencoro/models/start_keyword_discovery_job_request.rb +266 -0
  258. data/lib/mencoro/models/start_prompt_discovery_job_request.rb +276 -0
  259. data/lib/mencoro/models/submitted_checks_resource.rb +195 -0
  260. data/lib/mencoro/models/subscription_resource.rb +362 -0
  261. data/lib/mencoro/models/tracked_query_count_resource.rb +193 -0
  262. data/lib/mencoro/models/tracked_query_detail_resource.rb +440 -0
  263. data/lib/mencoro/models/tracked_query_resource.rb +492 -0
  264. data/lib/mencoro/models/tracked_query_usage_resource.rb +175 -0
  265. data/lib/mencoro/models/update_organization_request.rb +195 -0
  266. data/lib/mencoro/models/update_project_brand_profile_request.rb +218 -0
  267. data/lib/mencoro/models/update_project_request.rb +182 -0
  268. data/lib/mencoro/version.rb +15 -0
  269. data/lib/mencoro.rb +169 -0
  270. data/mencoro.gemspec +41 -0
  271. data/spec/api/account_api_spec.rb +57 -0
  272. data/spec/api/analytics_api_spec.rb +318 -0
  273. data/spec/api/billing_api_spec.rb +47 -0
  274. data/spec/api/captures_api_spec.rb +93 -0
  275. data/spec/api/clusters_api_spec.rb +126 -0
  276. data/spec/api/discovery_api_spec.rb +94 -0
  277. data/spec/api/invitations_api_spec.rb +83 -0
  278. data/spec/api/jobs_api_spec.rb +48 -0
  279. data/spec/api/members_api_spec.rb +111 -0
  280. data/spec/api/organization_operations_api_spec.rb +47 -0
  281. data/spec/api/organizations_api_spec.rb +181 -0
  282. data/spec/api/projects_api_spec.rb +229 -0
  283. data/spec/api/tracked_queries_api_spec.rb +344 -0
  284. data/spec/models/accepted_job_resource_spec.rb +48 -0
  285. data/spec/models/ai_response_report_resource_spec.rb +70 -0
  286. data/spec/models/ai_response_resource_spec.rb +90 -0
  287. data/spec/models/apply_clustering_job_outcome_clusters_inner_spec.rb +48 -0
  288. data/spec/models/apply_clustering_job_outcome_failed_inner_spec.rb +48 -0
  289. data/spec/models/apply_clustering_job_outcome_skipped_clusters_inner_spec.rb +42 -0
  290. data/spec/models/apply_clustering_job_outcome_spec.rb +60 -0
  291. data/spec/models/apply_clustering_job_outcome_successful_inner_spec.rb +42 -0
  292. data/spec/models/async_job_resource_spec.rb +62 -0
  293. data/spec/models/batch_change_tracked_query_check_frequency_request_data_spec.rb +46 -0
  294. data/spec/models/batch_change_tracked_query_passes_request_data_spec.rb +42 -0
  295. data/spec/models/batch_create_query_clusters_outcome_failed_inner_spec.rb +48 -0
  296. data/spec/models/batch_create_query_clusters_outcome_spec.rb +42 -0
  297. data/spec/models/batch_create_query_clusters_outcome_successful_inner_spec.rb +42 -0
  298. data/spec/models/batch_create_query_clusters_request_data_spec.rb +36 -0
  299. data/spec/models/batch_create_tracked_queries_request_data_spec.rb +80 -0
  300. data/spec/models/batch_create_tracked_queries_result_resource_failed_inner_spec.rb +60 -0
  301. data/spec/models/batch_create_tracked_queries_result_resource_spec.rb +42 -0
  302. data/spec/models/batch_create_tracked_queries_result_resource_successful_inner_spec.rb +54 -0
  303. data/spec/models/batch_force_check_tracked_queries200_response_failed_inner_spec.rb +48 -0
  304. data/spec/models/batch_force_check_tracked_queries200_response_spec.rb +42 -0
  305. data/spec/models/batch_pause_tracked_queries200_response_failed_inner_spec.rb +48 -0
  306. data/spec/models/batch_pause_tracked_queries200_response_spec.rb +42 -0
  307. data/spec/models/batch_pause_tracked_queries200_response_successful_inner_spec.rb +36 -0
  308. data/spec/models/batch_resume_tracked_queries200_response_spec.rb +42 -0
  309. data/spec/models/batch_targets_request_data_spec.rb +36 -0
  310. data/spec/models/batch_write_outcome_failed_inner_spec.rb +48 -0
  311. data/spec/models/batch_write_outcome_spec.rb +42 -0
  312. data/spec/models/brand_profile_resource_spec.rb +54 -0
  313. data/spec/models/bulk_add_clusters_to_tracked_queries200_response_spec.rb +42 -0
  314. data/spec/models/bulk_add_clusters_to_tracked_queries_request_spec.rb +42 -0
  315. data/spec/models/bulk_remove_clusters_from_tracked_queries200_response_spec.rb +42 -0
  316. data/spec/models/bulk_remove_clusters_from_tracked_queries_request_spec.rb +42 -0
  317. data/spec/models/change_member_role_request_spec.rb +40 -0
  318. data/spec/models/change_tracked_query_check_frequency_request_data_spec.rb +40 -0
  319. data/spec/models/change_tracked_query_passes_request_data_spec.rb +36 -0
  320. data/spec/models/citation_resource_spec.rb +90 -0
  321. data/spec/models/cluster_membership_request_data_spec.rb +36 -0
  322. data/spec/models/competitor_resource_spec.rb +54 -0
  323. data/spec/models/create_competitor_request_spec.rb +48 -0
  324. data/spec/models/create_invitation200_response_spec.rb +52 -0
  325. data/spec/models/create_invitation201_response_spec.rb +86 -0
  326. data/spec/models/create_invitation_request_spec.rb +46 -0
  327. data/spec/models/create_organization201_response_spec.rb +48 -0
  328. data/spec/models/create_organization_request_spec.rb +36 -0
  329. data/spec/models/create_project_request_competitors_inner_spec.rb +48 -0
  330. data/spec/models/create_project_request_spec.rb +54 -0
  331. data/spec/models/create_query_cluster409_response_spec.rb +48 -0
  332. data/spec/models/create_query_cluster_request_spec.rb +36 -0
  333. data/spec/models/delete_query_cluster200_response_spec.rb +48 -0
  334. data/spec/models/entitlements_resource_spec.rb +104 -0
  335. data/spec/models/get_available_filters200_response_clusters_inner_spec.rb +42 -0
  336. data/spec/models/get_available_filters200_response_spec.rb +48 -0
  337. data/spec/models/get_me_stats200_response_organizations_spec.rb +36 -0
  338. data/spec/models/get_me_stats200_response_projects_spec.rb +42 -0
  339. data/spec/models/get_me_stats200_response_spec.rb +42 -0
  340. data/spec/models/get_membership_stats200_response_spec.rb +72 -0
  341. data/spec/models/get_mention_samples400_response_details_value_inner_spec.rb +48 -0
  342. data/spec/models/get_mention_samples400_response_spec.rb +54 -0
  343. data/spec/models/get_metric_glossary200_response_metrics_inner_spec.rb +76 -0
  344. data/spec/models/get_metric_glossary200_response_spec.rb +36 -0
  345. data/spec/models/get_organization_overview200_response_aggregate_spec.rb +72 -0
  346. data/spec/models/get_organization_overview200_response_projects_inner_spec.rb +78 -0
  347. data/spec/models/get_organization_overview200_response_spec.rb +42 -0
  348. data/spec/models/get_organization_stats200_response_invitations_spec.rb +36 -0
  349. data/spec/models/get_organization_stats200_response_members_spec.rb +36 -0
  350. data/spec/models/get_organization_stats200_response_projects_spec.rb +42 -0
  351. data/spec/models/get_organization_stats200_response_spec.rb +48 -0
  352. data/spec/models/get_share_of_voice_formula200_response_spec.rb +54 -0
  353. data/spec/models/get_tracking_coverage200_response_sample_inner_spec.rb +70 -0
  354. data/spec/models/get_tracking_coverage200_response_spec.rb +72 -0
  355. data/spec/models/invitation_resource_spec.rb +80 -0
  356. data/spec/models/keyword_listing_resource_mention_type_counts_spec.rb +60 -0
  357. data/spec/models/keyword_listing_resource_spec.rb +262 -0
  358. data/spec/models/list_ai_responses200_response_spec.rb +42 -0
  359. data/spec/models/list_competitors200_response_spec.rb +42 -0
  360. data/spec/models/list_invitations200_response_spec.rb +42 -0
  361. data/spec/models/list_keyword_listings200_response_spec.rb +54 -0
  362. data/spec/models/list_members200_response_spec.rb +42 -0
  363. data/spec/models/list_organizations200_response_spec.rb +42 -0
  364. data/spec/models/list_projects200_response_spec.rb +42 -0
  365. data/spec/models/list_query_clusters200_response_spec.rb +42 -0
  366. data/spec/models/list_search_snapshots200_response_spec.rb +42 -0
  367. data/spec/models/list_shopping_snapshots200_response_spec.rb +42 -0
  368. data/spec/models/me_resource_spec.rb +92 -0
  369. data/spec/models/member_resource_spec.rb +74 -0
  370. data/spec/models/operation_effect_spec.rb +48 -0
  371. data/spec/models/organization_resource_spec.rb +86 -0
  372. data/spec/models/preview_organization_operation200_response_organization_spec.rb +42 -0
  373. data/spec/models/preview_organization_operation200_response_spec.rb +84 -0
  374. data/spec/models/preview_organization_operation_request_spec.rb +58 -0
  375. data/spec/models/project_detail_resource_competitors_inner_spec.rb +54 -0
  376. data/spec/models/project_detail_resource_spec.rb +82 -0
  377. data/spec/models/project_resource_spec.rb +136 -0
  378. data/spec/models/projected_monthly_checks_resource_spec.rb +42 -0
  379. data/spec/models/query_cluster_resource_spec.rb +48 -0
  380. data/spec/models/report_ai_response_request_spec.rb +52 -0
  381. data/spec/models/search_result_resource_spec.rb +78 -0
  382. data/spec/models/search_snapshot_resource_spec.rb +66 -0
  383. data/spec/models/search_tracked_queries200_response_spec.rb +42 -0
  384. data/spec/models/shopping_offer_resource_spec.rb +96 -0
  385. data/spec/models/shopping_snapshot_resource_spec.rb +66 -0
  386. data/spec/models/start_brand_discovery_job_request_spec.rb +42 -0
  387. data/spec/models/start_brand_name_suggestion_job_request_spec.rb +54 -0
  388. data/spec/models/start_clustering_job_request_data_spec.rb +52 -0
  389. data/spec/models/start_keyword_discovery_job_request_spec.rb +54 -0
  390. data/spec/models/start_prompt_discovery_job_request_spec.rb +54 -0
  391. data/spec/models/submitted_checks_resource_spec.rb +42 -0
  392. data/spec/models/subscription_resource_spec.rb +120 -0
  393. data/spec/models/tracked_query_count_resource_spec.rb +42 -0
  394. data/spec/models/tracked_query_detail_resource_spec.rb +108 -0
  395. data/spec/models/tracked_query_resource_spec.rb +150 -0
  396. data/spec/models/tracked_query_usage_resource_spec.rb +36 -0
  397. data/spec/models/update_organization_request_spec.rb +48 -0
  398. data/spec/models/update_project_brand_profile_request_spec.rb +42 -0
  399. data/spec/models/update_project_request_spec.rb +36 -0
  400. data/spec/spec_helper.rb +111 -0
  401. metadata +641 -0
@@ -0,0 +1,548 @@
1
+ =begin
2
+ #Mencoro API
3
+
4
+ #Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@mencoro.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Mencoro
16
+ class ClustersApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Apply the result of a clustering job
23
+ # Minimum role: manager. Writes a completed clustering job onto the tracked queries it was computed for: it creates the clusters the job proposed that the project does not have yet, then assigns each tracked query according to the merge mode the job was started with — fill_gaps leaves already grouped queries alone, add_on_top only adds, full_regroup replaces a query's clusters with the proposed set and therefore REMOVES clusters that are not in it — but only for a tracked query the job actually returned an assignment for. A tracked query the job was started over and produced no assignment for is listed under `unassigned` and left exactly as it was, under every mode; it is not treated as \"belongs to no cluster\" and is never stripped. That matters most with restrictToExistingClusters, where the model is expected to return nothing for queries that fit no existing cluster. The body must be empty: the assignments, the target tracked queries and the mode all come from the job, so this call cannot apply something the job did not produce. Synchronous and partially successful — always 200, with each tracked query under `successful` or `failed`, and nothing rolled back because one failed. A job that is not completed, or one that produced no assignments, is refused with 409. Requires the write capability and an Idempotency-Key header; repeating the key returns the first answer rather than applying twice.
24
+ # @param organization_id [String]
25
+ # @param project_id [String]
26
+ # @param job_id [String] Must be a clustering job started for this organization and project.
27
+ # @param idempotency_key [String] Repeat it to retry a lost response without applying the job twice.
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [ApplyClusteringJobOutcome]
30
+ def apply_clustering_job(organization_id, project_id, job_id, idempotency_key, opts = {})
31
+ data, _status_code, _headers = apply_clustering_job_with_http_info(organization_id, project_id, job_id, idempotency_key, opts)
32
+ data
33
+ end
34
+
35
+ # Apply the result of a clustering job
36
+ # Minimum role: manager. Writes a completed clustering job onto the tracked queries it was computed for: it creates the clusters the job proposed that the project does not have yet, then assigns each tracked query according to the merge mode the job was started with — fill_gaps leaves already grouped queries alone, add_on_top only adds, full_regroup replaces a query's clusters with the proposed set and therefore REMOVES clusters that are not in it — but only for a tracked query the job actually returned an assignment for. A tracked query the job was started over and produced no assignment for is listed under `unassigned` and left exactly as it was, under every mode; it is not treated as \"belongs to no cluster\" and is never stripped. That matters most with restrictToExistingClusters, where the model is expected to return nothing for queries that fit no existing cluster. The body must be empty: the assignments, the target tracked queries and the mode all come from the job, so this call cannot apply something the job did not produce. Synchronous and partially successful — always 200, with each tracked query under `successful` or `failed`, and nothing rolled back because one failed. A job that is not completed, or one that produced no assignments, is refused with 409. Requires the write capability and an Idempotency-Key header; repeating the key returns the first answer rather than applying twice.
37
+ # @param organization_id [String]
38
+ # @param project_id [String]
39
+ # @param job_id [String] Must be a clustering job started for this organization and project.
40
+ # @param idempotency_key [String] Repeat it to retry a lost response without applying the job twice.
41
+ # @param [Hash] opts the optional parameters
42
+ # @return [Array<(ApplyClusteringJobOutcome, Integer, Hash)>] ApplyClusteringJobOutcome data, response status code and response headers
43
+ def apply_clustering_job_with_http_info(organization_id, project_id, job_id, idempotency_key, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: ClustersApi.apply_clustering_job ...'
46
+ end
47
+ # verify the required parameter 'organization_id' is set
48
+ if @api_client.config.client_side_validation && organization_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling ClustersApi.apply_clustering_job"
50
+ end
51
+ # verify the required parameter 'project_id' is set
52
+ if @api_client.config.client_side_validation && project_id.nil?
53
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ClustersApi.apply_clustering_job"
54
+ end
55
+ # verify the required parameter 'job_id' is set
56
+ if @api_client.config.client_side_validation && job_id.nil?
57
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling ClustersApi.apply_clustering_job"
58
+ end
59
+ # verify the required parameter 'idempotency_key' is set
60
+ if @api_client.config.client_side_validation && idempotency_key.nil?
61
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ClustersApi.apply_clustering_job"
62
+ end
63
+ # resource path
64
+ local_var_path = '/api/v1/organizations/{organizationId}/projects/{projectId}/clusters/jobs/{jobId}/apply'.sub('{organizationId}', CGI.escape(organization_id.to_s)).sub('{projectId}', CGI.escape(project_id.to_s)).sub('{jobId}', CGI.escape(job_id.to_s))
65
+
66
+ # query parameters
67
+ query_params = opts[:query_params] || {}
68
+
69
+ # header parameters
70
+ header_params = opts[:header_params] || {}
71
+ # HTTP header 'Accept' (if needed)
72
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
73
+ header_params[:'Idempotency-Key'] = idempotency_key
74
+
75
+ # form parameters
76
+ form_params = opts[:form_params] || {}
77
+
78
+ # http body (model)
79
+ post_body = opts[:debug_body]
80
+
81
+ # return_type
82
+ return_type = opts[:debug_return_type] || 'ApplyClusteringJobOutcome'
83
+
84
+ # auth_names
85
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
86
+
87
+ new_options = opts.merge(
88
+ :operation => :"ClustersApi.apply_clustering_job",
89
+ :header_params => header_params,
90
+ :query_params => query_params,
91
+ :form_params => form_params,
92
+ :body => post_body,
93
+ :auth_names => auth_names,
94
+ :return_type => return_type
95
+ )
96
+
97
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug "API called: ClustersApi#apply_clustering_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
100
+ end
101
+ return data, status_code, headers
102
+ end
103
+
104
+ # Create several keyword clusters at once
105
+ # Minimum role: manager. Creates up to 100 empty keyword clusters in one call. Names are trimmed and lower-cased and repeated names in the body are collapsed before anything is written. Partial success: the answer is always 200 and reports every name under `successful` or under `failed` — a name already taken in the project fails with query_cluster_name_already_exists and is NOT resolved to the existing cluster, while the other names are still created. Nothing is rolled back because one name failed. The clusters are created empty; no tracked query is assigned to them. The organization must not be archived; an archived project IS refused with 409, stricter than the Mencoro app, which lets cluster writes into one. Requires the write capability and an Idempotency-Key header.
106
+ # @param organization_id [String]
107
+ # @param project_id [String]
108
+ # @param idempotency_key [String] Repeat it to retry a lost response without creating the batch twice.
109
+ # @param batch_create_query_clusters_request_data [BatchCreateQueryClustersRequestData]
110
+ # @param [Hash] opts the optional parameters
111
+ # @return [BatchCreateQueryClustersOutcome]
112
+ def batch_create_query_clusters(organization_id, project_id, idempotency_key, batch_create_query_clusters_request_data, opts = {})
113
+ data, _status_code, _headers = batch_create_query_clusters_with_http_info(organization_id, project_id, idempotency_key, batch_create_query_clusters_request_data, opts)
114
+ data
115
+ end
116
+
117
+ # Create several keyword clusters at once
118
+ # Minimum role: manager. Creates up to 100 empty keyword clusters in one call. Names are trimmed and lower-cased and repeated names in the body are collapsed before anything is written. Partial success: the answer is always 200 and reports every name under &#x60;successful&#x60; or under &#x60;failed&#x60; — a name already taken in the project fails with query_cluster_name_already_exists and is NOT resolved to the existing cluster, while the other names are still created. Nothing is rolled back because one name failed. The clusters are created empty; no tracked query is assigned to them. The organization must not be archived; an archived project IS refused with 409, stricter than the Mencoro app, which lets cluster writes into one. Requires the write capability and an Idempotency-Key header.
119
+ # @param organization_id [String]
120
+ # @param project_id [String]
121
+ # @param idempotency_key [String] Repeat it to retry a lost response without creating the batch twice.
122
+ # @param batch_create_query_clusters_request_data [BatchCreateQueryClustersRequestData]
123
+ # @param [Hash] opts the optional parameters
124
+ # @return [Array<(BatchCreateQueryClustersOutcome, Integer, Hash)>] BatchCreateQueryClustersOutcome data, response status code and response headers
125
+ def batch_create_query_clusters_with_http_info(organization_id, project_id, idempotency_key, batch_create_query_clusters_request_data, opts = {})
126
+ if @api_client.config.debugging
127
+ @api_client.config.logger.debug 'Calling API: ClustersApi.batch_create_query_clusters ...'
128
+ end
129
+ # verify the required parameter 'organization_id' is set
130
+ if @api_client.config.client_side_validation && organization_id.nil?
131
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling ClustersApi.batch_create_query_clusters"
132
+ end
133
+ # verify the required parameter 'project_id' is set
134
+ if @api_client.config.client_side_validation && project_id.nil?
135
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ClustersApi.batch_create_query_clusters"
136
+ end
137
+ # verify the required parameter 'idempotency_key' is set
138
+ if @api_client.config.client_side_validation && idempotency_key.nil?
139
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ClustersApi.batch_create_query_clusters"
140
+ end
141
+ # verify the required parameter 'batch_create_query_clusters_request_data' is set
142
+ if @api_client.config.client_side_validation && batch_create_query_clusters_request_data.nil?
143
+ fail ArgumentError, "Missing the required parameter 'batch_create_query_clusters_request_data' when calling ClustersApi.batch_create_query_clusters"
144
+ end
145
+ # resource path
146
+ local_var_path = '/api/v1/organizations/{organizationId}/projects/{projectId}/clusters/batch'.sub('{organizationId}', CGI.escape(organization_id.to_s)).sub('{projectId}', CGI.escape(project_id.to_s))
147
+
148
+ # query parameters
149
+ query_params = opts[:query_params] || {}
150
+
151
+ # header parameters
152
+ header_params = opts[:header_params] || {}
153
+ # HTTP header 'Accept' (if needed)
154
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
155
+ # HTTP header 'Content-Type'
156
+ content_type = @api_client.select_header_content_type(['application/json'])
157
+ if !content_type.nil?
158
+ header_params['Content-Type'] = content_type
159
+ end
160
+ header_params[:'Idempotency-Key'] = idempotency_key
161
+
162
+ # form parameters
163
+ form_params = opts[:form_params] || {}
164
+
165
+ # http body (model)
166
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_create_query_clusters_request_data)
167
+
168
+ # return_type
169
+ return_type = opts[:debug_return_type] || 'BatchCreateQueryClustersOutcome'
170
+
171
+ # auth_names
172
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
173
+
174
+ new_options = opts.merge(
175
+ :operation => :"ClustersApi.batch_create_query_clusters",
176
+ :header_params => header_params,
177
+ :query_params => query_params,
178
+ :form_params => form_params,
179
+ :body => post_body,
180
+ :auth_names => auth_names,
181
+ :return_type => return_type
182
+ )
183
+
184
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
185
+ if @api_client.config.debugging
186
+ @api_client.config.logger.debug "API called: ClustersApi#batch_create_query_clusters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
187
+ end
188
+ return data, status_code, headers
189
+ end
190
+
191
+ # Create a keyword cluster
192
+ # Minimum role: manager. Creates one empty keyword cluster in the project. The name is trimmed and lower-cased before it is stored, and it must be unique within the project: a name that already exists is refused with 409 and nothing is merged into the existing cluster. The cluster starts with no tracked queries in it — this operation does not assign anything to it. The organization must not be archived; an archived project IS refused with 409, stricter than the Mencoro app, which lets cluster writes into one. Requires the write capability and an Idempotency-Key header.
193
+ # @param organization_id [String]
194
+ # @param project_id [String]
195
+ # @param idempotency_key [String] A token you choose per operation, 8 to 255 printable ASCII characters with no spaces; a UUID is the obvious choice. Repeat it to retry a lost response without creating a second cluster. The key is scoped to your API key, and it is bound to the method, the path and the body of the first attempt: repeating it with anything else changed is refused with 409 rather than replayed.
196
+ # @param create_query_cluster_request [CreateQueryClusterRequest]
197
+ # @param [Hash] opts the optional parameters
198
+ # @return [QueryClusterResource]
199
+ def create_query_cluster(organization_id, project_id, idempotency_key, create_query_cluster_request, opts = {})
200
+ data, _status_code, _headers = create_query_cluster_with_http_info(organization_id, project_id, idempotency_key, create_query_cluster_request, opts)
201
+ data
202
+ end
203
+
204
+ # Create a keyword cluster
205
+ # Minimum role: manager. Creates one empty keyword cluster in the project. The name is trimmed and lower-cased before it is stored, and it must be unique within the project: a name that already exists is refused with 409 and nothing is merged into the existing cluster. The cluster starts with no tracked queries in it — this operation does not assign anything to it. The organization must not be archived; an archived project IS refused with 409, stricter than the Mencoro app, which lets cluster writes into one. Requires the write capability and an Idempotency-Key header.
206
+ # @param organization_id [String]
207
+ # @param project_id [String]
208
+ # @param idempotency_key [String] A token you choose per operation, 8 to 255 printable ASCII characters with no spaces; a UUID is the obvious choice. Repeat it to retry a lost response without creating a second cluster. The key is scoped to your API key, and it is bound to the method, the path and the body of the first attempt: repeating it with anything else changed is refused with 409 rather than replayed.
209
+ # @param create_query_cluster_request [CreateQueryClusterRequest]
210
+ # @param [Hash] opts the optional parameters
211
+ # @return [Array<(QueryClusterResource, Integer, Hash)>] QueryClusterResource data, response status code and response headers
212
+ def create_query_cluster_with_http_info(organization_id, project_id, idempotency_key, create_query_cluster_request, opts = {})
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug 'Calling API: ClustersApi.create_query_cluster ...'
215
+ end
216
+ # verify the required parameter 'organization_id' is set
217
+ if @api_client.config.client_side_validation && organization_id.nil?
218
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling ClustersApi.create_query_cluster"
219
+ end
220
+ # verify the required parameter 'project_id' is set
221
+ if @api_client.config.client_side_validation && project_id.nil?
222
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ClustersApi.create_query_cluster"
223
+ end
224
+ # verify the required parameter 'idempotency_key' is set
225
+ if @api_client.config.client_side_validation && idempotency_key.nil?
226
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ClustersApi.create_query_cluster"
227
+ end
228
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
229
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ClustersApi.create_query_cluster, the character length must be smaller than or equal to 255.'
230
+ end
231
+
232
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
233
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ClustersApi.create_query_cluster, the character length must be greater than or equal to 8.'
234
+ end
235
+
236
+ # verify the required parameter 'create_query_cluster_request' is set
237
+ if @api_client.config.client_side_validation && create_query_cluster_request.nil?
238
+ fail ArgumentError, "Missing the required parameter 'create_query_cluster_request' when calling ClustersApi.create_query_cluster"
239
+ end
240
+ # resource path
241
+ local_var_path = '/api/v1/organizations/{organizationId}/projects/{projectId}/clusters'.sub('{organizationId}', CGI.escape(organization_id.to_s)).sub('{projectId}', CGI.escape(project_id.to_s))
242
+
243
+ # query parameters
244
+ query_params = opts[:query_params] || {}
245
+
246
+ # header parameters
247
+ header_params = opts[:header_params] || {}
248
+ # HTTP header 'Accept' (if needed)
249
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
250
+ # HTTP header 'Content-Type'
251
+ content_type = @api_client.select_header_content_type(['application/json'])
252
+ if !content_type.nil?
253
+ header_params['Content-Type'] = content_type
254
+ end
255
+ header_params[:'Idempotency-Key'] = idempotency_key
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_query_cluster_request)
262
+
263
+ # return_type
264
+ return_type = opts[:debug_return_type] || 'QueryClusterResource'
265
+
266
+ # auth_names
267
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
268
+
269
+ new_options = opts.merge(
270
+ :operation => :"ClustersApi.create_query_cluster",
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => return_type
277
+ )
278
+
279
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: ClustersApi#create_query_cluster\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
285
+
286
+ # Delete a keyword cluster
287
+ # Minimum role: manager. Deletes one keyword cluster. The tracked queries that were in it are NOT deleted: they are unassigned from this cluster and keep every other cluster they belong to. Analytics filtered by this cluster id return nothing afterwards, including for dates before the deletion, because that filter reads current membership. This cannot be undone — recreating a cluster with the same name produces a new id and an empty cluster. The organization must not be archived, and neither must the project: an archived project IS refused with 409, stricter than the Mencoro app, which lets cluster writes into one. Requires the write capability and an Idempotency-Key header.
288
+ # @param organization_id [String]
289
+ # @param project_id [String]
290
+ # @param cluster_id [String] Must be a cluster of the project in the path.
291
+ # @param idempotency_key [String] Repeat it to retry a lost response; a fresh key answers 404 once the cluster is gone.
292
+ # @param [Hash] opts the optional parameters
293
+ # @return [DeleteQueryCluster200Response]
294
+ def delete_query_cluster(organization_id, project_id, cluster_id, idempotency_key, opts = {})
295
+ data, _status_code, _headers = delete_query_cluster_with_http_info(organization_id, project_id, cluster_id, idempotency_key, opts)
296
+ data
297
+ end
298
+
299
+ # Delete a keyword cluster
300
+ # Minimum role: manager. Deletes one keyword cluster. The tracked queries that were in it are NOT deleted: they are unassigned from this cluster and keep every other cluster they belong to. Analytics filtered by this cluster id return nothing afterwards, including for dates before the deletion, because that filter reads current membership. This cannot be undone — recreating a cluster with the same name produces a new id and an empty cluster. The organization must not be archived, and neither must the project: an archived project IS refused with 409, stricter than the Mencoro app, which lets cluster writes into one. Requires the write capability and an Idempotency-Key header.
301
+ # @param organization_id [String]
302
+ # @param project_id [String]
303
+ # @param cluster_id [String] Must be a cluster of the project in the path.
304
+ # @param idempotency_key [String] Repeat it to retry a lost response; a fresh key answers 404 once the cluster is gone.
305
+ # @param [Hash] opts the optional parameters
306
+ # @return [Array<(DeleteQueryCluster200Response, Integer, Hash)>] DeleteQueryCluster200Response data, response status code and response headers
307
+ def delete_query_cluster_with_http_info(organization_id, project_id, cluster_id, idempotency_key, opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug 'Calling API: ClustersApi.delete_query_cluster ...'
310
+ end
311
+ # verify the required parameter 'organization_id' is set
312
+ if @api_client.config.client_side_validation && organization_id.nil?
313
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling ClustersApi.delete_query_cluster"
314
+ end
315
+ # verify the required parameter 'project_id' is set
316
+ if @api_client.config.client_side_validation && project_id.nil?
317
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ClustersApi.delete_query_cluster"
318
+ end
319
+ # verify the required parameter 'cluster_id' is set
320
+ if @api_client.config.client_side_validation && cluster_id.nil?
321
+ fail ArgumentError, "Missing the required parameter 'cluster_id' when calling ClustersApi.delete_query_cluster"
322
+ end
323
+ # verify the required parameter 'idempotency_key' is set
324
+ if @api_client.config.client_side_validation && idempotency_key.nil?
325
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ClustersApi.delete_query_cluster"
326
+ end
327
+ # resource path
328
+ local_var_path = '/api/v1/organizations/{organizationId}/projects/{projectId}/clusters/{clusterId}'.sub('{organizationId}', CGI.escape(organization_id.to_s)).sub('{projectId}', CGI.escape(project_id.to_s)).sub('{clusterId}', CGI.escape(cluster_id.to_s))
329
+
330
+ # query parameters
331
+ query_params = opts[:query_params] || {}
332
+
333
+ # header parameters
334
+ header_params = opts[:header_params] || {}
335
+ # HTTP header 'Accept' (if needed)
336
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
337
+ header_params[:'Idempotency-Key'] = idempotency_key
338
+
339
+ # form parameters
340
+ form_params = opts[:form_params] || {}
341
+
342
+ # http body (model)
343
+ post_body = opts[:debug_body]
344
+
345
+ # return_type
346
+ return_type = opts[:debug_return_type] || 'DeleteQueryCluster200Response'
347
+
348
+ # auth_names
349
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
350
+
351
+ new_options = opts.merge(
352
+ :operation => :"ClustersApi.delete_query_cluster",
353
+ :header_params => header_params,
354
+ :query_params => query_params,
355
+ :form_params => form_params,
356
+ :body => post_body,
357
+ :auth_names => auth_names,
358
+ :return_type => return_type
359
+ )
360
+
361
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
362
+ if @api_client.config.debugging
363
+ @api_client.config.logger.debug "API called: ClustersApi#delete_query_cluster\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
364
+ end
365
+ return data, status_code, headers
366
+ end
367
+
368
+ # Rename a keyword cluster
369
+ # Minimum role: manager. Changes the name of one keyword cluster and nothing else: the tracked queries assigned to it are untouched, and its id does not change, so nothing a client stored breaks. The new name is trimmed and lower-cased and must be unique within the project; a collision is refused with 409. Renaming to the name the cluster already has is accepted and is a no-op. The organization must not be archived; an archived project IS refused with 409, stricter than the Mencoro app, which lets cluster writes into one. Requires the write capability and an Idempotency-Key header.
370
+ # @param organization_id [String]
371
+ # @param project_id [String]
372
+ # @param cluster_id [String] Must be a cluster of the project in the path.
373
+ # @param idempotency_key [String] Repeat it to retry a lost response without renaming twice.
374
+ # @param create_query_cluster_request [CreateQueryClusterRequest]
375
+ # @param [Hash] opts the optional parameters
376
+ # @return [QueryClusterResource]
377
+ def rename_query_cluster(organization_id, project_id, cluster_id, idempotency_key, create_query_cluster_request, opts = {})
378
+ data, _status_code, _headers = rename_query_cluster_with_http_info(organization_id, project_id, cluster_id, idempotency_key, create_query_cluster_request, opts)
379
+ data
380
+ end
381
+
382
+ # Rename a keyword cluster
383
+ # Minimum role: manager. Changes the name of one keyword cluster and nothing else: the tracked queries assigned to it are untouched, and its id does not change, so nothing a client stored breaks. The new name is trimmed and lower-cased and must be unique within the project; a collision is refused with 409. Renaming to the name the cluster already has is accepted and is a no-op. The organization must not be archived; an archived project IS refused with 409, stricter than the Mencoro app, which lets cluster writes into one. Requires the write capability and an Idempotency-Key header.
384
+ # @param organization_id [String]
385
+ # @param project_id [String]
386
+ # @param cluster_id [String] Must be a cluster of the project in the path.
387
+ # @param idempotency_key [String] Repeat it to retry a lost response without renaming twice.
388
+ # @param create_query_cluster_request [CreateQueryClusterRequest]
389
+ # @param [Hash] opts the optional parameters
390
+ # @return [Array<(QueryClusterResource, Integer, Hash)>] QueryClusterResource data, response status code and response headers
391
+ def rename_query_cluster_with_http_info(organization_id, project_id, cluster_id, idempotency_key, create_query_cluster_request, opts = {})
392
+ if @api_client.config.debugging
393
+ @api_client.config.logger.debug 'Calling API: ClustersApi.rename_query_cluster ...'
394
+ end
395
+ # verify the required parameter 'organization_id' is set
396
+ if @api_client.config.client_side_validation && organization_id.nil?
397
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling ClustersApi.rename_query_cluster"
398
+ end
399
+ # verify the required parameter 'project_id' is set
400
+ if @api_client.config.client_side_validation && project_id.nil?
401
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ClustersApi.rename_query_cluster"
402
+ end
403
+ # verify the required parameter 'cluster_id' is set
404
+ if @api_client.config.client_side_validation && cluster_id.nil?
405
+ fail ArgumentError, "Missing the required parameter 'cluster_id' when calling ClustersApi.rename_query_cluster"
406
+ end
407
+ # verify the required parameter 'idempotency_key' is set
408
+ if @api_client.config.client_side_validation && idempotency_key.nil?
409
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ClustersApi.rename_query_cluster"
410
+ end
411
+ # verify the required parameter 'create_query_cluster_request' is set
412
+ if @api_client.config.client_side_validation && create_query_cluster_request.nil?
413
+ fail ArgumentError, "Missing the required parameter 'create_query_cluster_request' when calling ClustersApi.rename_query_cluster"
414
+ end
415
+ # resource path
416
+ local_var_path = '/api/v1/organizations/{organizationId}/projects/{projectId}/clusters/{clusterId}'.sub('{organizationId}', CGI.escape(organization_id.to_s)).sub('{projectId}', CGI.escape(project_id.to_s)).sub('{clusterId}', CGI.escape(cluster_id.to_s))
417
+
418
+ # query parameters
419
+ query_params = opts[:query_params] || {}
420
+
421
+ # header parameters
422
+ header_params = opts[:header_params] || {}
423
+ # HTTP header 'Accept' (if needed)
424
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
425
+ # HTTP header 'Content-Type'
426
+ content_type = @api_client.select_header_content_type(['application/json'])
427
+ if !content_type.nil?
428
+ header_params['Content-Type'] = content_type
429
+ end
430
+ header_params[:'Idempotency-Key'] = idempotency_key
431
+
432
+ # form parameters
433
+ form_params = opts[:form_params] || {}
434
+
435
+ # http body (model)
436
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_query_cluster_request)
437
+
438
+ # return_type
439
+ return_type = opts[:debug_return_type] || 'QueryClusterResource'
440
+
441
+ # auth_names
442
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
443
+
444
+ new_options = opts.merge(
445
+ :operation => :"ClustersApi.rename_query_cluster",
446
+ :header_params => header_params,
447
+ :query_params => query_params,
448
+ :form_params => form_params,
449
+ :body => post_body,
450
+ :auth_names => auth_names,
451
+ :return_type => return_type
452
+ )
453
+
454
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
455
+ if @api_client.config.debugging
456
+ @api_client.config.logger.debug "API called: ClustersApi#rename_query_cluster\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
457
+ end
458
+ return data, status_code, headers
459
+ end
460
+
461
+ # Start a keyword clustering job
462
+ # Minimum role: manager. Asks the clustering service to propose keyword clusters for up to 500 tracked queries of the project, and answers 202 with the job to poll — the work runs in the background and a 202 says it was accepted, never that it succeeded. THE JOB WRITES NOTHING: it produces a proposal, and nothing changes until it is applied through the apply operation, which is a separate call. Duplicate query texts within the selection are sent once. Requires an entitled subscription (402 otherwise) and the organization must be active and the project not archived. Rate limited to 10 starts per minute per organization, shared with the same operation in the web application. Requires the write capability and an Idempotency-Key header; repeating the key returns the first job rather than starting a second.
463
+ # @param organization_id [String]
464
+ # @param project_id [String]
465
+ # @param idempotency_key [String] Repeat it to retry a lost response without starting a second job.
466
+ # @param start_clustering_job_request_data [StartClusteringJobRequestData]
467
+ # @param [Hash] opts the optional parameters
468
+ # @return [AcceptedJobResource]
469
+ def start_clustering_job(organization_id, project_id, idempotency_key, start_clustering_job_request_data, opts = {})
470
+ data, _status_code, _headers = start_clustering_job_with_http_info(organization_id, project_id, idempotency_key, start_clustering_job_request_data, opts)
471
+ data
472
+ end
473
+
474
+ # Start a keyword clustering job
475
+ # Minimum role: manager. Asks the clustering service to propose keyword clusters for up to 500 tracked queries of the project, and answers 202 with the job to poll — the work runs in the background and a 202 says it was accepted, never that it succeeded. THE JOB WRITES NOTHING: it produces a proposal, and nothing changes until it is applied through the apply operation, which is a separate call. Duplicate query texts within the selection are sent once. Requires an entitled subscription (402 otherwise) and the organization must be active and the project not archived. Rate limited to 10 starts per minute per organization, shared with the same operation in the web application. Requires the write capability and an Idempotency-Key header; repeating the key returns the first job rather than starting a second.
476
+ # @param organization_id [String]
477
+ # @param project_id [String]
478
+ # @param idempotency_key [String] Repeat it to retry a lost response without starting a second job.
479
+ # @param start_clustering_job_request_data [StartClusteringJobRequestData]
480
+ # @param [Hash] opts the optional parameters
481
+ # @return [Array<(AcceptedJobResource, Integer, Hash)>] AcceptedJobResource data, response status code and response headers
482
+ def start_clustering_job_with_http_info(organization_id, project_id, idempotency_key, start_clustering_job_request_data, opts = {})
483
+ if @api_client.config.debugging
484
+ @api_client.config.logger.debug 'Calling API: ClustersApi.start_clustering_job ...'
485
+ end
486
+ # verify the required parameter 'organization_id' is set
487
+ if @api_client.config.client_side_validation && organization_id.nil?
488
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling ClustersApi.start_clustering_job"
489
+ end
490
+ # verify the required parameter 'project_id' is set
491
+ if @api_client.config.client_side_validation && project_id.nil?
492
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ClustersApi.start_clustering_job"
493
+ end
494
+ # verify the required parameter 'idempotency_key' is set
495
+ if @api_client.config.client_side_validation && idempotency_key.nil?
496
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ClustersApi.start_clustering_job"
497
+ end
498
+ # verify the required parameter 'start_clustering_job_request_data' is set
499
+ if @api_client.config.client_side_validation && start_clustering_job_request_data.nil?
500
+ fail ArgumentError, "Missing the required parameter 'start_clustering_job_request_data' when calling ClustersApi.start_clustering_job"
501
+ end
502
+ # resource path
503
+ local_var_path = '/api/v1/organizations/{organizationId}/projects/{projectId}/clusters/jobs'.sub('{organizationId}', CGI.escape(organization_id.to_s)).sub('{projectId}', CGI.escape(project_id.to_s))
504
+
505
+ # query parameters
506
+ query_params = opts[:query_params] || {}
507
+
508
+ # header parameters
509
+ header_params = opts[:header_params] || {}
510
+ # HTTP header 'Accept' (if needed)
511
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
512
+ # HTTP header 'Content-Type'
513
+ content_type = @api_client.select_header_content_type(['application/json'])
514
+ if !content_type.nil?
515
+ header_params['Content-Type'] = content_type
516
+ end
517
+ header_params[:'Idempotency-Key'] = idempotency_key
518
+
519
+ # form parameters
520
+ form_params = opts[:form_params] || {}
521
+
522
+ # http body (model)
523
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(start_clustering_job_request_data)
524
+
525
+ # return_type
526
+ return_type = opts[:debug_return_type] || 'AcceptedJobResource'
527
+
528
+ # auth_names
529
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
530
+
531
+ new_options = opts.merge(
532
+ :operation => :"ClustersApi.start_clustering_job",
533
+ :header_params => header_params,
534
+ :query_params => query_params,
535
+ :form_params => form_params,
536
+ :body => post_body,
537
+ :auth_names => auth_names,
538
+ :return_type => return_type
539
+ )
540
+
541
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
542
+ if @api_client.config.debugging
543
+ @api_client.config.logger.debug "API called: ClustersApi#start_clustering_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
544
+ end
545
+ return data, status_code, headers
546
+ end
547
+ end
548
+ end