shipeasy-sdk 4.2.0 → 4.3.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.
- checksums.yaml +4 -4
- data/lib/shipeasy/sdk/version.rb +1 -1
- data/lib/shipeasy_admin/api/flags_api.rb +9 -9
- data/lib/shipeasy_admin/api/killswitch_api.rb +1 -1
- data/lib/shipeasy_admin/api/ops_api.rb +127 -1
- data/lib/shipeasy_admin/api_client.rb +1 -1
- data/lib/shipeasy_admin/api_error.rb +1 -1
- data/lib/shipeasy_admin/api_model_base.rb +1 -1
- data/lib/shipeasy_admin/configuration.rb +1 -1
- data/lib/shipeasy_admin/models/add_to_gate_whitelist_request.rb +1 -1
- data/lib/shipeasy_admin/models/connector_data.rb +157 -0
- data/lib/shipeasy_admin/models/create_public_bug_request.rb +1 -1
- data/lib/shipeasy_admin/models/create_public_feature_request_request.rb +1 -1
- data/lib/shipeasy_admin/models/create_public_ticket_response.rb +1 -1
- data/lib/shipeasy_admin/models/env.rb +1 -1
- data/lib/shipeasy_admin/models/error.rb +1 -1
- data/lib/shipeasy_admin/models/error_code.rb +1 -1
- data/lib/shipeasy_admin/models/gate_whitelist.rb +1 -1
- data/lib/shipeasy_admin/models/gate_whitelist_attr.rb +1 -1
- data/lib/shipeasy_admin/models/github_connector_data.rb +170 -0
- data/lib/shipeasy_admin/models/github_connector_data_issue.rb +257 -0
- data/lib/shipeasy_admin/models/github_pr_link.rb +319 -0
- data/lib/shipeasy_admin/models/killswitch_value.rb +1 -1
- data/lib/shipeasy_admin/models/list_ops_items_response_inner.rb +593 -0
- data/lib/shipeasy_admin/models/measure_plan_resource.rb +228 -0
- data/lib/shipeasy_admin/models/measure_plan_step.rb +211 -0
- data/lib/shipeasy_admin/models/notification_target.rb +1 -1
- data/lib/shipeasy_admin/models/notification_target_slack_channel.rb +1 -1
- data/lib/shipeasy_admin/models/ops_alert_context.rb +350 -0
- data/lib/shipeasy_admin/models/ops_alert_metric_summary.rb +222 -0
- data/lib/shipeasy_admin/models/ops_alert_rule_summary.rb +298 -0
- data/lib/shipeasy_admin/models/ops_browser_context.rb +172 -0
- data/lib/shipeasy_admin/models/ops_error_context.rb +429 -0
- data/lib/shipeasy_admin/models/ops_investigation_state.rb +48 -0
- data/lib/shipeasy_admin/models/ops_item_context.rb +184 -0
- data/lib/shipeasy_admin/models/ops_item_context_error_chart.rb +222 -0
- data/lib/shipeasy_admin/models/ops_item_context_error_chart_series_inner.rb +193 -0
- data/lib/shipeasy_admin/models/ops_item_owner.rb +163 -0
- data/lib/shipeasy_admin/models/ops_item_owner_agent.rb +255 -0
- data/lib/shipeasy_admin/models/ops_item_owner_user.rb +206 -0
- data/lib/shipeasy_admin/models/ops_item_priority.rb +1 -1
- data/lib/shipeasy_admin/models/ops_item_status.rb +1 -1
- data/lib/shipeasy_admin/models/ops_measure_plan_context.rb +220 -0
- data/lib/shipeasy_admin/models/ops_run.rb +309 -0
- data/lib/shipeasy_admin/models/ops_run_action.rb +42 -0
- data/lib/shipeasy_admin/models/ops_run_action_or_null.rb +146 -0
- data/lib/shipeasy_admin/models/remove_from_gate_whitelist_request.rb +1 -1
- data/lib/shipeasy_admin/models/set_gate_whitelist_request.rb +1 -1
- data/lib/shipeasy_admin/models/slack_connector_data.rb +148 -0
- data/lib/shipeasy_admin/models/slack_connector_data_message.rb +203 -0
- data/lib/shipeasy_admin/models/toggle_killswitch_request.rb +1 -1
- data/lib/shipeasy_admin/models/toggle_killswitch_response.rb +1 -1
- data/lib/shipeasy_admin/version.rb +1 -1
- data/lib/shipeasy_admin.rb +26 -1
- metadata +31 -6
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shipeasy Admin API (server-SDK surface)
|
|
3
|
+
|
|
4
|
+
#The slice of the Shipeasy admin API that the published server SDKs expose as their optional `AdminClient`. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Four capabilities, nothing else: - **List the ops queue** — read the project's tickets, filtered by type, status, priority, owner, reporter (`reporter`) and close time (`closedSince`). - **File a public ticket** — a bug or a feature request onto the project's ops queue. - **Toggle a kill switch** — flip the switch itself, or one of its named sub-switches, on one environment. - **Manage a flag's whitelist** — read, replace, add to, or remove from the allowlist that admits specific identities ahead of every targeting rule. Everything else in the admin API is reachable through the Shipeasy CLI and MCP server, which speak the complete contract (`openapi.yaml`).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Shipeasy::Admin::Generated
|
|
17
|
+
# The pull request linked to a queue item via `link-pr` (stored on `connectorData.github.pr`).
|
|
18
|
+
class GithubPrLink < ApiModelBase
|
|
19
|
+
# Pull request number.
|
|
20
|
+
attr_accessor :number
|
|
21
|
+
|
|
22
|
+
# HTML URL of the linked pull request.
|
|
23
|
+
attr_accessor :url
|
|
24
|
+
|
|
25
|
+
# ISO-8601 timestamp the PR was linked.
|
|
26
|
+
attr_accessor :linked_at
|
|
27
|
+
|
|
28
|
+
# Whether the PR was wired to the issue on GitHub (via a closing keyword or a comment).
|
|
29
|
+
attr_accessor :connected_to_issue
|
|
30
|
+
|
|
31
|
+
# How the PR was connected to the issue.
|
|
32
|
+
attr_accessor :method
|
|
33
|
+
|
|
34
|
+
# Repository owner (org or user) the pull request lives in. Absent on links recorded before the field existed — `url` still carries it.
|
|
35
|
+
attr_accessor :owner
|
|
36
|
+
|
|
37
|
+
# Repository name the pull request lives in. Absent on links recorded before the field existed — `url` still carries it.
|
|
38
|
+
attr_accessor :repo
|
|
39
|
+
|
|
40
|
+
# Outcome of the pull request on GitHub, kept current by the `pull_request` webhook. `merged` and `closed` (closed WITHOUT merging, i.e. rejected) are terminal. Absent means the outcome has never been observed — treat it as `open`.
|
|
41
|
+
attr_accessor :state
|
|
42
|
+
|
|
43
|
+
# ISO-8601 timestamp the pull request merged, when `state` is `merged`.
|
|
44
|
+
attr_accessor :merged_at
|
|
45
|
+
|
|
46
|
+
# ISO-8601 timestamp the pull request closed unmerged, when `state` is `closed`.
|
|
47
|
+
attr_accessor :closed_at
|
|
48
|
+
|
|
49
|
+
class EnumAttributeValidator
|
|
50
|
+
attr_reader :datatype
|
|
51
|
+
attr_reader :allowable_values
|
|
52
|
+
|
|
53
|
+
def initialize(datatype, allowable_values)
|
|
54
|
+
@allowable_values = allowable_values.map do |value|
|
|
55
|
+
case datatype.to_s
|
|
56
|
+
when /Integer/i
|
|
57
|
+
value.to_i
|
|
58
|
+
when /Float/i
|
|
59
|
+
value.to_f
|
|
60
|
+
else
|
|
61
|
+
value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def valid?(value)
|
|
67
|
+
!value || allowable_values.include?(value)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
72
|
+
def self.attribute_map
|
|
73
|
+
{
|
|
74
|
+
:'number' => :'number',
|
|
75
|
+
:'url' => :'url',
|
|
76
|
+
:'linked_at' => :'linkedAt',
|
|
77
|
+
:'connected_to_issue' => :'connectedToIssue',
|
|
78
|
+
:'method' => :'method',
|
|
79
|
+
:'owner' => :'owner',
|
|
80
|
+
:'repo' => :'repo',
|
|
81
|
+
:'state' => :'state',
|
|
82
|
+
:'merged_at' => :'mergedAt',
|
|
83
|
+
:'closed_at' => :'closedAt'
|
|
84
|
+
}
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Returns attribute mapping this model knows about
|
|
88
|
+
def self.acceptable_attribute_map
|
|
89
|
+
attribute_map
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Returns all the JSON keys this model knows about
|
|
93
|
+
def self.acceptable_attributes
|
|
94
|
+
acceptable_attribute_map.values
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Attribute type mapping.
|
|
98
|
+
def self.openapi_types
|
|
99
|
+
{
|
|
100
|
+
:'number' => :'Float',
|
|
101
|
+
:'url' => :'String',
|
|
102
|
+
:'linked_at' => :'String',
|
|
103
|
+
:'connected_to_issue' => :'Boolean',
|
|
104
|
+
:'method' => :'String',
|
|
105
|
+
:'owner' => :'String',
|
|
106
|
+
:'repo' => :'String',
|
|
107
|
+
:'state' => :'String',
|
|
108
|
+
:'merged_at' => :'String',
|
|
109
|
+
:'closed_at' => :'String'
|
|
110
|
+
}
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# List of attributes with nullable: true
|
|
114
|
+
def self.openapi_nullable
|
|
115
|
+
Set.new([
|
|
116
|
+
])
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Initializes the object
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
def initialize(attributes = {})
|
|
122
|
+
if (!attributes.is_a?(Hash))
|
|
123
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::GithubPrLink` initialize method"
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
127
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
128
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
129
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
130
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::GithubPrLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
131
|
+
end
|
|
132
|
+
h[k.to_sym] = v
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'number')
|
|
136
|
+
self.number = attributes[:'number']
|
|
137
|
+
else
|
|
138
|
+
self.number = nil
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'url')
|
|
142
|
+
self.url = attributes[:'url']
|
|
143
|
+
else
|
|
144
|
+
self.url = nil
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'linked_at')
|
|
148
|
+
self.linked_at = attributes[:'linked_at']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'connected_to_issue')
|
|
152
|
+
self.connected_to_issue = attributes[:'connected_to_issue']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'method')
|
|
156
|
+
self.method = attributes[:'method']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'owner')
|
|
160
|
+
self.owner = attributes[:'owner']
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'repo')
|
|
164
|
+
self.repo = attributes[:'repo']
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'state')
|
|
168
|
+
self.state = attributes[:'state']
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'merged_at')
|
|
172
|
+
self.merged_at = attributes[:'merged_at']
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'closed_at')
|
|
176
|
+
self.closed_at = attributes[:'closed_at']
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
181
|
+
# @return Array for valid properties with the reasons
|
|
182
|
+
def list_invalid_properties
|
|
183
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
184
|
+
invalid_properties = Array.new
|
|
185
|
+
if @number.nil?
|
|
186
|
+
invalid_properties.push('invalid value for "number", number cannot be nil.')
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if @url.nil?
|
|
190
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
invalid_properties
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Check to see if the all the properties in the model are valid
|
|
197
|
+
# @return true if the model is valid
|
|
198
|
+
def valid?
|
|
199
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
200
|
+
return false if @number.nil?
|
|
201
|
+
return false if @url.nil?
|
|
202
|
+
method_validator = EnumAttributeValidator.new('String', ["closes", "comment"])
|
|
203
|
+
return false unless method_validator.valid?(@method)
|
|
204
|
+
state_validator = EnumAttributeValidator.new('String', ["open", "merged", "closed"])
|
|
205
|
+
return false unless state_validator.valid?(@state)
|
|
206
|
+
true
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Custom attribute writer method with validation
|
|
210
|
+
# @param [Object] number Value to be assigned
|
|
211
|
+
def number=(number)
|
|
212
|
+
if number.nil?
|
|
213
|
+
fail ArgumentError, 'number cannot be nil'
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
@number = number
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Custom attribute writer method with validation
|
|
220
|
+
# @param [Object] url Value to be assigned
|
|
221
|
+
def url=(url)
|
|
222
|
+
if url.nil?
|
|
223
|
+
fail ArgumentError, 'url cannot be nil'
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
@url = url
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
230
|
+
# @param [Object] method Object to be assigned
|
|
231
|
+
def method=(method)
|
|
232
|
+
validator = EnumAttributeValidator.new('String', ["closes", "comment"])
|
|
233
|
+
unless validator.valid?(method)
|
|
234
|
+
fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
|
|
235
|
+
end
|
|
236
|
+
@method = method
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
240
|
+
# @param [Object] state Object to be assigned
|
|
241
|
+
def state=(state)
|
|
242
|
+
validator = EnumAttributeValidator.new('String', ["open", "merged", "closed"])
|
|
243
|
+
unless validator.valid?(state)
|
|
244
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
245
|
+
end
|
|
246
|
+
@state = state
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Checks equality by comparing each attribute.
|
|
250
|
+
# @param [Object] Object to be compared
|
|
251
|
+
def ==(o)
|
|
252
|
+
return true if self.equal?(o)
|
|
253
|
+
self.class == o.class &&
|
|
254
|
+
number == o.number &&
|
|
255
|
+
url == o.url &&
|
|
256
|
+
linked_at == o.linked_at &&
|
|
257
|
+
connected_to_issue == o.connected_to_issue &&
|
|
258
|
+
method == o.method &&
|
|
259
|
+
owner == o.owner &&
|
|
260
|
+
repo == o.repo &&
|
|
261
|
+
state == o.state &&
|
|
262
|
+
merged_at == o.merged_at &&
|
|
263
|
+
closed_at == o.closed_at
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# @see the `==` method
|
|
267
|
+
# @param [Object] Object to be compared
|
|
268
|
+
def eql?(o)
|
|
269
|
+
self == o
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Calculates hash code according to all attributes.
|
|
273
|
+
# @return [Integer] Hash code
|
|
274
|
+
def hash
|
|
275
|
+
[number, url, linked_at, connected_to_issue, method, owner, repo, state, merged_at, closed_at].hash
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Builds the object from hash
|
|
279
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
280
|
+
# @return [Object] Returns the model itself
|
|
281
|
+
def self.build_from_hash(attributes)
|
|
282
|
+
return nil unless attributes.is_a?(Hash)
|
|
283
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
284
|
+
transformed_hash = {}
|
|
285
|
+
openapi_types.each_pair do |key, type|
|
|
286
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
287
|
+
transformed_hash["#{key}"] = nil
|
|
288
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
289
|
+
# check to ensure the input is an array given that the attribute
|
|
290
|
+
# is documented as an array but the input is not
|
|
291
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
292
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
293
|
+
end
|
|
294
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
295
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
new(transformed_hash)
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Returns the object in the form of hash
|
|
302
|
+
# @return [Hash] Returns the object in the form of hash
|
|
303
|
+
def to_hash
|
|
304
|
+
hash = {}
|
|
305
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
306
|
+
value = self.send(attr)
|
|
307
|
+
if value.nil?
|
|
308
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
309
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
hash[param] = _to_hash(value)
|
|
313
|
+
end
|
|
314
|
+
hash
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Shipeasy Admin API (server-SDK surface)
|
|
3
3
|
|
|
4
|
-
#The slice of the Shipeasy admin API that the published server SDKs expose as their optional `AdminClient`. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header.
|
|
4
|
+
#The slice of the Shipeasy admin API that the published server SDKs expose as their optional `AdminClient`. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Four capabilities, nothing else: - **List the ops queue** — read the project's tickets, filtered by type, status, priority, owner, reporter (`reporter`) and close time (`closedSince`). - **File a public ticket** — a bug or a feature request onto the project's ops queue. - **Toggle a kill switch** — flip the switch itself, or one of its named sub-switches, on one environment. - **Manage a flag's whitelist** — read, replace, add to, or remove from the allowlist that admits specific identities ahead of every targeting rule. Everything else in the admin API is reachable through the Shipeasy CLI and MCP server, which speak the complete contract (`openapi.yaml`).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
|