Class: Shipeasy::Admin::Generated::OpsApi
- Inherits:
-
Object
- Object
- Shipeasy::Admin::Generated::OpsApi
- Defined in:
- lib/shipeasy_admin/api/ops_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_public_bug(create_public_bug_request, opts = {}) ⇒ CreatePublicTicketResponse
File a bug Files one bug onto a project's queue, awaiting human approval.
-
#create_public_bug_with_http_info(create_public_bug_request, opts = {}) ⇒ Array<(CreatePublicTicketResponse, Integer, Hash)>
File a bug Files one bug onto a project's queue, awaiting human approval.
-
#create_public_feature_request(create_public_feature_request_request, opts = {}) ⇒ CreatePublicTicketResponse
File a feature request Files one feature request onto a project's queue, awaiting human approval.
-
#create_public_feature_request_with_http_info(create_public_feature_request_request, opts = {}) ⇒ Array<(CreatePublicTicketResponse, Integer, Hash)>
File a feature request Files one feature request onto a project's queue, awaiting human approval.
-
#initialize(api_client = ApiClient.default) ⇒ OpsApi
constructor
A new instance of OpsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_public_bug(create_public_bug_request, opts = {}) ⇒ CreatePublicTicketResponse
File a bug
Files one bug onto a project's queue, awaiting human approval. This is the public intake: it authenticates with a client SDK key rather than an admin key, so it can be called from a CLI, an installer script, a devtools overlay, or any shipped code — the same places a client key already lives. Three gates decide whether a ticket is filed, and nothing else the caller sends can widen them: 1. the key is a client key carrying the tickets:public_create scope, 2. the key's project has public ticket creation enabled, and 3. the item is filed as pending_approval — parked out of the work queue until a human promotes it in the dashboard. The project is the key's own project; there is no X-Project-Id to pass and no way to file into someone else's queue. Repeat submissions of the same title dedupe against the open ticket already tracking it, which returns 200 with deduped: true instead of filing again. This endpoint is served by the Shipeasy edge worker (api.shipeasy.ai), not the admin API — see servers below. Use case: shipeasy setup fails on a customer's machine and self-reports the failure with the user's consent — { \"title\": \"Setup failed at Feature installs\", \"stepsToReproduce\": \"…\", \"actualResult\": \"…\" }.
27 28 29 30 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 27 def create_public_bug(create_public_bug_request, opts = {}) data, _status_code, _headers = create_public_bug_with_http_info(create_public_bug_request, opts) data end |
#create_public_bug_with_http_info(create_public_bug_request, opts = {}) ⇒ Array<(CreatePublicTicketResponse, Integer, Hash)>
File a bug Files one bug onto a project's queue, awaiting human approval. This is the public intake: it authenticates with a client SDK key rather than an admin key, so it can be called from a CLI, an installer script, a devtools overlay, or any shipped code — the same places a client key already lives. Three gates decide whether a ticket is filed, and nothing else the caller sends can widen them: 1. the key is a `client` key carrying the `tickets:public_create` scope, 2. the key's project has public ticket creation enabled, and 3. the item is filed as `pending_approval` — parked out of the work queue until a human promotes it in the dashboard. The project is the key's own project; there is no `X-Project-Id` to pass and no way to file into someone else's queue. Repeat submissions of the same title dedupe against the open ticket already tracking it, which returns `200` with `deduped: true` instead of filing again. This endpoint is served by the Shipeasy edge worker (`api.shipeasy.ai`), not the admin API — see `servers` below. Use case: `shipeasy setup` fails on a customer's machine and self-reports the failure with the user's consent — `{ "title": "Setup failed at Feature installs", "stepsToReproduce": "…", "actualResult": "…" }`.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 37 def create_public_bug_with_http_info(create_public_bug_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OpsApi.create_public_bug ...' end # verify the required parameter 'create_public_bug_request' is set if @api_client.config.client_side_validation && create_public_bug_request.nil? fail ArgumentError, "Missing the required parameter 'create_public_bug_request' when calling OpsApi.create_public_bug" end # resource path local_var_path = '/ops/bug' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_public_bug_request) # return_type return_type = opts[:debug_return_type] || 'CreatePublicTicketResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientSdkKey'] = opts.merge( :operation => :"OpsApi.create_public_bug", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OpsApi#create_public_bug\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_public_feature_request(create_public_feature_request_request, opts = {}) ⇒ CreatePublicTicketResponse
File a feature request
Files one feature request onto a project's queue, awaiting human approval. The feature-request counterpart to POST /ops/bug, with the same three gates: a client key carrying tickets:public_create, a project that has opted in, and a pending_approval state forced server-side. The project is the key's own project; there is no X-Project-Id to pass. Repeat submissions of the same title dedupe against the open ticket already tracking it, which returns 200 with deduped: true instead of filing again. This endpoint is served by the Shipeasy edge worker (api.shipeasy.ai), not the admin API — see servers below. Use case: An in-product "request a feature" form posts what the user asked for — { \"title\": \"Dark mode\", \"useCase\": \"Reduce eye strain at night\" }.
95 96 97 98 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 95 def create_public_feature_request(create_public_feature_request_request, opts = {}) data, _status_code, _headers = create_public_feature_request_with_http_info(create_public_feature_request_request, opts) data end |
#create_public_feature_request_with_http_info(create_public_feature_request_request, opts = {}) ⇒ Array<(CreatePublicTicketResponse, Integer, Hash)>
File a feature request Files one feature request onto a project's queue, awaiting human approval. The feature-request counterpart to `POST /ops/bug`, with the same three gates: a `client` key carrying `tickets:public_create`, a project that has opted in, and a `pending_approval` state forced server-side. The project is the key's own project; there is no `X-Project-Id` to pass. Repeat submissions of the same title dedupe against the open ticket already tracking it, which returns `200` with `deduped: true` instead of filing again. This endpoint is served by the Shipeasy edge worker (`api.shipeasy.ai`), not the admin API — see `servers` below. Use case: An in-product "request a feature" form posts what the user asked for — `{ "title": "Dark mode", "useCase": "Reduce eye strain at night" }`.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 105 def create_public_feature_request_with_http_info(create_public_feature_request_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OpsApi.create_public_feature_request ...' end # verify the required parameter 'create_public_feature_request_request' is set if @api_client.config.client_side_validation && create_public_feature_request_request.nil? fail ArgumentError, "Missing the required parameter 'create_public_feature_request_request' when calling OpsApi.create_public_feature_request" end # resource path local_var_path = '/ops/feature-request' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_public_feature_request_request) # return_type return_type = opts[:debug_return_type] || 'CreatePublicTicketResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientSdkKey'] = opts.merge( :operation => :"OpsApi.create_public_feature_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OpsApi#create_public_feature_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |