ruby-jss 3.2.2 → 4.0.0b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (565) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +28 -2
  3. data/README-2.0.0.md +3 -1
  4. data/lib/jamf/api/connection/cache.rb +9 -8
  5. data/lib/jamf/api/connection/connect.rb +33 -2
  6. data/lib/jamf/api/connection/constants.rb +5 -0
  7. data/lib/jamf/api/connection/token.rb +70 -1
  8. data/lib/jamf/api/connection.rb +5 -4
  9. data/lib/jamf/api/jamf_pro/api_objects/api_client.rb +173 -0
  10. data/lib/jamf/api/jamf_pro/api_objects/api_integration.rb +38 -0
  11. data/lib/jamf/api/jamf_pro/api_objects/api_role.rb +134 -0
  12. data/lib/jamf/api/jamf_pro/api_objects/computer_prestage.rb +14 -5
  13. data/lib/jamf/api/jamf_pro/api_objects/mobile_device_prestage.rb +2 -1
  14. data/lib/jamf/api/jamf_pro/mixins/collection_resource.rb +1 -1
  15. data/lib/jamf/api/jamf_pro/mixins/prestage.rb +46 -94
  16. data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_preview_search_results.rb +1 -1
  17. data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_v2_search_results.rb +1 -1
  18. data/lib/jamf/api/jamf_pro/oapi_schemas/account.rb +1 -1
  19. data/lib/jamf/api/jamf_pro/oapi_schemas/account_driven_user_enrollment_session_token_settings.rb +1 -1
  20. data/lib/jamf/api/jamf_pro/oapi_schemas/account_group.rb +1 -1
  21. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences.rb +1 -1
  22. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v1.rb +1 -1
  23. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v4.rb +1 -1
  24. data/lib/jamf/api/jamf_pro/oapi_schemas/account_settings_request.rb +174 -0
  25. data/lib/jamf/api/jamf_pro/oapi_schemas/account_settings_response.rb +167 -0
  26. data/lib/jamf/api/jamf_pro/oapi_schemas/admin_account.rb +1 -1
  27. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search.rb +1 -1
  28. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_criteria_choices.rb +1 -1
  29. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_search_results.rb +1 -1
  30. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search.rb +1 -1
  31. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search_search_results.rb +1 -1
  32. data/lib/jamf/api/jamf_pro/oapi_schemas/android_details.rb +1 -1
  33. data/lib/jamf/api/jamf_pro/oapi_schemas/api_error.rb +1 -1
  34. data/lib/jamf/api/jamf_pro/oapi_schemas/api_error_cause.rb +1 -1
  35. data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_request.rb +106 -0
  36. data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_response.rb +143 -0
  37. data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_search_result.rb +94 -0
  38. data/lib/jamf/api/jamf_pro/oapi_schemas/api_role.rb +105 -0
  39. data/lib/jamf/api/jamf_pro/oapi_schemas/api_role_privileges.rb +87 -0
  40. data/lib/jamf/api/jamf_pro/oapi_schemas/api_role_request.rb +94 -0
  41. data/lib/jamf/api/jamf_pro/oapi_schemas/api_role_result.rb +94 -0
  42. data/lib/jamf/api/jamf_pro/oapi_schemas/app_analytics_setting.rb +1 -1
  43. data/lib/jamf/api/jamf_pro/oapi_schemas/{patch_policy_on_dashboard.rb → app_config_reinstall_code.rb} +10 -10
  44. data/lib/jamf/api/jamf_pro/oapi_schemas/app_path.rb +1 -1
  45. data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field.rb +1 -1
  46. data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field_search_results.rb +1 -1
  47. data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_settings.rb +1 -1
  48. data/lib/jamf/api/jamf_pro/oapi_schemas/apple_tv_details.rb +1 -1
  49. data/lib/jamf/api/jamf_pro/oapi_schemas/application_attributes.rb +1 -1
  50. data/lib/jamf/api/jamf_pro/oapi_schemas/application_configuration.rb +1 -1
  51. data/lib/jamf/api/jamf_pro/oapi_schemas/assign_remove_profile_response_sync_state.rb +1 -1
  52. data/lib/jamf/api/jamf_pro/oapi_schemas/assignment.rb +1 -1
  53. data/lib/jamf/api/jamf_pro/oapi_schemas/attributes.rb +1 -1
  54. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account.rb +1 -1
  55. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account_v1.rb +1 -1
  56. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token.rb +1 -1
  57. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token_v1.rb +1 -1
  58. data/lib/jamf/api/jamf_pro/oapi_schemas/authentication_type.rb +1 -1
  59. data/lib/jamf/api/jamf_pro/oapi_schemas/authorization.rb +1 -1
  60. data/lib/jamf/api/jamf_pro/oapi_schemas/authorization_v1.rb +1 -1
  61. data/lib/jamf/api/jamf_pro/oapi_schemas/available_os_updates.rb +1 -1
  62. data/lib/jamf/api/jamf_pro/oapi_schemas/available_updates.rb +1 -1
  63. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration.rb +1 -1
  64. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_request.rb +1 -1
  65. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_update.rb +1 -1
  66. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_mappings.rb +1 -2
  67. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration.rb +1 -1
  68. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_request.rb +1 -1
  69. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_update.rb +1 -1
  70. data/lib/jamf/api/jamf_pro/oapi_schemas/branding_image_url.rb +1 -1
  71. data/lib/jamf/api/jamf_pro/oapi_schemas/building.rb +1 -1
  72. data/lib/jamf/api/jamf_pro/oapi_schemas/building_search_results.rb +1 -1
  73. data/lib/jamf/api/jamf_pro/oapi_schemas/cache_settings.rb +1 -1
  74. data/lib/jamf/api/jamf_pro/oapi_schemas/categories_search_results.rb +1 -1
  75. data/lib/jamf/api/jamf_pro/oapi_schemas/category.rb +1 -1
  76. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_details.rb +3 -1
  77. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_identity_v2.rb +3 -1
  78. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_key.rb +1 -1
  79. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_record.rb +1 -1
  80. data/lib/jamf/api/jamf_pro/oapi_schemas/classic_ldap_mappings.rb +1 -1
  81. data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v2.rb +1 -1
  82. data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v3.rb +1 -1
  83. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common.rb +1 -1
  84. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_request.rb +1 -1
  85. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_response.rb +1 -1
  86. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_pool_statistics.rb +1 -1
  87. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_status.rb +1 -1
  88. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore.rb +1 -1
  89. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore_file.rb +1 -1
  90. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_request.rb +1 -1
  91. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_response.rb +1 -1
  92. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_request.rb +1 -1
  93. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_response.rb +1 -1
  94. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_update.rb +1 -1
  95. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_response.rb +1 -1
  96. data/lib/jamf/api/jamf_pro/oapi_schemas/compliance_vendor_device_information.rb +1 -1
  97. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_application.rb +1 -1
  98. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_attachment.rb +1 -1
  99. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_certificate.rb +1 -1
  100. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_configuration_profile.rb +1 -1
  101. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching.rb +1 -1
  102. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_alert.rb +1 -1
  103. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_cache_detail.rb +1 -1
  104. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error.rb +1 -1
  105. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error_user_info.rb +1 -1
  106. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent.rb +1 -1
  107. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_alert.rb +1 -1
  108. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_capabilities.rb +1 -1
  109. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_details.rb +1 -1
  110. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_local_network.rb +1 -1
  111. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk.rb +1 -1
  112. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk_encryption.rb +1 -1
  113. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_extension_attribute.rb +1 -1
  114. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_font.rb +1 -1
  115. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general.rb +1 -1
  116. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general_update.rb +1 -1
  117. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_group.rb +1 -1
  118. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware.rb +1 -1
  119. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware_update.rb +1 -1
  120. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_ibeacon.rb +1 -1
  121. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory.rb +1 -1
  122. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_preferences.rb +1 -1
  123. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_settings.rb +1 -1
  124. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_file_vault.rb +1 -1
  125. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_file_vault_search_results.rb +1 -1
  126. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_recovery_lock_password_response.rb +1 -1
  127. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_search_results.rb +1 -1
  128. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_update_request.rb +1 -1
  129. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_licensed_software.rb +1 -1
  130. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_local_user_account.rb +1 -1
  131. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_location.rb +1 -1
  132. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_mdm_capability.rb +1 -1
  133. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system.rb +1 -1
  134. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system_update.rb +1 -1
  135. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_overview.rb +1 -1
  136. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_package_receipts.rb +1 -1
  137. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition.rb +1 -1
  138. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_encryption.rb +1 -1
  139. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_file_vault2_state.rb +1 -1
  140. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_plugin.rb +1 -1
  141. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results_v2.rb +1 -1
  142. data/lib/jamf/api/jamf_pro/oapi_schemas/{computer_prestage_search_results.rb → computer_prestage_search_results_v3.rb} +8 -8
  143. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_v2.rb +1 -1
  144. data/lib/jamf/api/jamf_pro/oapi_schemas/{computer_prestage.rb → computer_prestage_v3.rb} +39 -16
  145. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_printer.rb +1 -1
  146. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_purchase.rb +1 -1
  147. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_remote_management.rb +1 -1
  148. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_section.rb +1 -1
  149. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_security.rb +1 -1
  150. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_service.rb +1 -1
  151. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_software_update.rb +1 -1
  152. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_storage.rb +1 -1
  153. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_user_and_location.rb +1 -1
  154. data/lib/jamf/api/jamf_pro/oapi_schemas/computers_search_results.rb +1 -1
  155. data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_profile.rb +1 -1
  156. data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_search_results.rb +1 -1
  157. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_candidate_request.rb +1 -1
  158. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_response.rb +1 -1
  159. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_status_response.rb +1 -1
  160. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_update_request.rb +1 -1
  161. data/lib/jamf/api/jamf_pro/oapi_schemas/country.rb +1 -1
  162. data/lib/jamf/api/jamf_pro/oapi_schemas/country_codes.rb +1 -1
  163. data/lib/jamf/api/jamf_pro/oapi_schemas/create_path.rb +1 -1
  164. data/lib/jamf/api/jamf_pro/oapi_schemas/csa_token.rb +1 -1
  165. data/lib/jamf/api/jamf_pro/oapi_schemas/current_account.rb +1 -1
  166. data/lib/jamf/api/jamf_pro/oapi_schemas/current_authorization.rb +1 -1
  167. data/lib/jamf/api/jamf_pro/oapi_schemas/{patch_policy_attempt_action.rb → dashboard_api_error.rb} +15 -14
  168. data/lib/jamf/api/jamf_pro/oapi_schemas/dashboard_item.rb +131 -0
  169. data/lib/jamf/api/jamf_pro/oapi_schemas/dashboard_setup.rb +89 -0
  170. data/lib/jamf/api/jamf_pro/oapi_schemas/{put_computer_prestage.rb → dashboard_setup_task.rb} +17 -12
  171. data/lib/jamf/api/jamf_pro/oapi_schemas/data_roaming_setting.rb +1 -1
  172. data/lib/jamf/api/jamf_pro/oapi_schemas/database_password.rb +1 -1
  173. data/lib/jamf/api/jamf_pro/oapi_schemas/day_of_week.rb +1 -1
  174. data/lib/jamf/api/jamf_pro/oapi_schemas/declarative_management_command.rb +1 -1
  175. data/lib/jamf/api/jamf_pro/oapi_schemas/delete_user_command.rb +1 -1
  176. data/lib/jamf/api/jamf_pro/oapi_schemas/department.rb +1 -1
  177. data/lib/jamf/api/jamf_pro/oapi_schemas/departments_search_results.rb +1 -1
  178. data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task.rb +1 -1
  179. data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task_search_results.rb +1 -1
  180. data/lib/jamf/api/jamf_pro/oapi_schemas/device_communication_settings.rb +1 -1
  181. data/lib/jamf/api/jamf_pro/oapi_schemas/device_compliance_information.rb +1 -1
  182. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device.rb +1 -1
  183. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device_search_results.rb +1 -1
  184. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_body.rb +1 -1
  185. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_response.rb +1 -1
  186. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance.rb +1 -1
  187. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_search_results.rb +1 -1
  188. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_sync_status.rb +1 -1
  189. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage.rb +1 -1
  190. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage_v2.rb +1 -1
  191. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_token.rb +1 -1
  192. data/lib/jamf/api/jamf_pro/oapi_schemas/diagnostic_submission_setting.rb +1 -1
  193. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook.rb +1 -1
  194. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_exclusions.rb +1 -1
  195. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_limitations.rb +1 -1
  196. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_scope.rb +1 -1
  197. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_search_results.rb +1 -1
  198. data/lib/jamf/api/jamf_pro/oapi_schemas/enable_lost_mode_command.rb +1 -1
  199. data/lib/jamf/api/jamf_pro/oapi_schemas/engage.rb +1 -1
  200. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_preview.rb +1 -1
  201. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_v2.rb +1 -1
  202. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization.rb +1 -1
  203. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_branding_settings.rb +1 -1
  204. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependencies.rb +1 -1
  205. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependency.rb +1 -1
  206. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_ldap_group_access.rb +1 -1
  207. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel.rb +1 -1
  208. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_ldap_auth.rb +1 -1
  209. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_list.rb +1 -1
  210. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_sso_auth.rb +1 -1
  211. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_text.rb +1 -1
  212. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results.rb +1 -1
  213. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results_v2.rb +1 -1
  214. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_v2.rb +1 -1
  215. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_method.rb +1 -1
  216. data/lib/jamf/api/jamf_pro/oapi_schemas/{patch_ids_on_dashboard.rb → enrollment_method_prestage.rb} +17 -13
  217. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_process_text_object.rb +1 -1
  218. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings_v2.rb +5 -1
  219. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings_v3.rb +240 -0
  220. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_sso_config.rb +90 -0
  221. data/lib/jamf/api/jamf_pro/oapi_schemas/erase_device_command.rb +120 -0
  222. data/lib/jamf/api/jamf_pro/oapi_schemas/export_field.rb +1 -1
  223. data/lib/jamf/api/jamf_pro/oapi_schemas/export_parameters.rb +1 -1
  224. data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute.rb +1 -1
  225. data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute_v2.rb +1 -1
  226. data/lib/jamf/api/jamf_pro/oapi_schemas/external_recipient.rb +1 -1
  227. data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment.rb +1 -1
  228. data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_delete.rb +1 -1
  229. data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_v2.rb +1 -1
  230. data/lib/jamf/api/jamf_pro/oapi_schemas/font_path.rb +1 -1
  231. data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage_v2.rb +1 -1
  232. data/lib/jamf/api/jamf_pro/oapi_schemas/{get_computer_prestage.rb → get_computer_prestage_v3.rb} +24 -18
  233. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization.rb +1 -1
  234. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel.rb +1 -1
  235. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_ldap_auth.rb +1 -1
  236. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_sso_auth.rb +1 -1
  237. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_text.rb +1 -1
  238. data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage.rb +1 -1
  239. data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage_v2.rb +1 -1
  240. data/lib/jamf/api/jamf_pro/oapi_schemas/group_mappings.rb +1 -1
  241. data/lib/jamf/api/jamf_pro/oapi_schemas/group_membership.rb +1 -1
  242. data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search.rb +1 -1
  243. data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_request.rb +1 -1
  244. data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_response.rb +1 -1
  245. data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results.rb +1 -1
  246. data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results_v1.rb +1 -1
  247. data/lib/jamf/api/jamf_pro/oapi_schemas/href_response.rb +3 -3
  248. data/lib/jamf/api/jamf_pro/oapi_schemas/icon_response.rb +1 -1
  249. data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name.rb +1 -1
  250. data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name_v2.rb +1 -1
  251. data/lib/jamf/api/jamf_pro/oapi_schemas/ids.rb +1 -1
  252. data/lib/jamf/api/jamf_pro/oapi_schemas/initialize.rb +1 -1
  253. data/lib/jamf/api/jamf_pro/oapi_schemas/initialize_v1.rb +1 -1
  254. data/lib/jamf/api/jamf_pro/oapi_schemas/install_package.rb +1 -1
  255. data/lib/jamf/api/jamf_pro/oapi_schemas/internal_recipient.rb +1 -1
  256. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_information.rb +1 -1
  257. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_list_mobile_device.rb +1 -1
  258. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_list_mobile_device_search_results.rb +1 -1
  259. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_error.rb +1 -1
  260. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error.rb +1 -1
  261. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error_cause.rb +1 -1
  262. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_success.rb +1 -1
  263. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute.rb +1 -1
  264. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column.rb +1 -1
  265. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column_result.rb +1 -1
  266. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_invalid_csv_response.rb +1 -1
  267. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record.rb +1 -1
  268. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results.rb +1 -1
  269. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results_v2.rb +1 -1
  270. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_v2.rb +1 -1
  271. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_configuration.rb +1 -1
  272. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_search_results.rb +1 -1
  273. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details.rb +4 -4
  274. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details_v2.rb +7 -7
  275. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_application_response.rb +1 -1
  276. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_nation_credentials.rb +1 -1
  277. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_package_response.rb +1 -1
  278. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_information.rb +1 -1
  279. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_information_v2.rb +1 -1
  280. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_server_url.rb +1 -1
  281. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_version.rb +1 -1
  282. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_protect_plan.rb +1 -1
  283. data/lib/jamf/api/jamf_pro/oapi_schemas/language_code.rb +1 -1
  284. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_audit.rb +1 -1
  285. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_audit_v2.rb +1 -1
  286. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_history.rb +113 -0
  287. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_history_response.rb +90 -0
  288. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_password_and_audits.rb +1 -1
  289. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_password_and_audits_v2.rb +1 -1
  290. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_password_audits_results.rb +1 -1
  291. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_password_audits_results_v2.rb +1 -1
  292. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_password_response.rb +1 -1
  293. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_password_response_v2.rb +1 -1
  294. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_pending_rotation.rb +88 -0
  295. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_pending_rotation_response.rb +90 -0
  296. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_settings_request.rb +1 -1
  297. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_settings_request_v2.rb +1 -1
  298. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_settings_response.rb +1 -1
  299. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_settings_response_v2.rb +1 -1
  300. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user.rb +20 -2
  301. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user_password.rb +1 -1
  302. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user_password_request.rb +1 -1
  303. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user_password_request_v2.rb +2 -2
  304. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user_password_response.rb +1 -1
  305. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user_password_response_v2.rb +2 -2
  306. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user_password_v2.rb +1 -1
  307. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user_results.rb +1 -1
  308. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user_results_v2.rb +1 -1
  309. data/lib/jamf/api/jamf_pro/oapi_schemas/laps_user_v2.rb +21 -2
  310. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_request.rb +1 -1
  311. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_response.rb +1 -1
  312. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_update.rb +1 -1
  313. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group.rb +1 -1
  314. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group_search_results.rb +1 -1
  315. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_server.rb +1 -1
  316. data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile.rb +1 -1
  317. data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile_search_results.rb +1 -1
  318. data/lib/jamf/api/jamf_pro/oapi_schemas/locale.rb +1 -1
  319. data/lib/jamf/api/jamf_pro/oapi_schemas/location.rb +1 -1
  320. data/lib/jamf/api/jamf_pro/oapi_schemas/location_information.rb +1 -1
  321. data/lib/jamf/api/jamf_pro/oapi_schemas/location_information_v2.rb +1 -1
  322. data/lib/jamf/api/jamf_pro/oapi_schemas/location_v2.rb +1 -1
  323. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_configuration.rb +1 -1
  324. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_search_results.rb +1 -1
  325. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update.rb +1 -1
  326. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update_response.rb +1 -1
  327. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan.rb +163 -0
  328. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_group_post.rb +99 -0
  329. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_post.rb +98 -0
  330. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_post_response.rb +100 -0
  331. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle.rb +101 -0
  332. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plans.rb +102 -0
  333. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_status.rb +1 -1
  334. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_statuses.rb +1 -1
  335. data/lib/jamf/api/jamf_pro/oapi_schemas/markdown.rb +1 -1
  336. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_client_type.rb +1 -1
  337. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command.rb +1 -1
  338. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_client.rb +1 -1
  339. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_client_request.rb +1 -1
  340. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_request.rb +1 -1
  341. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_results.rb +1 -1
  342. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_state.rb +1 -1
  343. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_type.rb +1 -1
  344. data/lib/jamf/api/jamf_pro/oapi_schemas/membership_mappings.rb +1 -1
  345. data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_request.rb +1 -1
  346. data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_response.rb +1 -1
  347. data/lib/jamf/api/jamf_pro/oapi_schemas/memcached_endpoints.rb +1 -1
  348. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device.rb +1 -1
  349. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_application.rb +1 -1
  350. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_application_inventory_detail.rb +123 -0
  351. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment.rb +1 -1
  352. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment_v2.rb +1 -1
  353. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate.rb +94 -0
  354. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v1.rb +1 -1
  355. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v2.rb +1 -1
  356. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details.rb +1 -1
  357. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_get_v2.rb +1 -1
  358. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_v2.rb +1 -1
  359. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_ebook.rb +1 -1
  360. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_ebook_inventory_detail.rb +105 -0
  361. data/lib/jamf/api/jamf_pro/oapi_schemas/{azure_ad_migration_report_process_status.rb → mobile_device_extension_attribute.rb} +45 -35
  362. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_extension_attribute_results.rb +1 -1
  363. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_general.rb +215 -0
  364. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_group.rb +1 -1
  365. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_hardware.rb +160 -0
  366. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_inventory.rb +151 -0
  367. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_inventory_search_results.rb +89 -0
  368. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_ios_general.rb +191 -0
  369. data/lib/jamf/api/jamf_pro/oapi_schemas/{azure_ad_migration_report_request.rb → mobile_device_ios_inventory.rb} +45 -34
  370. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_lost_mode_location.rb +118 -0
  371. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_network.rb +180 -0
  372. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage.rb +1 -1
  373. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name.rb +1 -1
  374. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name_v2.rb +1 -1
  375. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names.rb +1 -1
  376. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names_v2.rb +1 -1
  377. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results.rb +1 -1
  378. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results_v2.rb +1 -1
  379. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_v2.rb +1 -1
  380. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_profile.rb +112 -0
  381. data/lib/jamf/api/jamf_pro/oapi_schemas/{provisioning_profile.rb → mobile_device_provisioning_profiles.rb} +4 -4
  382. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_purchasing.rb +157 -0
  383. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_params.rb +1 -1
  384. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results.rb +1 -1
  385. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results_v2.rb +1 -1
  386. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_section.rb +100 -0
  387. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_security.rb +178 -0
  388. data/lib/jamf/api/jamf_pro/oapi_schemas/{mobile_device_service_subscription.rb → mobile_device_service_subscriptions.rb} +4 -4
  389. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_shared_user.rb +93 -0
  390. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_tv_os_general.rb +93 -0
  391. data/lib/jamf/api/jamf_pro/oapi_schemas/{integer_wrapper.rb → mobile_device_tv_os_inventory.rb} +10 -11
  392. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_user_and_location.rb +142 -0
  393. data/lib/jamf/api/jamf_pro/oapi_schemas/{active_patch_summary.rb → mobile_device_user_profile.rb} +31 -38
  394. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_v2.rb +1 -1
  395. data/lib/jamf/api/jamf_pro/oapi_schemas/network.rb +1 -1
  396. data/lib/jamf/api/jamf_pro/oapi_schemas/network_v2.rb +1 -1
  397. data/lib/jamf/api/jamf_pro/oapi_schemas/notification.rb +1 -1
  398. data/lib/jamf/api/jamf_pro/oapi_schemas/notification_type.rb +1 -1
  399. data/lib/jamf/api/jamf_pro/oapi_schemas/notification_v1.rb +1 -1
  400. data/lib/jamf/api/jamf_pro/oapi_schemas/{extension_attribute_migration_mapping_change.rb → o_auth_client_credentials.rb} +12 -19
  401. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history.rb +1 -1
  402. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_note.rb +1 -1
  403. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_v1.rb +1 -1
  404. data/lib/jamf/api/jamf_pro/oapi_schemas/order_by.rb +1 -1
  405. data/lib/jamf/api/jamf_pro/oapi_schemas/package_manifest.rb +1 -1
  406. data/lib/jamf/api/jamf_pro/oapi_schemas/parent_app.rb +1 -1
  407. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policies.rb +1 -1
  408. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_detail.rb +190 -0
  409. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_details.rb +89 -0
  410. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_list_view.rb +1 -1
  411. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log_detail.rb +1 -1
  412. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log_detail_action.rb +1 -1
  413. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log_eligible_retry_count.rb +1 -1
  414. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log_retry.rb +1 -1
  415. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log_v2.rb +1 -1
  416. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_logs.rb +1 -1
  417. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_v2_on_dashboard.rb +1 -1
  418. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_configuration.rb +1 -1
  419. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_configuration_base.rb +1 -1
  420. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_configuration_definition_kill_app.rb +1 -1
  421. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_configuration_dependencies.rb +89 -0
  422. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_configuration_dependency.rb +87 -0
  423. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_configuration_extension_attributes.rb +1 -1
  424. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_configuration_patch.rb +1 -1
  425. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_definition.rb +1 -1
  426. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_definitions.rb +1 -1
  427. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_extension_attributes.rb +1 -1
  428. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_packages.rb +1 -1
  429. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_report.rb +1 -1
  430. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_software_title_report_search_result.rb +1 -1
  431. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_summary.rb +1 -1
  432. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_summary_version.rb +1 -1
  433. data/lib/jamf/api/jamf_pro/oapi_schemas/personal_hotspot_setting.rb +1 -1
  434. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_configuration_post.rb +133 -0
  435. data/lib/jamf/api/jamf_pro/oapi_schemas/{patch_policy_attempt.rb → plan_device.rb} +32 -29
  436. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device_post.rb +97 -0
  437. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device_response.rb +96 -0
  438. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_group_post.rb +96 -0
  439. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_search_results.rb +1 -1
  440. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_status.rb +126 -0
  441. data/lib/jamf/api/jamf_pro/oapi_schemas/plugin_path.rb +1 -1
  442. data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties.rb +1 -1
  443. data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties_v1.rb +1 -1
  444. data/lib/jamf/api/jamf_pro/oapi_schemas/post_computer_prestage_v2.rb +1 -1
  445. data/lib/jamf/api/jamf_pro/oapi_schemas/post_computer_prestage_v3.rb +91 -0
  446. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependencies.rb +1 -1
  447. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependency.rb +1 -1
  448. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment.rb +1 -1
  449. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment_v2.rb +1 -1
  450. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information.rb +1 -1
  451. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information_v2.rb +1 -1
  452. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope.rb +1 -1
  453. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment.rb +1 -1
  454. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment_v2.rb +1 -1
  455. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response.rb +1 -1
  456. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response_v2.rb +1 -1
  457. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_update.rb +1 -1
  458. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_v2.rb +1 -1
  459. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status.rb +1 -1
  460. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status_v2.rb +1 -1
  461. data/lib/jamf/api/jamf_pro/oapi_schemas/process_texts_search_results.rb +1 -1
  462. data/lib/jamf/api/jamf_pro/oapi_schemas/protect_registration_request.rb +1 -1
  463. data/lib/jamf/api/jamf_pro/oapi_schemas/protect_settings_response.rb +1 -1
  464. data/lib/jamf/api/jamf_pro/oapi_schemas/protect_updatable_settings_request.rb +1 -1
  465. data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing.rb +1 -1
  466. data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing_v2.rb +1 -1
  467. data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage_v2.rb +1 -1
  468. data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage_v3.rb +98 -0
  469. data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage.rb +1 -1
  470. data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage_v2.rb +1 -1
  471. data/lib/jamf/api/jamf_pro/oapi_schemas/recalculation_results.rb +1 -1
  472. data/lib/jamf/api/jamf_pro/oapi_schemas/recipient.rb +1 -1
  473. data/lib/jamf/api/jamf_pro/oapi_schemas/recipients.rb +1 -1
  474. data/lib/jamf/api/jamf_pro/oapi_schemas/redeploy_jamf_management_framework_response.rb +1 -1
  475. data/lib/jamf/api/jamf_pro/oapi_schemas/reenrollment.rb +1 -1
  476. data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_response.rb +1 -1
  477. data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_search_results.rb +1 -1
  478. data/lib/jamf/api/jamf_pro/oapi_schemas/renew_mdm_profile_response.rb +1 -1
  479. data/lib/jamf/api/jamf_pro/oapi_schemas/restart_device_command.rb +1 -1
  480. data/lib/jamf/api/jamf_pro/oapi_schemas/safelisted_app.rb +1 -1
  481. data/lib/jamf/api/jamf_pro/oapi_schemas/script.rb +1 -1
  482. data/lib/jamf/api/jamf_pro/oapi_schemas/scripts_search_results.rb +1 -1
  483. data/lib/jamf/api/jamf_pro/oapi_schemas/security.rb +1 -1
  484. data/lib/jamf/api/jamf_pro/oapi_schemas/security_v2.rb +1 -1
  485. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_install_settings.rb +1 -1
  486. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_interaction_settings.rb +1 -1
  487. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_login_settings.rb +1 -1
  488. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_settings.rb +1 -1
  489. data/lib/jamf/api/jamf_pro/oapi_schemas/session.rb +1 -1
  490. data/lib/jamf/api/jamf_pro/oapi_schemas/session_candidate_request.rb +1 -1
  491. data/lib/jamf/api/jamf_pro/oapi_schemas/session_details.rb +1 -1
  492. data/lib/jamf/api/jamf_pro/oapi_schemas/session_details_search_results.rb +1 -1
  493. data/lib/jamf/api/jamf_pro/oapi_schemas/session_status.rb +1 -1
  494. data/lib/jamf/api/jamf_pro/oapi_schemas/set_auto_admin_password_command.rb +1 -1
  495. data/lib/jamf/api/jamf_pro/oapi_schemas/set_recovery_lock_command.rb +1 -1
  496. data/lib/jamf/api/jamf_pro/oapi_schemas/settings_command.rb +1 -1
  497. data/lib/jamf/api/jamf_pro/oapi_schemas/shared_device_configuration.rb +1 -1
  498. data/lib/jamf/api/jamf_pro/oapi_schemas/signature.rb +1 -1
  499. data/lib/jamf/api/jamf_pro/oapi_schemas/site.rb +1 -1
  500. data/lib/jamf/api/jamf_pro/oapi_schemas/smart_search_criterion.rb +1 -1
  501. data/lib/jamf/api/jamf_pro/oapi_schemas/software_title_configuration_on_dashboard.rb +1 -1
  502. data/lib/jamf/api/jamf_pro/oapi_schemas/software_update_settings.rb +1 -1
  503. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_failover_data.rb +1 -1
  504. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore.rb +1 -1
  505. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_cert_parse_response.rb +1 -1
  506. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_details.rb +1 -1
  507. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_parse.rb +1 -1
  508. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response.rb +1 -1
  509. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response_with_details.rb +1 -1
  510. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_with_details.rb +1 -1
  511. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_metadata_url.rb +1 -1
  512. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_settings.rb +15 -2
  513. data/lib/jamf/api/jamf_pro/oapi_schemas/startup_status.rb +1 -1
  514. data/lib/jamf/api/jamf_pro/oapi_schemas/static_group.rb +1 -1
  515. data/lib/jamf/api/jamf_pro/oapi_schemas/static_group_assignment.rb +1 -1
  516. data/lib/jamf/api/jamf_pro/oapi_schemas/static_group_search_results.rb +1 -1
  517. data/lib/jamf/api/jamf_pro/oapi_schemas/static_group_summary.rb +1 -1
  518. data/lib/jamf/api/jamf_pro/oapi_schemas/static_user_group.rb +1 -1
  519. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity.rb +1 -1
  520. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_certificate_upload.rb +1 -1
  521. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_create.rb +1 -1
  522. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_search_results.rb +1 -1
  523. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_update.rb +1 -1
  524. data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_features.rb +1 -1
  525. data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_request.rb +1 -1
  526. data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_response.rb +1 -1
  527. data/lib/jamf/api/jamf_pro/oapi_schemas/time_frame.rb +1 -1
  528. data/lib/jamf/api/jamf_pro/oapi_schemas/time_zone.rb +1 -1
  529. data/lib/jamf/api/jamf_pro/oapi_schemas/tv_os_details.rb +1 -1
  530. data/lib/jamf/api/jamf_pro/oapi_schemas/udids.rb +1 -1
  531. data/lib/jamf/api/jamf_pro/oapi_schemas/update_apple_tv.rb +1 -1
  532. data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios.rb +1 -1
  533. data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios_v2.rb +1 -1
  534. data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device.rb +1 -1
  535. data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device_v2.rb +1 -1
  536. data/lib/jamf/api/jamf_pro/oapi_schemas/update_tv_os.rb +1 -1
  537. data/lib/jamf/api/jamf_pro/oapi_schemas/user_mappings.rb +1 -1
  538. data/lib/jamf/api/jamf_pro/oapi_schemas/user_preferences_settings.rb +1 -1
  539. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_attributes.rb +1 -1
  540. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search.rb +1 -1
  541. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_request.rb +1 -1
  542. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_response.rb +1 -1
  543. data/lib/jamf/api/jamf_pro/oapi_schemas/v1_site.rb +1 -1
  544. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_ca_record.rb +1 -1
  545. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record.rb +1 -1
  546. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record_search_results.rb +1 -1
  547. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_service_status.rb +1 -1
  548. data/lib/jamf/api/jamf_pro/oapi_schemas/verbose_package_deployment_response.rb +1 -1
  549. data/lib/jamf/api/jamf_pro/oapi_schemas/voice_roaming_setting.rb +1 -1
  550. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_content.rb +1 -1
  551. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_content_list.rb +1 -1
  552. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location.rb +1 -1
  553. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_list_view.rb +1 -1
  554. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_patch.rb +1 -1
  555. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_post.rb +1 -1
  556. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_locations.rb +1 -1
  557. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription.rb +1 -1
  558. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription_base.rb +1 -1
  559. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscriptions.rb +1 -1
  560. data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_admin_account.rb +1 -1
  561. data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_token_subscription.rb +1 -1
  562. data/lib/jamf/api/jamf_pro/oapi_schemas/web_link.rb +1 -1
  563. data/lib/jamf/version.rb +1 -1
  564. data/lib/jamf/zeitwerk_config.rb +8 -0
  565. metadata +74 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 723328fc03b943e9453d8575edabd1a764582711f87c609dcbc439c147957ea6
