shipeasy-sdk 4.2.0 → 4.4.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 +30 -2
- data/lib/shipeasy_admin/models/create_public_feature_request_request.rb +30 -2
- 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 +193 -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_reporter_context.rb +328 -0
- data/lib/shipeasy_admin/models/ops_reporter_experiment.rb +230 -0
- data/lib/shipeasy_admin/models/ops_reporter_flag.rb +193 -0
- data/lib/shipeasy_admin/models/ops_reporter_killswitch.rb +205 -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 +30 -1
- metadata +35 -6
|
@@ -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
|
|
|
@@ -52,6 +52,9 @@ module Shipeasy::Admin::Generated
|
|
|
52
52
|
# Arbitrary capture context, or `null`.
|
|
53
53
|
attr_accessor :context
|
|
54
54
|
|
|
55
|
+
# The reporter's SDK identity — the same user attribute object your app passes to the Shipeasy SDK to evaluate flags (`user_id`, `anonymous_id`, `email`, plus any targeting attributes). When present, Shipeasy evaluates every feature flag, kill switch and running experiment for this user at filing time and stores the result on the ticket as `context.reporter`, so triage (and any agent working the ticket) sees exactly which features the reporter had on. The browser and React Native devtools attach the identified user automatically. Omit it (or send `null`) to file without a feature snapshot.
|
|
56
|
+
attr_accessor :user
|
|
57
|
+
|
|
55
58
|
# Caller-chosen dedupe identity for this request, stored on the ticket. Behaves exactly as on `POST /ops/bug`: a repeat carrying the same key refreshes the open ticket already holding it (fields overwritten, a \"re-triggered\" comment appended) and returns `deduped: true` with `updated: true`, instead of filing a second one.
|
|
56
59
|
attr_accessor :dedup_key
|
|
57
60
|
|
|
@@ -95,6 +98,7 @@ module Shipeasy::Admin::Generated
|
|
|
95
98
|
:'page_url' => :'pageUrl',
|
|
96
99
|
:'user_agent' => :'userAgent',
|
|
97
100
|
:'context' => :'context',
|
|
101
|
+
:'user' => :'user',
|
|
98
102
|
:'dedup_key' => :'dedupKey',
|
|
99
103
|
:'notify' => :'notify'
|
|
100
104
|
}
|
|
@@ -125,6 +129,7 @@ module Shipeasy::Admin::Generated
|
|
|
125
129
|
:'page_url' => :'String',
|
|
126
130
|
:'user_agent' => :'String',
|
|
127
131
|
:'context' => :'Hash<String, Object>',
|
|
132
|
+
:'user' => :'Hash<String, Object>',
|
|
128
133
|
:'dedup_key' => :'String',
|
|
129
134
|
:'notify' => :'NotificationTarget'
|
|
130
135
|
}
|
|
@@ -139,6 +144,7 @@ module Shipeasy::Admin::Generated
|
|
|
139
144
|
:'page_url',
|
|
140
145
|
:'user_agent',
|
|
141
146
|
:'context',
|
|
147
|
+
:'user',
|
|
142
148
|
:'notify'
|
|
143
149
|
])
|
|
144
150
|
end
|
|
@@ -219,6 +225,12 @@ module Shipeasy::Admin::Generated
|
|
|
219
225
|
end
|
|
220
226
|
end
|
|
221
227
|
|
|
228
|
+
if attributes.key?(:'user')
|
|
229
|
+
if (value = attributes[:'user']).is_a?(Hash)
|
|
230
|
+
self.user = value
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
222
234
|
if attributes.key?(:'dedup_key')
|
|
223
235
|
self.dedup_key = attributes[:'dedup_key']
|
|
224
236
|
end
|
|
@@ -266,6 +278,10 @@ module Shipeasy::Admin::Generated
|
|
|
266
278
|
invalid_properties.push('invalid value for "user_agent", the character length must be smaller than or equal to 500.')
|
|
267
279
|
end
|
|
268
280
|
|
|
281
|
+
if !@user.nil? && @user.length > 50
|
|
282
|
+
invalid_properties.push('invalid value for "user", number of items must be less than or equal to 50.')
|
|
283
|
+
end
|
|
284
|
+
|
|
269
285
|
if !@dedup_key.nil? && @dedup_key.to_s.length > 200
|
|
270
286
|
invalid_properties.push('invalid value for "dedup_key", the character length must be smaller than or equal to 200.')
|
|
271
287
|
end
|
|
@@ -285,6 +301,7 @@ module Shipeasy::Admin::Generated
|
|
|
285
301
|
return false if !@use_case.nil? && @use_case.to_s.length > 8000
|
|
286
302
|
return false if !@tags.nil? && @tags.length > 50
|
|
287
303
|
return false if !@user_agent.nil? && @user_agent.to_s.length > 500
|
|
304
|
+
return false if !@user.nil? && @user.length > 50
|
|
288
305
|
return false if !@dedup_key.nil? && @dedup_key.to_s.length > 200
|
|
289
306
|
true
|
|
290
307
|
end
|
|
@@ -364,6 +381,16 @@ module Shipeasy::Admin::Generated
|
|
|
364
381
|
@user_agent = user_agent
|
|
365
382
|
end
|
|
366
383
|
|
|
384
|
+
# Custom attribute writer method with validation
|
|
385
|
+
# @param [Object] user Value to be assigned
|
|
386
|
+
def user=(user)
|
|
387
|
+
if !user.nil? && user.length > 50
|
|
388
|
+
fail ArgumentError, 'invalid value for "user", number of items must be less than or equal to 50.'
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
@user = user
|
|
392
|
+
end
|
|
393
|
+
|
|
367
394
|
# Custom attribute writer method with validation
|
|
368
395
|
# @param [Object] dedup_key Value to be assigned
|
|
369
396
|
def dedup_key=(dedup_key)
|
|
@@ -395,6 +422,7 @@ module Shipeasy::Admin::Generated
|
|
|
395
422
|
page_url == o.page_url &&
|
|
396
423
|
user_agent == o.user_agent &&
|
|
397
424
|
context == o.context &&
|
|
425
|
+
user == o.user &&
|
|
398
426
|
dedup_key == o.dedup_key &&
|
|
399
427
|
notify == o.notify
|
|
400
428
|
end
|
|
@@ -408,7 +436,7 @@ module Shipeasy::Admin::Generated
|
|
|
408
436
|
# Calculates hash code according to all attributes.
|
|
409
437
|
# @return [Integer] Hash code
|
|
410
438
|
def hash
|
|
411
|
-
[title, description, use_case, priority, status, assignee_id, subscribers, tags, reporter_email, page_url, user_agent, context, dedup_key, notify].hash
|
|
439
|
+
[title, description, use_case, priority, status, assignee_id, subscribers, tags, reporter_email, page_url, user_agent, context, user, dedup_key, notify].hash
|
|
412
440
|
end
|
|
413
441
|
|
|
414
442
|
# Builds the object from hash
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -0,0 +1,170 @@
|
|
|
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
|
+
# GitHub connector trace — the issue it opened and, once linked, the pull requests.
|
|
18
|
+
class GithubConnectorData < ApiModelBase
|
|
19
|
+
attr_accessor :issue
|
|
20
|
+
|
|
21
|
+
# The item's PRIMARY linked pull request, derived from `prs`: the newest still-open one, else the newest merged one, else the newest closed one. Kept for readers that show one PR; `prs` is the full list.
|
|
22
|
+
attr_accessor :pr
|
|
23
|
+
|
|
24
|
+
# Every pull request linked to the item, oldest link first — an item can legitimately take several PRs (a fix split across repos, a follow-up). Absent on items linked before multi-PR support; `pr` then is the only one.
|
|
25
|
+
attr_accessor :prs
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'issue' => :'issue',
|
|
31
|
+
:'pr' => :'pr',
|
|
32
|
+
:'prs' => :'prs'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'issue' => :'GithubConnectorDataIssue',
|
|
50
|
+
:'pr' => :'GithubPrLink',
|
|
51
|
+
:'prs' => :'Array<GithubPrLink>'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::GithubConnectorData` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::GithubConnectorData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'issue')
|
|
78
|
+
self.issue = attributes[:'issue']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'pr')
|
|
82
|
+
self.pr = attributes[:'pr']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'prs')
|
|
86
|
+
if (value = attributes[:'prs']).is_a?(Array)
|
|
87
|
+
self.prs = value
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
93
|
+
# @return Array for valid properties with the reasons
|
|
94
|
+
def list_invalid_properties
|
|
95
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
96
|
+
invalid_properties = Array.new
|
|
97
|
+
invalid_properties
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Check to see if the all the properties in the model are valid
|
|
101
|
+
# @return true if the model is valid
|
|
102
|
+
def valid?
|
|
103
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
104
|
+
true
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Checks equality by comparing each attribute.
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def ==(o)
|
|
110
|
+
return true if self.equal?(o)
|
|
111
|
+
self.class == o.class &&
|
|
112
|
+
issue == o.issue &&
|
|
113
|
+
pr == o.pr &&
|
|
114
|
+
prs == o.prs
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# @see the `==` method
|
|
118
|
+
# @param [Object] Object to be compared
|
|
119
|
+
def eql?(o)
|
|
120
|
+
self == o
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Calculates hash code according to all attributes.
|
|
124
|
+
# @return [Integer] Hash code
|
|
125
|
+
def hash
|
|
126
|
+
[issue, pr, prs].hash
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Builds the object from hash
|
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
131
|
+
# @return [Object] Returns the model itself
|
|
132
|
+
def self.build_from_hash(attributes)
|
|
133
|
+
return nil unless attributes.is_a?(Hash)
|
|
134
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
135
|
+
transformed_hash = {}
|
|
136
|
+
openapi_types.each_pair do |key, type|
|
|
137
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
138
|
+
transformed_hash["#{key}"] = nil
|
|
139
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
140
|
+
# check to ensure the input is an array given that the attribute
|
|
141
|
+
# is documented as an array but the input is not
|
|
142
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
143
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
144
|
+
end
|
|
145
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
146
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
new(transformed_hash)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Returns the object in the form of hash
|
|
153
|
+
# @return [Hash] Returns the object in the form of hash
|
|
154
|
+
def to_hash
|
|
155
|
+
hash = {}
|
|
156
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
157
|
+
value = self.send(attr)
|
|
158
|
+
if value.nil?
|
|
159
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
160
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
hash[param] = _to_hash(value)
|
|
164
|
+
end
|
|
165
|
+
hash
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
end
|
|
@@ -0,0 +1,257 @@
|
|
|
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 GitHub issue this item opened.
|
|
18
|
+
class GithubConnectorDataIssue < ApiModelBase
|
|
19
|
+
# GitHub issue number.
|
|
20
|
+
attr_accessor :number
|
|
21
|
+
|
|
22
|
+
# HTML URL of the opened issue.
|
|
23
|
+
attr_accessor :url
|
|
24
|
+
|
|
25
|
+
# Repository owner (org or user).
|
|
26
|
+
attr_accessor :owner
|
|
27
|
+
|
|
28
|
+
# Repository name.
|
|
29
|
+
attr_accessor :repo
|
|
30
|
+
|
|
31
|
+
# ISO-8601 timestamp the issue was opened.
|
|
32
|
+
attr_accessor :created_at
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'number' => :'number',
|
|
38
|
+
:'url' => :'url',
|
|
39
|
+
:'owner' => :'owner',
|
|
40
|
+
:'repo' => :'repo',
|
|
41
|
+
:'created_at' => :'createdAt'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'number' => :'Float',
|
|
59
|
+
:'url' => :'String',
|
|
60
|
+
:'owner' => :'String',
|
|
61
|
+
:'repo' => :'String',
|
|
62
|
+
:'created_at' => :'String'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::GithubConnectorDataIssue` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::GithubConnectorDataIssue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'number')
|
|
89
|
+
self.number = attributes[:'number']
|
|
90
|
+
else
|
|
91
|
+
self.number = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'url')
|
|
95
|
+
self.url = attributes[:'url']
|
|
96
|
+
else
|
|
97
|
+
self.url = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'owner')
|
|
101
|
+
self.owner = attributes[:'owner']
|
|
102
|
+
else
|
|
103
|
+
self.owner = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'repo')
|
|
107
|
+
self.repo = attributes[:'repo']
|
|
108
|
+
else
|
|
109
|
+
self.repo = nil
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'created_at')
|
|
113
|
+
self.created_at = attributes[:'created_at']
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
118
|
+
# @return Array for valid properties with the reasons
|
|
119
|
+
def list_invalid_properties
|
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
121
|
+
invalid_properties = Array.new
|
|
122
|
+
if @number.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "number", number cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @url.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @owner.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "owner", owner cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @repo.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "repo", repo cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
invalid_properties
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Check to see if the all the properties in the model are valid
|
|
142
|
+
# @return true if the model is valid
|
|
143
|
+
def valid?
|
|
144
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
145
|
+
return false if @number.nil?
|
|
146
|
+
return false if @url.nil?
|
|
147
|
+
return false if @owner.nil?
|
|
148
|
+
return false if @repo.nil?
|
|
149
|
+
true
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] number Value to be assigned
|
|
154
|
+
def number=(number)
|
|
155
|
+
if number.nil?
|
|
156
|
+
fail ArgumentError, 'number cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
@number = number
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Custom attribute writer method with validation
|
|
163
|
+
# @param [Object] url Value to be assigned
|
|
164
|
+
def url=(url)
|
|
165
|
+
if url.nil?
|
|
166
|
+
fail ArgumentError, 'url cannot be nil'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
@url = url
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Custom attribute writer method with validation
|
|
173
|
+
# @param [Object] owner Value to be assigned
|
|
174
|
+
def owner=(owner)
|
|
175
|
+
if owner.nil?
|
|
176
|
+
fail ArgumentError, 'owner cannot be nil'
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
@owner = owner
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Custom attribute writer method with validation
|
|
183
|
+
# @param [Object] repo Value to be assigned
|
|
184
|
+
def repo=(repo)
|
|
185
|
+
if repo.nil?
|
|
186
|
+
fail ArgumentError, 'repo cannot be nil'
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
@repo = repo
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Checks equality by comparing each attribute.
|
|
193
|
+
# @param [Object] Object to be compared
|
|
194
|
+
def ==(o)
|
|
195
|
+
return true if self.equal?(o)
|
|
196
|
+
self.class == o.class &&
|
|
197
|
+
number == o.number &&
|
|
198
|
+
url == o.url &&
|
|
199
|
+
owner == o.owner &&
|
|
200
|
+
repo == o.repo &&
|
|
201
|
+
created_at == o.created_at
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# @see the `==` method
|
|
205
|
+
# @param [Object] Object to be compared
|
|
206
|
+
def eql?(o)
|
|
207
|
+
self == o
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Calculates hash code according to all attributes.
|
|
211
|
+
# @return [Integer] Hash code
|
|
212
|
+
def hash
|
|
213
|
+
[number, url, owner, repo, created_at].hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Builds the object from hash
|
|
217
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
218
|
+
# @return [Object] Returns the model itself
|
|
219
|
+
def self.build_from_hash(attributes)
|
|
220
|
+
return nil unless attributes.is_a?(Hash)
|
|
221
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
222
|
+
transformed_hash = {}
|
|
223
|
+
openapi_types.each_pair do |key, type|
|
|
224
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
225
|
+
transformed_hash["#{key}"] = nil
|
|
226
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
227
|
+
# check to ensure the input is an array given that the attribute
|
|
228
|
+
# is documented as an array but the input is not
|
|
229
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
230
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
231
|
+
end
|
|
232
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
233
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
new(transformed_hash)
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Returns the object in the form of hash
|
|
240
|
+
# @return [Hash] Returns the object in the form of hash
|
|
241
|
+
def to_hash
|
|
242
|
+
hash = {}
|
|
243
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
244
|
+
value = self.send(attr)
|
|
245
|
+
if value.nil?
|
|
246
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
247
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
hash[param] = _to_hash(value)
|
|
251
|
+
end
|
|
252
|
+
hash
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
end
|