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,807 @@
1
+ # Mencoro::OrganizationsApi
2
+
3
+ All URIs are relative to *https://api.mencoro.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**archive_organization**](OrganizationsApi.md#archive_organization) | **POST** /api/v1/organizations/{organizationId}/archive | Archive an organization |
8
+ | [**count_organization_tracked_queries**](OrganizationsApi.md#count_organization_tracked_queries) | **GET** /api/v1/organizations/{organizationId}/usage/tracked-queries | Count the tracked queries an organization has configured |
9
+ | [**create_organization**](OrganizationsApi.md#create_organization) | **POST** /api/v1/organizations | Create an organization |
10
+ | [**get_entitlements**](OrganizationsApi.md#get_entitlements) | **GET** /api/v1/organizations/{organizationId}/entitlements | Get an organization's plan allowance and consumption |
11
+ | [**get_membership_stats**](OrganizationsApi.md#get_membership_stats) | **GET** /api/v1/organizations/{organizationId}/membership-stats | Membership, project and invitation counts for an organization |
12
+ | [**get_organization**](OrganizationsApi.md#get_organization) | **GET** /api/v1/organizations/{organizationId} | Get an organization |
13
+ | [**get_organization_projected_monthly_checks**](OrganizationsApi.md#get_organization_projected_monthly_checks) | **GET** /api/v1/organizations/{organizationId}/usage/projected-monthly-checks | Project a month of check consumption from the current tracking configuration |
14
+ | [**get_organization_stats**](OrganizationsApi.md#get_organization_stats) | **GET** /api/v1/organizations/{organizationId}/stats | Headline counts for an organization |
15
+ | [**list_organizations**](OrganizationsApi.md#list_organizations) | **GET** /api/v1/organizations | List accessible organizations |
16
+ | [**restore_organization**](OrganizationsApi.md#restore_organization) | **POST** /api/v1/organizations/{organizationId}/restore | Restore an archived organization |
17
+ | [**update_organization**](OrganizationsApi.md#update_organization) | **PATCH** /api/v1/organizations/{organizationId} | Update an organization profile |
18
+
19
+
20
+ ## archive_organization
21
+
22
+ > <OrganizationResource> archive_organization(organization_id, x_mencoro_confirmation, idempotency_key)
23
+
24
+ Archive an organization
25
+
26
+ Minimum role: owner. Archiving also archives the active projects of the organization, cancels its pending invitations and cancels its subscription at the end of the current billing period. Those effects are applied by background subscribers, so a 200 means the organization was archived, not that every effect has finished. Preview it first to see exactly what will be touched.
27
+
28
+ ### Examples
29
+
30
+ ```ruby
31
+ require 'time'
32
+ require 'mencoro'
33
+ # setup authorization
34
+ Mencoro.configure do |config|
35
+ # Configure Bearer authorization: ApiKey
36
+ config.access_token = 'YOUR_BEARER_TOKEN'
37
+ end
38
+
39
+ api_instance = Mencoro::OrganizationsApi.new
40
+ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
41
+ x_mencoro_confirmation = 'mencoro_conf_VmajQznkILZjvFf63JexmT1AKX7iYZjOGSrBZYxlUTk' # String | The `confirmation.token` returned by POST /api/v1/organization-operation-previews for this exact action, organization and body. Single use, valid for five minutes, and bound to the effects the preview declared: if the organization gained a project or lost an invitation in between, it is refused with 409 rather than doing more than was agreed. Without it the call answers 428.
42
+ idempotency_key = '5c1b8e42-0d7f-4a93-8c61-9b2e4d0a7f38' # String | Repeat it to retry a lost response. The replay is answered from the record without claiming the confirmation again, so a retry is never refused for presenting a confirmation the first attempt already spent.
43
+
44
+ begin
45
+ # Archive an organization
46
+ result = api_instance.archive_organization(organization_id, x_mencoro_confirmation, idempotency_key)
47
+ p result
48
+ rescue Mencoro::ApiError => e
49
+ puts "Error when calling OrganizationsApi->archive_organization: #{e}"
50
+ end
51
+ ```
52
+
53
+ #### Using the archive_organization_with_http_info variant
54
+
55
+ This returns an Array which contains the response data, status code and headers.
56
+
57
+ > <Array(<OrganizationResource>, Integer, Hash)> archive_organization_with_http_info(organization_id, x_mencoro_confirmation, idempotency_key)
58
+
59
+ ```ruby
60
+ begin
61
+ # Archive an organization
62
+ data, status_code, headers = api_instance.archive_organization_with_http_info(organization_id, x_mencoro_confirmation, idempotency_key)
63
+ p status_code # => 2xx
64
+ p headers # => { ... }
65
+ p data # => <OrganizationResource>
66
+ rescue Mencoro::ApiError => e
67
+ puts "Error when calling OrganizationsApi->archive_organization_with_http_info: #{e}"
68
+ end
69
+ ```
70
+
71
+ ### Parameters
72
+
73
+ | Name | Type | Description | Notes |
74
+ | ---- | ---- | ----------- | ----- |
75
+ | **organization_id** | **String** | | |
76
+ | **x_mencoro_confirmation** | **String** | The &#x60;confirmation.token&#x60; returned by POST /api/v1/organization-operation-previews for this exact action, organization and body. Single use, valid for five minutes, and bound to the effects the preview declared: if the organization gained a project or lost an invitation in between, it is refused with 409 rather than doing more than was agreed. Without it the call answers 428. | |
77
+ | **idempotency_key** | **String** | Repeat it to retry a lost response. The replay is answered from the record without claiming the confirmation again, so a retry is never refused for presenting a confirmation the first attempt already spent. | |
78
+
79
+ ### Return type
80
+
81
+ [**OrganizationResource**](OrganizationResource.md)
82
+
83
+ ### Authorization
84
+
85
+ [ApiKey](../README.md#ApiKey)
86
+
87
+ ### HTTP request headers
88
+
89
+ - **Content-Type**: Not defined
90
+ - **Accept**: application/json
91
+
92
+
93
+ ## count_organization_tracked_queries
94
+
95
+ > <TrackedQueryUsageResource> count_organization_tracked_queries(organization_id)
96
+
97
+ Count the tracked queries an organization has configured
98
+
99
+ Minimum role: viewer. How many tracked queries the organization has configured, counted live in PostgreSQL — the write model — over EVERY project it owns, archived projects included, and over every tracked query in them, active and paused alike. It is deliberately a DIFFERENT number from `aggregate.totalTrackedQueries` in getOrganizationOverview: that one sums a per-project copy held in the Elasticsearch read model and covers ACTIVE projects only, so it excludes archived projects and can lag behind a change that already shows here. Expect the two to disagree and do not treat either as wrong. This figure does reconcile exactly with countTrackedQueries, which counts one project through the same counter in the same store: sum its unfiltered `count` over every project, archived included, and you get this number. For the ACTIVE subset and what it will consume, call getOrganizationProjectedMonthlyChecks, which ranges over the same projects. Do NOT derive the paused count by subtracting one from the other: this number is read live from Postgres while that one is served from a cache invalidated by background subscribers, so the two can disagree while that invalidation catches up and the difference is then a count of nothing. For how many projects this ranges over, read `projects.total` and `projects.active` from getOrganizationStats. The value is never null: 0 means none are configured. This operation takes no query parameters — the population is fixed, and a parameter it cannot honour is rejected with 400 rather than silently ignored.
100
+
101
+ ### Examples
102
+
103
+ ```ruby
104
+ require 'time'
105
+ require 'mencoro'
106
+ # setup authorization
107
+ Mencoro.configure do |config|
108
+ # Configure Bearer authorization: ApiKey
109
+ config.access_token = 'YOUR_BEARER_TOKEN'
110
+ end
111
+
112
+ api_instance = Mencoro::OrganizationsApi.new
113
+ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
114
+
115
+ begin
116
+ # Count the tracked queries an organization has configured
117
+ result = api_instance.count_organization_tracked_queries(organization_id)
118
+ p result
119
+ rescue Mencoro::ApiError => e
120
+ puts "Error when calling OrganizationsApi->count_organization_tracked_queries: #{e}"
121
+ end
122
+ ```
123
+
124
+ #### Using the count_organization_tracked_queries_with_http_info variant
125
+
126
+ This returns an Array which contains the response data, status code and headers.
127
+
128
+ > <Array(<TrackedQueryUsageResource>, Integer, Hash)> count_organization_tracked_queries_with_http_info(organization_id)
129
+
130
+ ```ruby
131
+ begin
132
+ # Count the tracked queries an organization has configured
133
+ data, status_code, headers = api_instance.count_organization_tracked_queries_with_http_info(organization_id)
134
+ p status_code # => 2xx
135
+ p headers # => { ... }
136
+ p data # => <TrackedQueryUsageResource>
137
+ rescue Mencoro::ApiError => e
138
+ puts "Error when calling OrganizationsApi->count_organization_tracked_queries_with_http_info: #{e}"
139
+ end
140
+ ```
141
+
142
+ ### Parameters
143
+
144
+ | Name | Type | Description | Notes |
145
+ | ---- | ---- | ----------- | ----- |
146
+ | **organization_id** | **String** | | |
147
+
148
+ ### Return type
149
+
150
+ [**TrackedQueryUsageResource**](TrackedQueryUsageResource.md)
151
+
152
+ ### Authorization
153
+
154
+ [ApiKey](../README.md#ApiKey)
155
+
156
+ ### HTTP request headers
157
+
158
+ - **Content-Type**: Not defined
159
+ - **Accept**: application/json
160
+
161
+
162
+ ## create_organization
163
+
164
+ > <CreateOrganization201Response> create_organization(x_mencoro_confirmation, idempotency_key, create_organization_request)
165
+
166
+ Create an organization
167
+
168
+ Requires a key scoped to all organizations and the \"organization:manage\" capability: a key limited to named organizations cannot widen its own reach by creating one. Preview it first and send the confirmation in X-Mencoro-Confirmation together with an Idempotency-Key.
169
+
170
+ ### Examples
171
+
172
+ ```ruby
173
+ require 'time'
174
+ require 'mencoro'
175
+ # setup authorization
176
+ Mencoro.configure do |config|
177
+ # Configure Bearer authorization: ApiKey
178
+ config.access_token = 'YOUR_BEARER_TOKEN'
179
+ end
180
+
181
+ api_instance = Mencoro::OrganizationsApi.new
182
+ x_mencoro_confirmation = 'x_mencoro_confirmation_example' # String |
183
+ idempotency_key = 'idempotency_key_example' # String |
184
+ create_organization_request = Mencoro::CreateOrganizationRequest.new # CreateOrganizationRequest |
185
+
186
+ begin
187
+ # Create an organization
188
+ result = api_instance.create_organization(x_mencoro_confirmation, idempotency_key, create_organization_request)
189
+ p result
190
+ rescue Mencoro::ApiError => e
191
+ puts "Error when calling OrganizationsApi->create_organization: #{e}"
192
+ end
193
+ ```
194
+
195
+ #### Using the create_organization_with_http_info variant
196
+
197
+ This returns an Array which contains the response data, status code and headers.
198
+
199
+ > <Array(<CreateOrganization201Response>, Integer, Hash)> create_organization_with_http_info(x_mencoro_confirmation, idempotency_key, create_organization_request)
200
+
201
+ ```ruby
202
+ begin
203
+ # Create an organization
204
+ data, status_code, headers = api_instance.create_organization_with_http_info(x_mencoro_confirmation, idempotency_key, create_organization_request)
205
+ p status_code # => 2xx
206
+ p headers # => { ... }
207
+ p data # => <CreateOrganization201Response>
208
+ rescue Mencoro::ApiError => e
209
+ puts "Error when calling OrganizationsApi->create_organization_with_http_info: #{e}"
210
+ end
211
+ ```
212
+
213
+ ### Parameters
214
+
215
+ | Name | Type | Description | Notes |
216
+ | ---- | ---- | ----------- | ----- |
217
+ | **x_mencoro_confirmation** | **String** | | |
218
+ | **idempotency_key** | **String** | | |
219
+ | **create_organization_request** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md) | | |
220
+
221
+ ### Return type
222
+
223
+ [**CreateOrganization201Response**](CreateOrganization201Response.md)
224
+
225
+ ### Authorization
226
+
227
+ [ApiKey](../README.md#ApiKey)
228
+
229
+ ### HTTP request headers
230
+
231
+ - **Content-Type**: application/json
232
+ - **Accept**: application/json
233
+
234
+
235
+ ## get_entitlements
236
+
237
+ > <EntitlementsResource> get_entitlements(organization_id)
238
+
239
+ Get an organization's plan allowance and consumption
240
+
241
+ Minimum role: owner. Returns what the current plan allows, how much of it has been consumed and when the allowance next resets, taken from the most recent subscription contract whether it is running or cancelled. An organization that has never subscribed answers `status: \"none\"` with every budget and consumption field null — null means \"no plan on file, so not known\", which is deliberately distinct from a budget or a consumption of zero. Commercial and provider details (prices, Stripe identifiers, internal tier codes) are not part of this contract.
242
+
243
+ ### Examples
244
+
245
+ ```ruby
246
+ require 'time'
247
+ require 'mencoro'
248
+ # setup authorization
249
+ Mencoro.configure do |config|
250
+ # Configure Bearer authorization: ApiKey
251
+ config.access_token = 'YOUR_BEARER_TOKEN'
252
+ end
253
+
254
+ api_instance = Mencoro::OrganizationsApi.new
255
+ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
256
+
257
+ begin
258
+ # Get an organization's plan allowance and consumption
259
+ result = api_instance.get_entitlements(organization_id)
260
+ p result
261
+ rescue Mencoro::ApiError => e
262
+ puts "Error when calling OrganizationsApi->get_entitlements: #{e}"
263
+ end
264
+ ```
265
+
266
+ #### Using the get_entitlements_with_http_info variant
267
+
268
+ This returns an Array which contains the response data, status code and headers.
269
+
270
+ > <Array(<EntitlementsResource>, Integer, Hash)> get_entitlements_with_http_info(organization_id)
271
+
272
+ ```ruby
273
+ begin
274
+ # Get an organization's plan allowance and consumption
275
+ data, status_code, headers = api_instance.get_entitlements_with_http_info(organization_id)
276
+ p status_code # => 2xx
277
+ p headers # => { ... }
278
+ p data # => <EntitlementsResource>
279
+ rescue Mencoro::ApiError => e
280
+ puts "Error when calling OrganizationsApi->get_entitlements_with_http_info: #{e}"
281
+ end
282
+ ```
283
+
284
+ ### Parameters
285
+
286
+ | Name | Type | Description | Notes |
287
+ | ---- | ---- | ----------- | ----- |
288
+ | **organization_id** | **String** | | |
289
+
290
+ ### Return type
291
+
292
+ [**EntitlementsResource**](EntitlementsResource.md)
293
+
294
+ ### Authorization
295
+
296
+ [ApiKey](../README.md#ApiKey)
297
+
298
+ ### HTTP request headers
299
+
300
+ - **Content-Type**: Not defined
301
+ - **Accept**: application/json
302
+
303
+
304
+ ## get_membership_stats
305
+
306
+ > <GetMembershipStats200Response> get_membership_stats(organization_id)
307
+
308
+ Membership, project and invitation counts for an organization
309
+
310
+ Minimum role: owner. Pre-computed counts of the organization's members, projects and outstanding invitations, read from a materialized view that is refreshed periodically — `computedAt` says when the snapshot was taken, so a member added since the last refresh is not counted yet. Every count is always an integer and a zero means zero; an organization whose row has not been computed yet answers 404 with code `organization_membership_stats_not_found`, never a body of zeros, so \"none\" and \"not known yet\" are never confused. Counts cover the whole organization, active and inactive alike: `totalMembersCount` includes suspended members, and `totalProjectsCount` includes archived projects. `pendingInvitationsCount` counts only invitations that are still pending and not yet expired.
311
+
312
+ ### Examples
313
+
314
+ ```ruby
315
+ require 'time'
316
+ require 'mencoro'
317
+ # setup authorization
318
+ Mencoro.configure do |config|
319
+ # Configure Bearer authorization: ApiKey
320
+ config.access_token = 'YOUR_BEARER_TOKEN'
321
+ end
322
+
323
+ api_instance = Mencoro::OrganizationsApi.new
324
+ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
325
+
326
+ begin
327
+ # Membership, project and invitation counts for an organization
328
+ result = api_instance.get_membership_stats(organization_id)
329
+ p result
330
+ rescue Mencoro::ApiError => e
331
+ puts "Error when calling OrganizationsApi->get_membership_stats: #{e}"
332
+ end
333
+ ```
334
+
335
+ #### Using the get_membership_stats_with_http_info variant
336
+
337
+ This returns an Array which contains the response data, status code and headers.
338
+
339
+ > <Array(<GetMembershipStats200Response>, Integer, Hash)> get_membership_stats_with_http_info(organization_id)
340
+
341
+ ```ruby
342
+ begin
343
+ # Membership, project and invitation counts for an organization
344
+ data, status_code, headers = api_instance.get_membership_stats_with_http_info(organization_id)
345
+ p status_code # => 2xx
346
+ p headers # => { ... }
347
+ p data # => <GetMembershipStats200Response>
348
+ rescue Mencoro::ApiError => e
349
+ puts "Error when calling OrganizationsApi->get_membership_stats_with_http_info: #{e}"
350
+ end
351
+ ```
352
+
353
+ ### Parameters
354
+
355
+ | Name | Type | Description | Notes |
356
+ | ---- | ---- | ----------- | ----- |
357
+ | **organization_id** | **String** | | |
358
+
359
+ ### Return type
360
+
361
+ [**GetMembershipStats200Response**](GetMembershipStats200Response.md)
362
+
363
+ ### Authorization
364
+
365
+ [ApiKey](../README.md#ApiKey)
366
+
367
+ ### HTTP request headers
368
+
369
+ - **Content-Type**: Not defined
370
+ - **Accept**: application/json
371
+
372
+
373
+ ## get_organization
374
+
375
+ > <OrganizationResource> get_organization(organization_id)
376
+
377
+ Get an organization
378
+
379
+ Minimum role: viewer. An organization outside the key's scope, or one the caller is not an active member of, answers 404 - the API never confirms that an inaccessible organization exists.
380
+
381
+ ### Examples
382
+
383
+ ```ruby
384
+ require 'time'
385
+ require 'mencoro'
386
+ # setup authorization
387
+ Mencoro.configure do |config|
388
+ # Configure Bearer authorization: ApiKey
389
+ config.access_token = 'YOUR_BEARER_TOKEN'
390
+ end
391
+
392
+ api_instance = Mencoro::OrganizationsApi.new
393
+ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
394
+
395
+ begin
396
+ # Get an organization
397
+ result = api_instance.get_organization(organization_id)
398
+ p result
399
+ rescue Mencoro::ApiError => e
400
+ puts "Error when calling OrganizationsApi->get_organization: #{e}"
401
+ end
402
+ ```
403
+
404
+ #### Using the get_organization_with_http_info variant
405
+
406
+ This returns an Array which contains the response data, status code and headers.
407
+
408
+ > <Array(<OrganizationResource>, Integer, Hash)> get_organization_with_http_info(organization_id)
409
+
410
+ ```ruby
411
+ begin
412
+ # Get an organization
413
+ data, status_code, headers = api_instance.get_organization_with_http_info(organization_id)
414
+ p status_code # => 2xx
415
+ p headers # => { ... }
416
+ p data # => <OrganizationResource>
417
+ rescue Mencoro::ApiError => e
418
+ puts "Error when calling OrganizationsApi->get_organization_with_http_info: #{e}"
419
+ end
420
+ ```
421
+
422
+ ### Parameters
423
+
424
+ | Name | Type | Description | Notes |
425
+ | ---- | ---- | ----------- | ----- |
426
+ | **organization_id** | **String** | | |
427
+
428
+ ### Return type
429
+
430
+ [**OrganizationResource**](OrganizationResource.md)
431
+
432
+ ### Authorization
433
+
434
+ [ApiKey](../README.md#ApiKey)
435
+
436
+ ### HTTP request headers
437
+
438
+ - **Content-Type**: Not defined
439
+ - **Accept**: application/json
440
+
441
+
442
+ ## get_organization_projected_monthly_checks
443
+
444
+ > <ProjectedMonthlyChecksResource> get_organization_projected_monthly_checks(organization_id)
445
+
446
+ Project a month of check consumption from the current tracking configuration
447
+
448
+ Minimum role: viewer. What the organization's current configuration would consume in a month, in check budget units — the same unit `checkBudget` and `checksAvailable` are counted in by the entitlements operation — so the two are directly comparable when sizing a plan. The arithmetic is published so it can be reproduced rather than trusted: for each ACTIVE tracked query, runs per month (daily 30, weekly 4, monthly 1) multiplied by its nPasses, summed. A weekly query bills 4, not 4.345: a month is modelled as 30 days and 4 weeks, a planning convention rather than a calendar. Take `checkFrequency` and `nPasses` from the tracked-query listing and the arithmetic will match — though the two sides are read from different places and settle at different times: this figure is computed in the Postgres write model and served from a cache that background subscribers invalidate, while that listing reads an Elasticsearch projection. Immediately after a write the two can disagree; neither is wrong, they are catching up. PAUSED queries are excluded from both figures; archived PROJECTS are not — archiving a project does not pause its tracked queries, so they still count here, exactly as they do in countOrganizationTrackedQueries. `activeTrackedQueryCount` describes the same population as that count, minus the paused queries — but do not compute the difference to learn how many are paused: THIS OPERATION IS CACHED and that one is read live, so the two can disagree while the cache is invalidated in the background. This is a projection of the configuration, not a forecast of what will actually be spent: it does not look at the remaining plan budget, does not know which checks will be skipped or retried, and reserves and debits nothing. It is also not the `checkCost` of countTrackedQueries, which prices one round over one project rather than a month over the organization. Both values are never null: 0 means nothing is scheduled. This operation takes no query parameters — the population is fixed, and a parameter it cannot honour is rejected with 400 rather than silently ignored.
449
+
450
+ ### Examples
451
+
452
+ ```ruby
453
+ require 'time'
454
+ require 'mencoro'
455
+ # setup authorization
456
+ Mencoro.configure do |config|
457
+ # Configure Bearer authorization: ApiKey
458
+ config.access_token = 'YOUR_BEARER_TOKEN'
459
+ end
460
+
461
+ api_instance = Mencoro::OrganizationsApi.new
462
+ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
463
+
464
+ begin
465
+ # Project a month of check consumption from the current tracking configuration
466
+ result = api_instance.get_organization_projected_monthly_checks(organization_id)
467
+ p result
468
+ rescue Mencoro::ApiError => e
469
+ puts "Error when calling OrganizationsApi->get_organization_projected_monthly_checks: #{e}"
470
+ end
471
+ ```
472
+
473
+ #### Using the get_organization_projected_monthly_checks_with_http_info variant
474
+
475
+ This returns an Array which contains the response data, status code and headers.
476
+
477
+ > <Array(<ProjectedMonthlyChecksResource>, Integer, Hash)> get_organization_projected_monthly_checks_with_http_info(organization_id)
478
+
479
+ ```ruby
480
+ begin
481
+ # Project a month of check consumption from the current tracking configuration
482
+ data, status_code, headers = api_instance.get_organization_projected_monthly_checks_with_http_info(organization_id)
483
+ p status_code # => 2xx
484
+ p headers # => { ... }
485
+ p data # => <ProjectedMonthlyChecksResource>
486
+ rescue Mencoro::ApiError => e
487
+ puts "Error when calling OrganizationsApi->get_organization_projected_monthly_checks_with_http_info: #{e}"
488
+ end
489
+ ```
490
+
491
+ ### Parameters
492
+
493
+ | Name | Type | Description | Notes |
494
+ | ---- | ---- | ----------- | ----- |
495
+ | **organization_id** | **String** | | |
496
+
497
+ ### Return type
498
+
499
+ [**ProjectedMonthlyChecksResource**](ProjectedMonthlyChecksResource.md)
500
+
501
+ ### Authorization
502
+
503
+ [ApiKey](../README.md#ApiKey)
504
+
505
+ ### HTTP request headers
506
+
507
+ - **Content-Type**: Not defined
508
+ - **Accept**: application/json
509
+
510
+
511
+ ## get_organization_stats
512
+
513
+ > <GetOrganizationStats200Response> get_organization_stats(organization_id)
514
+
515
+ Headline counts for an organization
516
+
517
+ Minimum role: viewer. Active members, projects (total and active) and pending invitations, in one call. Every value is a count and is always known: 0 means the organization really has none of that thing, and no field is ever null. `members.total` counts ACTIVE memberships only, so a suspended member is not included; `projects.total` counts every project including archived ones, and `projects.active` the non-archived subset. This is a current-state snapshot and takes no date window.
518
+
519
+ ### Examples
520
+
521
+ ```ruby
522
+ require 'time'
523
+ require 'mencoro'
524
+ # setup authorization
525
+ Mencoro.configure do |config|
526
+ # Configure Bearer authorization: ApiKey
527
+ config.access_token = 'YOUR_BEARER_TOKEN'
528
+ end
529
+
530
+ api_instance = Mencoro::OrganizationsApi.new
531
+ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
532
+
533
+ begin
534
+ # Headline counts for an organization
535
+ result = api_instance.get_organization_stats(organization_id)
536
+ p result
537
+ rescue Mencoro::ApiError => e
538
+ puts "Error when calling OrganizationsApi->get_organization_stats: #{e}"
539
+ end
540
+ ```
541
+
542
+ #### Using the get_organization_stats_with_http_info variant
543
+
544
+ This returns an Array which contains the response data, status code and headers.
545
+
546
+ > <Array(<GetOrganizationStats200Response>, Integer, Hash)> get_organization_stats_with_http_info(organization_id)
547
+
548
+ ```ruby
549
+ begin
550
+ # Headline counts for an organization
551
+ data, status_code, headers = api_instance.get_organization_stats_with_http_info(organization_id)
552
+ p status_code # => 2xx
553
+ p headers # => { ... }
554
+ p data # => <GetOrganizationStats200Response>
555
+ rescue Mencoro::ApiError => e
556
+ puts "Error when calling OrganizationsApi->get_organization_stats_with_http_info: #{e}"
557
+ end
558
+ ```
559
+
560
+ ### Parameters
561
+
562
+ | Name | Type | Description | Notes |
563
+ | ---- | ---- | ----------- | ----- |
564
+ | **organization_id** | **String** | | |
565
+
566
+ ### Return type
567
+
568
+ [**GetOrganizationStats200Response**](GetOrganizationStats200Response.md)
569
+
570
+ ### Authorization
571
+
572
+ [ApiKey](../README.md#ApiKey)
573
+
574
+ ### HTTP request headers
575
+
576
+ - **Content-Type**: Not defined
577
+ - **Accept**: application/json
578
+
579
+
580
+ ## list_organizations
581
+
582
+ > <ListOrganizations200Response> list_organizations(opts)
583
+
584
+ List accessible organizations
585
+
586
+ Returns the organizations the key's owner is an active member of, narrowed to the key's scope. A key scoped to all organizations also sees organizations joined after it was created.Send `Accept: text/csv` to receive the same page as a CSV download instead of JSON: same filters, same authorization, same page window and the same maximum of 100 rows — it is this page in another format, not a bulk export, so a whole collection is still read by paging. The CSV carries no `total`, because a table whose every row is a record has nowhere to put one; read it from the JSON representation of the same request. Cells beginning with `=`, `+`, `-` or `@` are prefixed with an apostrophe so a spreadsheet treats them as text rather than running them as formulas.
587
+
588
+ ### Examples
589
+
590
+ ```ruby
591
+ require 'time'
592
+ require 'mencoro'
593
+ # setup authorization
594
+ Mencoro.configure do |config|
595
+ # Configure Bearer authorization: ApiKey
596
+ config.access_token = 'YOUR_BEARER_TOKEN'
597
+ end
598
+
599
+ api_instance = Mencoro::OrganizationsApi.new
600
+ opts = {
601
+ limit: 56, # Integer |
602
+ offset: 56, # Integer |
603
+ search: 'search_example', # String |
604
+ status: 'active', # String |
605
+ sort_by: 'createdAt', # String |
606
+ sort_order: 'asc' # String |
607
+ }
608
+
609
+ begin
610
+ # List accessible organizations
611
+ result = api_instance.list_organizations(opts)
612
+ p result
613
+ rescue Mencoro::ApiError => e
614
+ puts "Error when calling OrganizationsApi->list_organizations: #{e}"
615
+ end
616
+ ```
617
+
618
+ #### Using the list_organizations_with_http_info variant
619
+
620
+ This returns an Array which contains the response data, status code and headers.
621
+
622
+ > <Array(<ListOrganizations200Response>, Integer, Hash)> list_organizations_with_http_info(opts)
623
+
624
+ ```ruby
625
+ begin
626
+ # List accessible organizations
627
+ data, status_code, headers = api_instance.list_organizations_with_http_info(opts)
628
+ p status_code # => 2xx
629
+ p headers # => { ... }
630
+ p data # => <ListOrganizations200Response>
631
+ rescue Mencoro::ApiError => e
632
+ puts "Error when calling OrganizationsApi->list_organizations_with_http_info: #{e}"
633
+ end
634
+ ```
635
+
636
+ ### Parameters
637
+
638
+ | Name | Type | Description | Notes |
639
+ | ---- | ---- | ----------- | ----- |
640
+ | **limit** | **Integer** | | [optional][default to 20] |
641
+ | **offset** | **Integer** | | [optional][default to 0] |
642
+ | **search** | **String** | | [optional] |
643
+ | **status** | **String** | | [optional] |
644
+ | **sort_by** | **String** | | [optional][default to &#39;createdAt&#39;] |
645
+ | **sort_order** | **String** | | [optional][default to &#39;desc&#39;] |
646
+
647
+ ### Return type
648
+
649
+ [**ListOrganizations200Response**](ListOrganizations200Response.md)
650
+
651
+ ### Authorization
652
+
653
+ [ApiKey](../README.md#ApiKey)
654
+
655
+ ### HTTP request headers
656
+
657
+ - **Content-Type**: Not defined
658
+ - **Accept**: application/json, text/csv
659
+
660
+
661
+ ## restore_organization
662
+
663
+ > <OrganizationResource> restore_organization(organization_id, x_mencoro_confirmation, idempotency_key)
664
+
665
+ Restore an archived organization
666
+
667
+ Minimum role: owner. Restoring reinstates the projects that were archived as part of archiving this organization - projects archived on their own stay archived - and aborts a pending subscription cancellation. Invitations cancelled by the archive are not reinstated. Preview it first to see which effects are reversible.
668
+
669
+ ### Examples
670
+
671
+ ```ruby
672
+ require 'time'
673
+ require 'mencoro'
674
+ # setup authorization
675
+ Mencoro.configure do |config|
676
+ # Configure Bearer authorization: ApiKey
677
+ config.access_token = 'YOUR_BEARER_TOKEN'
678
+ end
679
+
680
+ api_instance = Mencoro::OrganizationsApi.new
681
+ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
682
+ x_mencoro_confirmation = 'x_mencoro_confirmation_example' # String |
683
+ idempotency_key = 'idempotency_key_example' # String |
684
+
685
+ begin
686
+ # Restore an archived organization
687
+ result = api_instance.restore_organization(organization_id, x_mencoro_confirmation, idempotency_key)
688
+ p result
689
+ rescue Mencoro::ApiError => e
690
+ puts "Error when calling OrganizationsApi->restore_organization: #{e}"
691
+ end
692
+ ```
693
+
694
+ #### Using the restore_organization_with_http_info variant
695
+
696
+ This returns an Array which contains the response data, status code and headers.
697
+
698
+ > <Array(<OrganizationResource>, Integer, Hash)> restore_organization_with_http_info(organization_id, x_mencoro_confirmation, idempotency_key)
699
+
700
+ ```ruby
701
+ begin
702
+ # Restore an archived organization
703
+ data, status_code, headers = api_instance.restore_organization_with_http_info(organization_id, x_mencoro_confirmation, idempotency_key)
704
+ p status_code # => 2xx
705
+ p headers # => { ... }
706
+ p data # => <OrganizationResource>
707
+ rescue Mencoro::ApiError => e
708
+ puts "Error when calling OrganizationsApi->restore_organization_with_http_info: #{e}"
709
+ end
710
+ ```
711
+
712
+ ### Parameters
713
+
714
+ | Name | Type | Description | Notes |
715
+ | ---- | ---- | ----------- | ----- |
716
+ | **organization_id** | **String** | | |
717
+ | **x_mencoro_confirmation** | **String** | | |
718
+ | **idempotency_key** | **String** | | |
719
+
720
+ ### Return type
721
+
722
+ [**OrganizationResource**](OrganizationResource.md)
723
+
724
+ ### Authorization
725
+
726
+ [ApiKey](../README.md#ApiKey)
727
+
728
+ ### HTTP request headers
729
+
730
+ - **Content-Type**: Not defined
731
+ - **Accept**: application/json
732
+
733
+
734
+ ## update_organization
735
+
736
+ > <OrganizationResource> update_organization(organization_id, x_mencoro_confirmation, idempotency_key, update_organization_request)
737
+
738
+ Update an organization profile
739
+
740
+ Minimum role: owner. A partial update: omit a field to leave it alone, send it as null to clear it. Preview it first; the confirmation is bound to the current values, so an edit made by somebody else in between invalidates it rather than being silently overwritten. The organization image is deliberately NOT writable here, although the Mencoro app accepts one in the equivalent call: a published JSON API is the wrong place to carry a 10MB base64 blob in a body that also has to be fingerprinted for idempotency and digested for the confirmation. The image stays readable as `imageUrl`; changing it is done in the app.
741
+
742
+ ### Examples
743
+
744
+ ```ruby
745
+ require 'time'
746
+ require 'mencoro'
747
+ # setup authorization
748
+ Mencoro.configure do |config|
749
+ # Configure Bearer authorization: ApiKey
750
+ config.access_token = 'YOUR_BEARER_TOKEN'
751
+ end
752
+
753
+ api_instance = Mencoro::OrganizationsApi.new
754
+ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
755
+ x_mencoro_confirmation = 'x_mencoro_confirmation_example' # String |
756
+ idempotency_key = 'idempotency_key_example' # String |
757
+ update_organization_request = Mencoro::UpdateOrganizationRequest.new # UpdateOrganizationRequest |
758
+
759
+ begin
760
+ # Update an organization profile
761
+ result = api_instance.update_organization(organization_id, x_mencoro_confirmation, idempotency_key, update_organization_request)
762
+ p result
763
+ rescue Mencoro::ApiError => e
764
+ puts "Error when calling OrganizationsApi->update_organization: #{e}"
765
+ end
766
+ ```
767
+
768
+ #### Using the update_organization_with_http_info variant
769
+
770
+ This returns an Array which contains the response data, status code and headers.
771
+
772
+ > <Array(<OrganizationResource>, Integer, Hash)> update_organization_with_http_info(organization_id, x_mencoro_confirmation, idempotency_key, update_organization_request)
773
+
774
+ ```ruby
775
+ begin
776
+ # Update an organization profile
777
+ data, status_code, headers = api_instance.update_organization_with_http_info(organization_id, x_mencoro_confirmation, idempotency_key, update_organization_request)
778
+ p status_code # => 2xx
779
+ p headers # => { ... }
780
+ p data # => <OrganizationResource>
781
+ rescue Mencoro::ApiError => e
782
+ puts "Error when calling OrganizationsApi->update_organization_with_http_info: #{e}"
783
+ end
784
+ ```
785
+
786
+ ### Parameters
787
+
788
+ | Name | Type | Description | Notes |
789
+ | ---- | ---- | ----------- | ----- |
790
+ | **organization_id** | **String** | | |
791
+ | **x_mencoro_confirmation** | **String** | | |
792
+ | **idempotency_key** | **String** | | |
793
+ | **update_organization_request** | [**UpdateOrganizationRequest**](UpdateOrganizationRequest.md) | | |
794
+
795
+ ### Return type
796
+
797
+ [**OrganizationResource**](OrganizationResource.md)
798
+
799
+ ### Authorization
800
+
801
+ [ApiKey](../README.md#ApiKey)
802
+
803
+ ### HTTP request headers
804
+
805
+ - **Content-Type**: application/json
806
+ - **Accept**: application/json
807
+