4
- data.tar.gz: 43f8c1cbde95f56e977678ba9a1573781761cae0635b9f89592ec5dab1b0aecf
3
+ metadata.gz: 5404634d6e9f6031506f64c61391ca5a461ad71e372922d20c2785022cede9e7
4
+ data.tar.gz: 435a69e88d14c9df2ddac29ed1ce8a8dffd485ac2c6969d6f765a92a67d75c97
5
5
  SHA512:
6
- metadata.gz: 7d95f14055ae3668af94a9aa0b8932255dcc6adf93175318ec4218a510a0ce8fa95cf99ffd60a803245b87f4087e733a51872c2b05c543f1dc025d3b5dfaf876
7
- data.tar.gz: 79ddfbe92115d2d1325b6de74c1d999bf6f439ea4f0cab95a6b52b1e8055016abac9078873d2b63c4351eaeb0d0a8aa19c71a9c47e2bd8734e3b8ca8f5130f02
6
+ metadata.gz: c75068fdbb7fbe7c780a46f76e2430ed3c00f3b5afd4cf6020d4ad39d961b07207f4da27a466eb990f164ea499a123a2e12d2a79c42b95b6f208c07f5554cdbd
7
+ data.tar.gz: 1e8dc60c2f322c147b7650b76c565fc04c959c8eb43554b5efed0c8f7ce032683f22ee967d23c494dea2f4a949e96f8b03d32d1aa369219d9545559edbb0c187
data/CHANGES.md CHANGED
@@ -2,7 +2,7 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
+ and this project attempts to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## _IMPORTANT_: Known Security Issue in v1.5.3 and below
8
8
 
