Class: SemgrepWebApp::SupplyChainServiceApi
- Defined in:
- lib/semgrep_web_app/apis/supply_chain_service_api.rb
Overview
SupplyChainServiceApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#create_sbom_export(deployment_id, body) ⇒ ApiResponse
TODO: type endpoint description here here description here.
-
#get_sbom_export(deployment_id, task_token) ⇒ ApiResponse
TODO: type endpoint description here here here.
-
#list_dependencies(deployment_id, body) ⇒ ApiResponse
TODO: type endpoint description here here description here.
-
#list_lockfiles_for_dependencies(deployment_id, repository_id, body) ⇒ ApiResponse
TODO: type endpoint description here here here TODO: type description here.
-
#list_repositories_for_dependencies(deployment_id, body) ⇒ ApiResponse
TODO: type endpoint description here here TODO: type description here.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from SemgrepWebApp::BaseApi
Instance Method Details
#create_sbom_export(deployment_id, body) ⇒ ApiResponse
TODO: type endpoint description here here description here
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/semgrep_web_app/apis/supply_chain_service_api.rb', line 105 def create_sbom_export(deployment_id, body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/api/v1/deployments/{deploymentId}/sbom/export', Server::SEMGREP) .template_param(new_parameter(deployment_id, key: 'deploymentId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('SemgrepWebToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(CreateSbomExportResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#get_sbom_export(deployment_id, task_token) ⇒ ApiResponse
TODO: type endpoint description here here here
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/semgrep_web_app/apis/supply_chain_service_api.rb', line 133 def get_sbom_export(deployment_id, task_token) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/api/v1/deployments/{deploymentId}/sbom/export/{taskToken}', Server::SEMGREP) .template_param(new_parameter(deployment_id, key: 'deploymentId') .is_required(true) .should_encode(true)) .template_param(new_parameter(task_token, key: 'taskToken') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('SemgrepWebToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(GetSbomExportResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#list_dependencies(deployment_id, body) ⇒ ApiResponse
TODO: type endpoint description here here description here
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/semgrep_web_app/apis/supply_chain_service_api.rb', line 15 def list_dependencies(deployment_id, body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/api/v1/deployments/{deploymentId}/dependencies', Server::SEMGREP) .template_param(new_parameter(deployment_id, key: 'deploymentId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('SemgrepWebToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ListDependenciesResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#list_lockfiles_for_dependencies(deployment_id, repository_id, body) ⇒ ApiResponse
TODO: type endpoint description here here here TODO: type description here
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/semgrep_web_app/apis/supply_chain_service_api.rb', line 73 def list_lockfiles_for_dependencies(deployment_id, repository_id, body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/api/v1/deployments/{deploymentId}/dependencies/repositories/{repositoryId}/lockfiles', Server::SEMGREP) .template_param(new_parameter(deployment_id, key: 'deploymentId') .is_required(true) .should_encode(true)) .template_param(new_parameter(repository_id, key: 'repositoryId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('SemgrepWebToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ListLockfilesForDependenciesResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#list_repositories_for_dependencies(deployment_id, body) ⇒ ApiResponse
TODO: type endpoint description here here TODO: type description here
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/semgrep_web_app/apis/supply_chain_service_api.rb', line 43 def list_repositories_for_dependencies(deployment_id, body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/api/v1/deployments/{deploymentId}/dependencies/repositories', Server::SEMGREP) .template_param(new_parameter(deployment_id, key: 'deploymentId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('SemgrepWebToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ListRepositoriesForDependenciesResponse.method(:from_hash)) .is_api_response(true)) .execute end |