@@ -14,12 +14,38 @@ __Please update all installations of ruby-jss to at least v1.6.0.__
14
14
 
15
15
  Many many thanks to actae0n of Blacksun Hackers Club for reporting this issue and providing examples of how it could be exploited.
16
16
 
17
+ --------
18
+ ## \[4.0.0] 2024-01-22
19
+
20
+ ### Changed
21
+ - Jamf::ComputerPrestage now accesses the v3 endpoints as needed - the v1 and some v2 endpoints are deprecated and will be removed from the Jamf Pro API sometime soon
22
+
23
+ - Jamf::Prestage (ComputerPrestage and MobileDevicePrestage) no longer accesses Jamf::DeviceEnrollment for pre-validation. The API itself will report these kinds of errors when prestage scope changes are saved. See the ['Cross-object valildation in setters' section of the file _README-2.0.0.md_](README-2.0.0.md#cross-object-validation-in-setters)
24
+
25
+ - Jamf::Prestage (ComputerPrestage and MobileDevicePrestage) no longer caches any data from the server. All methods that take a `refresh` parameter (positional or named) will ignore that parameter and always fetch fresh data. This applies to mostly to the current scope (assignments) for the prestages. This is in line with the ['API data are no longer cached' section of the file _README-2.0.0.md](README-2.0.0.md#api-data-are-no-longer-cached-) (and also, the data was being cached in an inappropriate place). If making many calls at once, consisider capturing the data in your own variable. See also the deprecations listed below.
26
+
27
+ ### Added
28
+ - Support for API Roles and API Clients (requires Jamf Pro 10.49 and up).
29
+ - Two new classes: `Jamf::APIRole` and `Jamf::APIClient` provide access to the definitions of these objects via the 'api-roles' and 'api-integrations' endpoints respectively. There are also methods for listing all available privileges for defining roles, and for rotating the clientSecret of clients.
30
+
31
+ - Connections can now be made using API clients. When specifying connection parameters, just use `client_id:` instead of `user:` and `client_secret` instead of `pw:`. For example:
32
+
33
+ `Jamf.cnx.connect client_id: "a83cb7bc-5a61-4e5f-b894-5d63dca2e355", client_secret: "seCretString", host: 'jamfpro.company.com', port: 8443`
34
+
35
+ NOTE that 'keep_alive' cannot be used with API Clients - the tokens generated with them will expire at the appropriate time, which is usually much shorter than the session timeout for standard connections.
36
+
37
+ ### Fixed
38
+ - Bugfix when flushing or refreshing cached data
39
+ - Bugfix when validating data for saving newly-created objects to the Jamf Pro API
40
+
41
+ ### Deprecated
42
+ - Jamf::Prestage (ComputerPrestage and MobileDevicePrestage): the `refresh` parameter will be removed from all class and instance methods in a future version of ruby-jss. It currently is still accepted, but does nothing. See the changes listed above.
43
+
17
44
  --------
18
45
  ## \[3.2.1] 2023-09-12
19
46
 
20
47
  ### Fixed
21
48
  - Don't look at the management_status of unmanaged computers, it doesn't exist.
22
-
23
49
 
24
50
  --------
25
51
  ## \[3.2.1] 2023-09-08
data/README-2.0.0.md CHANGED
@@ -191,12 +191,14 @@ If you want to avoid repeated GET requests to the server when you aren't worried
191
191
 
192
192
  ### No Attribute aliases for Jamf Pro API objects
193
193
 
194
- Objects from the Jamf Pro API will no longer define aliases for the attribute names that come from the API itself. This means, e.g., to get the name of a ComputerPrestage or MobileDevicePrestage, you have to ask for its `displayName` not its `name`, since the property comes from the API as `displayName`. To see a list of all the names, you must use `.all_displayNames` not `.all_names`. For objects with a 'name' property (most of them) then you can use `.name` and `.all_names`.
194
+ In most cases, objects from the Jamf Pro API will no longer define aliases for the attribute names that come from the API itself. This means, e.g., to get the name of a ComputerPrestage or MobileDevicePrestage, you have to ask for its `displayName` not its `name`, since the property comes from the API as `displayName`. To see a list of all the names, you must use `.all_displayNames` not `.all_names`. For objects with a 'name' property (most of them) then you can use `.name` and `.all_names`.
195
195
 
196
196
  The reason behind this is twofold:
197
197
  1) to simplify ruby-jss's code and automate as much as possible
198
198
  2) to reflect what Jamf actually gives us in the APIs
199
199
 
200
+ There may be times when exceptions to this are appropriate. For example, in the Jamf Pro Webapp, the API Roles assigned to API Clients are called 'API Roles' or just 'roles'. However in the API data for APIClients (which themselves are called APIIntegrations), the roles are called 'authorizationScopes'. In order to agree with the webapp, the various 'authorizationScopes*' methods have matching 'roles*' aliases.
201
+
200
202
  **IMPORTANT** This is a breaking change from earlier ruby-jss versions, for which Jamf Pro API objects had the potential for aliases of their attribute names.
201
203
 
202
204
  ### Class/Mixin hierarchy for Jamf Pro API objects
@@ -40,7 +40,7 @@ module Jamf
40
40
  # when ruby-jss is required
41
41
  EXTENDABLE_CLASSES = %w[Jamf::Computer Jamf::MobileDevice Jamf::User].freeze
42
42
 
43
- # @return [Concurrent::Map.new] This Hash-like object caches the results of
43
+ # @return [Concurrent::Map] This Hash-like object caches the results of
44
44
  # C-API queries for an APIObject
45
45
  # subclass's .all summary list, keyed by the subclass's RSRC_LIST_KEY.
46
46
  # See the APIObject.all class method.
@@ -97,7 +97,7 @@ module Jamf
97
97
  # won't be removed from memory by garbage collection but all cached data
98
98
  # will be recached as needed.
99
99
  #
100
- # e.g.s
100
+ # e.g.
101
101
  # my_ref = Jamf::SomeClass.all
102
102
  # # my_ref now points to the same cached hash that Jamf::SomeClass.all does
103
103
  #
@@ -122,20 +122,21 @@ module Jamf
122
122
  def flushcache(key_or_klass = nil)
123
123
  # EA defs for just one extendable class?
124
124
  if EXTENDABLE_CLASSES.include? key_or_klass.to_s
125
- @c_ext_attr_definition_cache[key_or_klass] = Concurrent::Hash.new
125
+ @c_ext_attr_definition_cache[key_or_klass] = Concurrent::Map.new
126
126
 
127
127
  # one API object class?
128
128
  elsif key_or_klass
129
129
  map_key_pfx = "#{key_or_klass}_map_"
130
- @c_object_list_cache.delete_if do |cache_key, _cache|
131
- cache_key == key_or_klass || cache_key.to_s.start_with?(map_key_pfx)
132
- end
130
+ @c_object_list_cache.each_key do |cache_key|
131
+ next unless cache_key == key_or_klass || cache_key.to_s.start_with?(map_key_pfx)
133
132
 
133
+ @c_object_list_cache.delete cache_key
134
+ end
134
135
 
135
136
  # flush everything
136
137
  else
137
- @c_object_list_cache = Concurrent::Hash.new
138
- @c_ext_attr_definition_cache = Concurrent::Hash.new
138
+ @c_object_list_cache = Concurrent::Map.new
139
+ @c_ext_attr_definition_cache = Concurrent::Map.new
139
140
  end
140
141
 
141
142
  GC.start
@@ -88,6 +88,22 @@ module Jamf
88
88
  # in the parameters. See {Jamf::Configuration}. If there are no config values
89
89
  # then a built-in default is used if available.
90
90
  #
91
+ # ### API Clients
92
+ #
93
+ # As of Jamf Pro 10.49, API connections can be made using "API Clients" which are
94
+ # assigned to various "API Roles", as well as regular Jamf Pro accounts.
95
+ #
96
+ # Connections made with API Client credentials are different from regular connections:
97
+ # - Their expiration period can vary based on the Client definition
98
+ # - The expirations are usually quite short, less than the default 30 min. session timeout
99
+ # - They cannot be kept alive, they will become invalid when the expiration time arrives.
100
+ # - The API endpoints and data exchange used for making API Client connections are
101
+ # different from those used by normal connections.
102
+ #
103
+ # To make a connection using an API Client, pass in the client_id: and client_secret: instead
104
+ # of user: and pw:
105
+ #
106
+ #####################
91
107
  #
92
108
  # @param url[String] The URL to use for the connection. Must be 'https'.
93
109
  # The host, port, and (if provided), user and spassword will be extracted.
@@ -108,13 +124,23 @@ module Jamf
108
124
  # server_path: 'dev_mgmt/jssweb'
109
125
  #
110
126
  # @option params :user[String] a JSS user who has API privs, required if not
111
- # defined in Jamf::CONFIG
127
+ # defined in Jamf::CONFIG.
128
+ # NOTE: To use an API Client (Jamf pro 10.49 and up),
129
+ # provide client_id: instead of user:
130
+ #
131
+ # @option params :client_id[String] The Client ID of an "API Client"
132
+ # available in Jamf Pro 10.49 and up. Use this instead of user:
133
+ #
134
+ # @option params :client_secret[String] The Client Secret of an "API Client"
135
+ # available in Jamf Pro 10.49 and up. Use this instead of pw:
112
136
  #
113
137
  # @option params :pw[String, Symbol] The user's password, :prompt, or :stdin
114
138
  # If :prompt, the user is promted on the commandline to enter the password
115
139
  # If :stdin#, the password is read from a line of std in represented by
116
140
  # the digit at #, so :stdin3 reads the passwd from the third line of
117
141
  # standard input. Defaults to line 1, if no digit is supplied. see {JSS.stdin}
142
+ # NOTE: To use an API Client (Jamf pro 10.49 and up),
143
+ # provide client_secret: instead of pw:
118
144
  #
119
145
  # @option params :port[Integer] the port number to connect with, defaults
120
146
  # to 443 for Jamf Cloud hosts, 8443 for on-prem hosts
@@ -287,7 +313,6 @@ module Jamf
287
313
  private
288
314
 
289
315
  # Get host, port, & user from a Token object
290
- # or just the user from a token string.
291
316
  #######################################################
292
317
  def parse_token(params)
293
318
  return unless params[:token].is_a? Jamf::Connection::Token
@@ -349,6 +374,10 @@ module Jamf
349
374
  # (will be set via client defaults or module defaults)
350
375
  params[:port] ||= Jamf::Connection::JAMFCLOUD_PORT if params[:host].to_s.end_with?(Jamf::Connection::JAMFCLOUD_DOMAIN)
351
376
 
377
+ # if we're using an API client, the id and secret are synonyms of the user and pw
378
+ params[:user] ||= params[:client_id]
379
+ params[:pw] ||= params[:client_secret]
380
+
352
381
  apply_defaults_from_config(params)
353
382
 
354
383
  apply_defaults_from_client(params)
@@ -466,6 +495,8 @@ module Jamf
466
495
  token_params = {
467
496
  base_url: build_base_url(params),
468
497
  user: params[:user],
498
+ client_id: params[:client_id],
499
+ client_secret: params[:client_secret],
469
500
  timeout: params[:timeout],
470
501
  keep_alive: params[:keep_alive],
471
502
  refresh_buffer: params[:token_refresh_buffer],
@@ -34,6 +34,11 @@ module Jamf
34
34
 
35
35
  # This version of ruby-jss only works with this version of the server
36
36
  # and higher
37
+ #
38
+ # NOTE: Some objects and features may require newer versions of Jamf Pro than this.
39
+ # However this is the minimum required for even making an API connection using this
40
+ # version of ruby-jss.
41
+ #
37
42
  MIN_JAMF_VERSION = Gem::Version.new('10.35.0')
38
43
 
39
44
  # The base of the Classic API resources
@@ -45,6 +45,12 @@ module Jamf
45
45
 
46
46
  JAMF_VERSION_RSRC = "#{JAMF_VERSION_RSRC_VERSION}/jamf-pro-version".freeze
47
47
 
48
+ OAUTH_RSRC = 'oauth'.freeze
49
+
50
+ API_CLIENT_TOKEN_RSRC = "#{OAUTH_RSRC}/token".freeze
51
+
52
+ API_CLIENT_GRANT_TYPE = 'client_credentials'.freeze
53
+
48
54
  # Recognize the tryitout server, cuz its /auth endpoint
49
55
  # is disabled, and it needs no tokens
50
56
  # TODO: MOVE THIS TO THE CONNECTION CLASS
@@ -155,6 +161,9 @@ module Jamf
155
161
  @pw_fallback = false unless @pw
156
162
  init_from_token_string params[:token_string]
157
163
 
164
+ elsif @client_id
165
+ init_for_api_client
166
+
158
167
  elsif @user && @pw
159
168
  init_from_pw
160
169
 
@@ -166,6 +175,32 @@ module Jamf
166
175
  @creation_time = Time.now
167
176
  end # init
168
177
 
178
+ # Initialize for an API client
179
+ #################################
180
+ def init_for_api_client
181
+ data = {
182
+ client_id: @client_id,
183
+ client_secret: Base64.decode64(@pw),
184
+ grant_type: API_CLIENT_GRANT_TYPE
185
+ }
186
+
187
+ resp = api_client_auth_connection(API_CLIENT_TOKEN_RSRC).post { |req| req.body = data }
188
+
189
+ if resp.success?
190
+ parse_token_from_api_client_auth resp
191
+ @creation_http_response = resp
192
+ whoami = token_connection(AUTH_RSRC, token: @token).get
193
+ @user = "#{whoami.body[:account][:username]} (API Client)"
194
+ elsif resp.status == 401
195
+ raise Jamf::AuthenticationError, 'Incorrect client_id or client_secret'
196
+ else
197
+ # TODO: better error reporting here
198
+ raise Jamf::AuthenticationError, "An error occurred while authenticating client_id: #{resp.body}"
199
+ end
200
+ ensure
201
+ @pw = nil
202
+ end
203
+
169
204
  # Initialize from password
170
205
  #################################
171
206
  def init_from_pw
@@ -430,7 +465,18 @@ module Jamf
430
465
 
431
466
  @timeout = params[:timeout] || Jamf::Connection::DFT_TIMEOUT
432
467
 
433
- @user = params[:user]
468
+ if params[:client_id]
469
+ @client_id = params[:client_id]
470
+ params[:keep_alive] = false
471
+ params[:refresh_buffer] = nil
472
+ params[:pw_fallback] = false
473
+ else
474
+ @user = params[:user]
475
+ end
476
+
477
+ # when using an API client, the client secret can be
478
+ # given in params[:client_secret] or params[:pw]
479
+ params[:pw] ||= params[:client_secret]
434
480
 
435
481
  # @pw will be deleted after use if pw_fallback is false
436
482
  # It is stored as base64 merely for visual security in irb sessions
@@ -496,6 +542,19 @@ module Jamf
496
542
  end # Faraday.new
497
543
  end # token_connection
498
544
 
545
+ # a generic, one-time Faraday connection for API Client token
546
+ # acquision & manipulation
547
+ #################################
548
+ def api_client_auth_connection(rsrc)
549
+ Faraday.new("#{@base_url}/#{Jamf::Connection::JPAPI_RSRC_BASE}/#{rsrc}", ssl: @ssl_options) do |fcnx|
550
+ # activates the url_encoded request middleware, which converts a hash in the request body to url-encoded form data
551
+ fcnx.request :url_encoded
552
+ # activates the json response middleware, parsing all valid response bodies with JSON.parse
553
+ fcnx.response :json, parser_options: { symbolize_names: true }
554
+ fcnx.adapter Faraday::Adapter::NetHttp
555
+ end
556
+ end # token_connection
557
+
499
558
  # Parse the API token data into instance vars.
500
559
  #################################
501
560
  def parse_token_from_response(resp)
@@ -505,6 +564,16 @@ module Jamf
505
564
  @valid = true
506
565
  end
507
566
 
567
+ # Parse the API Client token data into instance vars.
568
+ #################################
569
+ def parse_token_from_api_client_auth(resp)
570
+ @token_response_body = resp.body
571
+ @token = @token_response_body[:access_token]
572
+ @expires = Time.now + @token_response_body[:expires_in] - 1
573
+ @api_role_ids = @token_response_body[:scope].split(' ').map { |r| r.split(':').last }
574
+ @valid = true
575
+ end
576
+
508
577
  end # class Token
509
578
 
510
579
  end # class Connection
@@ -33,7 +33,7 @@ module Jamf
33
33
  #
34
34
  # For most cases, a single connection to a single JSS is all you need, and
35
35
  # ruby-jss automatically creates and uses a default connection. See
36
- # {JSS.connect}
36
+ # {Jamf.connect}
37
37
  #
38
38
  # If needed, multiple connection objects can be made and used sequentially or
39
39
  # simultaneously.
@@ -61,14 +61,14 @@ module Jamf
61
61
  # Example:
62
62
  #
63
63
  # require 'ruby-jss'
64
- # JSS.cnx.connect host: 'server.address.edu', user: 'jss-api-user', pw: :prompt
64
+ # Jamf.connect host: 'server.address.edu', user: 'jss-api-user', pw: :prompt
65
65
  # # (see {Jamf::Connection#connect} for all the connection options)
66
66
  #
67
67
  # a_phone = Jamf::MobileDevice.fetch id: 8743
68
68
  #
69
69
  # # the mobile device was fetched through the default connection
70
70
  #
71
- # If needed, you can re-login to the default connection by calling JSS.connect
71
+ # If needed, you can re-login to the default connection by calling Jamf.connect
72
72
  # with new connection parameters. You can also call JSS.disconnect to close the
73
73
  # connection
74
74
  #
@@ -91,8 +91,9 @@ module Jamf
91
91
  #
92
92
  # NOTE:
93
93
  # When an obbject is retrieved or created it stores an internal
94
- # reference to the Connection object that it usdd, and uses that when making
94
+ # reference to the Connection object that it was made with, and uses that when making
95
95
  # future API calls.
96
+ #
96
97
  # So in the example above, when saving any changes to a_computer, the Connection
97
98
  # object 'my_connection' will (and must) be used.
98
99
  #
@@ -0,0 +1,173 @@
1
+ # Copyright 2023 Pixar
2
+
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "Apache License")
5
+ # with the following modification; you may not use this file except in
6
+ # compliance with the Apache License and the following modification to it:
7
+ # Section 6. Trademarks. is deleted and replaced with:
8
+ #
9
+ # 6. Trademarks. This License does not grant permission to use the trade
10
+ # names, trademarks, service marks, or product names of the Licensor
11
+ # and its affiliates, except as required to comply with Section 4(c) of
12
+ # the License and to reproduce the content of the NOTICE file.
13
+ #
14
+ # You may obtain a copy of the Apache License at
15
+ #
16
+ # http://www.apache.org/licenses/LICENSE-2.0
17
+ #
18
+ # Unless required by applicable law or agreed to in writing, software
19
+ # distributed under the Apache License with the above modification is
20
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
+ # KIND, either express or implied. See the Apache License for the specific
22
+ # language governing permissions and limitations under the Apache License.
23
+ #
24
+ #
25
+
26
+ # The Module
27
+ module Jamf
28
+
29
+ # Classes
30
+ #####################################
31
+
32
+ # An API Role in the Jamf Pro API
33
+ #
34
+ # API Roles are predefined sets of privileges that can be assigned to API Clients, aka API Integrations.
35
+ #
36
+ class APIClient < Jamf::OAPISchemas::ApiIntegrationResponse
37
+
38
+ include Jamf::CollectionResource
39
+ extend Jamf::Filterable
40
+
41
+ ########### RELATED OAPI OBJECTS
42
+ # These objects should be OAPIObjects, NOT subclasses of them and
43
+ # not Collection or Singleton resources.
44
+ #
45
+ # TODO: See if these constants can be auto-generated from the
46
+ # OAPI schema and baked into the parent class
47
+
48
+ # The OAPI object class we get back from a 'list' query to get the
49
+ # whole collection, or a subset of it. It contains a :results key
50
+ # which is an array of data for objects of the parent class.
51
+ SEARCH_RESULT_OBJECT = Jamf::OAPISchemas::ApiIntegrationSearchResult
52
+ # The OAPI object class we send with a POST request to make a new member of
53
+ # the collection in Jamf. This is usually the same as the parent class.
54
+ POST_OBJECT = Jamf::OAPISchemas::ApiIntegrationRequest
55
+
56
+ # The OAPI object class we send with a PUT request to change an object in
57
+ # Jamf by specifying all its values. Most updates happen this way,
58
+ # and this is usually the same as the parent class
59
+ PUT_OBJECT = Jamf::OAPISchemas::ApiIntegrationRequest
60
+
61
+ # The OAPI object we send with a PATCH request to change an object in
62
+ # Jamf by replacing only some of its values. This is never the same as the
63
+ # parent class, and is usually used when many or most of the data about an
64
+ # object cannot be changed via the API.
65
+ # PATCH_OBJECT = Jamf::OAPISchemas::Building
66
+
67
+ ############# API PATHS
68
+
69
+ # The path for GETting the list of all objects in the collection, possibly
70
+ # filtered, sorted, and/or paged
71
+ # REQUIRED for all collection resources
72
+ #
73
+ # GET_PATH, POST_PATH, PUT_PATH, PATCH_PATH, and DELETE_PATH are automatically
74
+ # assumed from the LIST_PATH if they follow the standards:
75
+ # - GET_PATH = "#{LIST_PATH}/id"
76
+ # - fetch an object from the collection
77
+ # - POST_PATH = LIST_PATH
78
+ # - create a new object in the collection
79
+ # - PUT_PATH = "#{LIST_PATH}/id"
80
+ # - update an object passing all its values back.
81
+ # Most objects use this or PATCH but not both
82
+ # - PATCH_PATH = "#{LIST_PATH}/id"
83
+ # - update an object passing some of its values back
84
+ # Most objects use this or PUT but not both
85
+ # - DELETE_PATH = "#{LIST_PATH}/id"
86
+ # - delete an object from the collection
87
+ #
88
+ # If those paths differ from the standards, the constants must be defined
89
+ # here
90
+ #
91
+ LIST_PATH = 'v1/api-integrations'.freeze
92
+
93
+ # The path that returns a list of all available privs
94
+ NEW_CREDENTIALS_PATH_SUFFIX = 'client-credentials'
95
+
96
+ # When creating new credentials, an instance of this is returned
97
+ NEW_CREDENTIALS_OBJECT = Jamf::OAPISchemas::OAuthClientCredentials
98
+
99
+ # Identifiers not marked in the superclass's OAPI_PROPERTIES constant
100
+ # which usually only identifies ':id'
101
+ ALT_IDENTIFIERS = %i[displayName].freeze
102
+
103
+ # Must define this when extending Filterable
104
+ FILTER_KEYS = %i[
105
+ id displayName
106
+ ].freeze
107
+
108
+ # Class Methods
109
+ ###############################
110
+
111
+ # For the given API Client, replace the existing clientSecret with a new one, to be
112
+ # used with the clientID for generating a connection token.
113
+ #
114
+ # IMPORTANT: When you do this, the previous secret becomes immediately invalid and
115
+ # can no longer be used for generating connection tokens.
116
+ # BE SURE to capture the output in a variable, or display it somewhere immediately,
117
+ # as it will not be available ever again.
118
+ # See the Jamf Pro docs at
119
+ # https://learn.jamf.com/bundle/jamf-pro-documentation-current/page/API_Roles_and_Clients.html
120
+ #
121
+ # @param client_ident [String, Integer] The displayName or id of the APIClient
122
+ # for which to generate a new secret.
123
+ #
124
+ # @param cnx [Jamf::APIConnection] The API connection through which to perform
125
+ # the operation
126
+ #
127
+ # @return [String] The new valid secret for use with the clientId
128
+ #
129
+ def self.rotate_secret(client_ident, cnx: Jamf.cnx)
130
+ valid_id = valid_id(client_ident, cnx: cnx)
131
+ raise Jamf::NoSuchItemError, "No APIClient matching '#{client_ident}'" unless valid_id
132
+
133
+ creds = NEW_CREDENTIALS_OBJECT.new cnx.jp_post("#{LIST_PATH}/#{valid_id}/#{NEW_CREDENTIALS_PATH_SUFFIX}", nil)
134
+ creds.clientSecret
135
+ end
136
+
137
+ # Instance Attributes and Methods
138
+ ###########################
139
+
140
+
141
+
142
+
143
+ # For this API Client, replace the existing clientSecret with a new one, to be
144
+ # used with the clientID for generating a connection token.
145
+ #
146
+ # IMPORTANT: When you do this, the previous secret becomes immediately invalid and
147
+ # can no longer be used for generating connection tokens.
148
+ # BE SURE to capture the output in a variable, or display it somewhere immediately,
149
+ # as it will not be available ever again.
150
+ # See the Jamf Pro docs at
151
+ # https://learn.jamf.com/bundle/jamf-pro-documentation-current/page/API_Roles_and_Clients.html
152
+ #
153
+ # @return [String] The new valid secret for use with the clientId
154
+ #
155
+ def rotate_secret
156
+ self.class.rotate_secret(id, cnx: cnx)
157
+ end
158
+
159
+ # In the UI these are the 'API Roles', not 'authorization scopes'
160
+
161
+ alias roles authorizationScopes
162
+ alias roles= authorizationScopes=
163
+ alias roles_append authorizationScopes_append
164
+ alias roles_delete authorizationScopes_delete
165
+ alias roles_delete_at authorizationScopes_delete_at
166
+ alias roles_delete_if authorizationScopes_delete_if
167
+ alias roles_insert authorizationScopes_insert
168
+ alias roles_prepend authorizationScopes_prepend
169
+
170
+
171
+ end # class
172
+
173
+ end # module
@@ -0,0 +1,38 @@
1
+ # Copyright 2023 Pixar
2
+
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "Apache License")
5
+ # with the following modification; you may not use this file except in
6
+ # compliance with the Apache License and the following modification to it:
7
+ # Section 6. Trademarks. is deleted and replaced with:
8
+ #
9
+ # 6. Trademarks. This License does not grant permission to use the trade
10
+ # names, trademarks, service marks, or product names of the Licensor
11
+ # and its affiliates, except as required to comply with Section 4(c) of
12
+ # the License and to reproduce the content of the NOTICE file.
13
+ #
14
+ # You may obtain a copy of the Apache License at
15
+ #
16
+ # http://www.apache.org/licenses/LICENSE-2.0
17
+ #
18
+ # Unless required by applicable law or agreed to in writing, software
19
+ # distributed under the Apache License with the above modification is
20
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
+ # KIND, either express or implied. See the Apache License for the specific
22
+ # language governing permissions and limitations under the Apache License.
23
+ #
24
+ #
25
+
26
+ # The Module
27
+ module Jamf
28
+
29
+ # In the Jamf Pro Web UI, API Clients are called just that "API Clients", so
30
+ # they are defined as the Jamf::APIClient class.
31
+ #
32
+ # But in the Jamf Pro API, they are referred to as API Integrations, and their
33
+ # resource paths are `v1/api-integrations`
34
+ # So, this class is just an alias of APIClient
35
+
36
+ APIIntegration = APIClient
37
+
38
+ end # module