galaxy-ruby 0.4.0 → 0.6.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/CHANGELOG.md +188 -0
- data/README.md +26 -5
- data/SKILL.md +6 -4
- data/api.md +8 -8
- data/lib/galaxy-ruby/client.rb +52 -41
- data/lib/galaxy-ruby/errors.rb +40 -0
- data/lib/galaxy-ruby/file_part.rb +13 -1
- data/lib/galaxy-ruby/internal/transport/base_client.rb +278 -42
- data/lib/galaxy-ruby/internal/transport/connection_pool.rb +160 -0
- data/lib/galaxy-ruby/internal/transport/pooled_net_requester.rb +77 -10
- data/lib/galaxy-ruby/internal/type/base_model.rb +62 -17
- data/lib/galaxy-ruby/internal/type/boolean.rb +3 -1
- data/lib/galaxy-ruby/internal/type/converter.rb +13 -3
- data/lib/galaxy-ruby/internal/type/enum.rb +9 -4
- data/lib/galaxy-ruby/internal/type/file_input.rb +8 -2
- data/lib/galaxy-ruby/internal/type/hash_of.rb +3 -1
- data/lib/galaxy-ruby/internal/type/union.rb +17 -6
- data/lib/galaxy-ruby/internal/type/unknown.rb +3 -1
- data/lib/galaxy-ruby/internal/util.rb +273 -15
- data/lib/galaxy-ruby/internal/webhook_verifier.rb +240 -0
- data/lib/galaxy-ruby/internal.rb +4 -1
- data/lib/galaxy-ruby/models/authentication_create_token_params.rb +7 -1
- data/lib/galaxy-ruby/models/authentication_create_user_params.rb +2 -0
- data/lib/galaxy-ruby/models/celestial_body_create_params.rb +3 -3
- data/lib/galaxy-ruby/models/celestial_body_param.rb +72 -0
- data/lib/galaxy-ruby/models/credentials.rb +1 -9
- data/lib/galaxy-ruby/models/planet_create_params.rb +11 -1
- data/lib/galaxy-ruby/models/{planet_list_all_data_params.rb → planet_list_params.rb} +2 -2
- data/lib/galaxy-ruby/models/{planet_list_all_data_response.rb → planet_list_response.rb} +9 -9
- data/lib/galaxy-ruby/models/planet_param.rb +204 -0
- data/lib/galaxy-ruby/models/planet_update_params.rb +12 -1
- data/lib/galaxy-ruby/models/{planet_delte_image_params.rb → planet_upload_image_params.rb} +2 -2
- data/lib/galaxy-ruby/models/{planet_delte_image_response.rb → planet_upload_image_response.rb} +2 -2
- data/lib/galaxy-ruby/models/user_param.rb +19 -0
- data/lib/galaxy-ruby/models/webhook_unwrap_params.rb +2 -0
- data/lib/galaxy-ruby/models.rb +38 -33
- data/lib/galaxy-ruby/request_options.rb +13 -5
- data/lib/galaxy-ruby/resources/celestial_bodies.rb +1 -1
- data/lib/galaxy-ruby/resources/planets.rb +37 -47
- data/lib/galaxy-ruby/resources/webhooks.rb +63 -6
- data/lib/galaxy-ruby/version.rb +1 -1
- data/lib/galaxy-ruby.rb +12 -10
- data/rbi/galaxy-ruby/client.rbi +28 -5
- data/rbi/galaxy-ruby/errors.rbi +25 -27
- data/rbi/galaxy-ruby/internal/transport/base_client.rbi +88 -68
- data/rbi/galaxy-ruby/internal/transport/connection_pool.rbi +44 -0
- data/rbi/galaxy-ruby/internal/transport/pooled_net_requester.rbi +18 -19
- data/rbi/galaxy-ruby/internal/type/base_model.rbi +27 -49
- data/rbi/galaxy-ruby/internal/type/base_page.rbi +1 -2
- data/rbi/galaxy-ruby/internal/type/converter.rbi +12 -51
- data/rbi/galaxy-ruby/internal/type/enum.rbi +1 -5
- data/rbi/galaxy-ruby/internal/type/request_parameters.rbi +2 -6
- data/rbi/galaxy-ruby/internal/type/union.rbi +2 -11
- data/rbi/galaxy-ruby/internal/util.rbi +101 -115
- data/rbi/galaxy-ruby/internal/webhook_verifier.rbi +86 -0
- data/rbi/galaxy-ruby/internal.rbi +1 -4
- data/rbi/galaxy-ruby/models/authentication_create_token_params.rbi +11 -5
- data/rbi/galaxy-ruby/models/celestial_body_create_params.rbi +8 -5
- data/rbi/galaxy-ruby/models/celestial_body_param.rbi +138 -0
- data/rbi/galaxy-ruby/models/credentials.rbi +2 -5
- data/rbi/galaxy-ruby/models/planet_create_params.rbi +22 -5
- data/rbi/galaxy-ruby/models/{planet_list_all_data_params.rbi → planet_list_params.rbi} +2 -5
- data/rbi/galaxy-ruby/models/{planet_list_all_data_response.rbi → planet_list_response.rbi} +11 -15
- data/rbi/galaxy-ruby/models/planet_param.rbi +346 -0
- data/rbi/galaxy-ruby/models/planet_update_params.rbi +19 -2
- data/rbi/galaxy-ruby/models/{planet_delte_image_params.rbi → planet_upload_image_params.rbi} +2 -2
- data/rbi/galaxy-ruby/models/{planet_delte_image_response.rbi → planet_upload_image_response.rbi} +2 -2
- data/rbi/galaxy-ruby/models/unwrap_webhook_event.rbi +1 -1
- data/rbi/galaxy-ruby/models/user_param.rbi +27 -0
- data/rbi/galaxy-ruby/models/webhook_unwrap_params.rbi +2 -0
- data/rbi/galaxy-ruby/models.rbi +10 -2
- data/rbi/galaxy-ruby/request_options.rbi +4 -10
- data/rbi/galaxy-ruby/resources/celestial_bodies.rbi +2 -2
- data/rbi/galaxy-ruby/resources/planets.rbi +22 -30
- data/rbi/galaxy-ruby/resources/webhooks.rbi +64 -3
- data/sig/galaxy-ruby/client.rbs +13 -5
- data/sig/galaxy-ruby/errors.rbs +13 -0
- data/sig/galaxy-ruby/internal/transport/base_client.rbs +38 -2
- data/sig/galaxy-ruby/internal/transport/connection_pool.rbs +19 -0
- data/sig/galaxy-ruby/internal/transport/pooled_net_requester.rbs +13 -2
- data/sig/galaxy-ruby/internal/type/base_model.rbs +4 -0
- data/sig/galaxy-ruby/internal/util.rbs +29 -1
- data/sig/galaxy-ruby/internal/webhook_verifier.rbs +53 -0
- data/sig/galaxy-ruby/models/authentication_create_token_params.rbs +13 -3
- data/sig/galaxy-ruby/models/celestial_body_create_params.rbs +4 -4
- data/sig/galaxy-ruby/models/celestial_body_param.rbs +69 -0
- data/sig/galaxy-ruby/models/credentials.rbs +1 -3
- data/sig/galaxy-ruby/models/planet_create_params.rbs +14 -3
- data/sig/galaxy-ruby/models/{planet_list_all_data_params.rbs → planet_list_params.rbs} +2 -2
- data/sig/galaxy-ruby/models/{planet_list_all_data_response.rbs → planet_list_response.rbs} +15 -13
- data/sig/galaxy-ruby/models/planet_param.rbs +199 -0
- data/sig/galaxy-ruby/models/planet_update_params.rbs +8 -1
- data/sig/galaxy-ruby/models/{planet_delte_image_params.rbs → planet_upload_image_params.rbs} +2 -2
- data/sig/galaxy-ruby/models/{planet_delte_image_response.rbs → planet_upload_image_response.rbs} +2 -2
- data/sig/galaxy-ruby/models/user_param.rbs +15 -0
- data/sig/galaxy-ruby/models/webhook_unwrap_params.rbs +4 -0
- data/sig/galaxy-ruby/models.rbs +10 -2
- data/sig/galaxy-ruby/resources/celestial_bodies.rbs +1 -1
- data/sig/galaxy-ruby/resources/planets.rbs +10 -14
- data/sig/galaxy-ruby/resources/webhooks.rbs +17 -1
- metadata +32 -71
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
module StandardWebhooks
|
|
2
|
+
class StandardWebhooksError < StandardError
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
class WebhookVerificationError < StandardWebhooksError
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
module ScalarGalaxy
|
|
10
|
+
module Errors
|
|
11
|
+
class WebhookVerificationError < ::StandardWebhooks::WebhookVerificationError
|
|
12
|
+
def initialize: (?String? message) -> void
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
module Internal
|
|
17
|
+
module WebhookVerifier
|
|
18
|
+
SECRET_PREFIX: String
|
|
19
|
+
|
|
20
|
+
TOLERANCE_SECONDS: Integer
|
|
21
|
+
|
|
22
|
+
DEFAULT_ALGORITHM: String
|
|
23
|
+
|
|
24
|
+
HMAC_DIGESTS: ::Hash[String, String]
|
|
25
|
+
|
|
26
|
+
def self.verify!: (
|
|
27
|
+
String payload,
|
|
28
|
+
::Hash[String | Symbol, String | ::Array[String]] headers,
|
|
29
|
+
String secret,
|
|
30
|
+
?algorithm: String,
|
|
31
|
+
?id_header: String,
|
|
32
|
+
?timestamp_header: String,
|
|
33
|
+
?signature_header: String,
|
|
34
|
+
?tolerance: Integer,
|
|
35
|
+
?decoder: String?
|
|
36
|
+
) -> void
|
|
37
|
+
|
|
38
|
+
def self.header_value: (
|
|
39
|
+
::Hash[String | Symbol, String | ::Array[String]] headers,
|
|
40
|
+
String name
|
|
41
|
+
) -> String?
|
|
42
|
+
|
|
43
|
+
def self.decode_secret: (String secret) -> String
|
|
44
|
+
|
|
45
|
+
def self.verify_timestamp!: (String msg_timestamp, ?Integer tolerance) -> void
|
|
46
|
+
|
|
47
|
+
def self.secure_compare: (
|
|
48
|
+
String expected,
|
|
49
|
+
String? signature
|
|
50
|
+
) -> bool
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
module ScalarGalaxy
|
|
2
2
|
module Models
|
|
3
3
|
type authentication_create_token_params =
|
|
4
|
-
{
|
|
4
|
+
{ password: String } & ScalarGalaxy::Internal::Type::request_parameters
|
|
5
5
|
|
|
6
6
|
class AuthenticationCreateTokenParams < ScalarGalaxy::Models::Credentials
|
|
7
7
|
extend ScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include ScalarGalaxy::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
def
|
|
10
|
+
def password: -> String
|
|
11
11
|
|
|
12
|
-
def
|
|
12
|
+
def password=: (String _) -> String
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
password: String,
|
|
16
|
+
?request_options: ScalarGalaxy::request_opts
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
password: String,
|
|
21
|
+
request_options: ScalarGalaxy::RequestOptions
|
|
22
|
+
}
|
|
13
23
|
end
|
|
14
24
|
end
|
|
15
25
|
end
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
module ScalarGalaxy
|
|
2
2
|
module Models
|
|
3
3
|
type celestial_body_create_params =
|
|
4
|
-
{ celestial_body: ScalarGalaxy::Models::
|
|
4
|
+
{ celestial_body: ScalarGalaxy::Models::celestial_body_param }
|
|
5
5
|
& ScalarGalaxy::Internal::Type::request_parameters
|
|
6
6
|
|
|
7
7
|
class CelestialBodyCreateParams < ScalarGalaxy::Internal::Type::BaseModel
|
|
8
8
|
extend ScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include ScalarGalaxy::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
attr_accessor celestial_body: ScalarGalaxy::Models::
|
|
11
|
+
attr_accessor celestial_body: ScalarGalaxy::Models::celestial_body_param
|
|
12
12
|
|
|
13
13
|
def initialize: (
|
|
14
|
-
celestial_body: ScalarGalaxy::Models::
|
|
14
|
+
celestial_body: ScalarGalaxy::Models::celestial_body_param,
|
|
15
15
|
?request_options: ScalarGalaxy::request_opts
|
|
16
16
|
) -> void
|
|
17
17
|
|
|
18
18
|
def to_hash: -> {
|
|
19
|
-
celestial_body: ScalarGalaxy::Models::
|
|
19
|
+
celestial_body: ScalarGalaxy::Models::celestial_body_param,
|
|
20
20
|
request_options: ScalarGalaxy::RequestOptions
|
|
21
21
|
}
|
|
22
22
|
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
module ScalarGalaxy
|
|
2
|
+
module Models
|
|
3
|
+
type celestial_body_param =
|
|
4
|
+
ScalarGalaxy::PlanetParam | ScalarGalaxy::CelestialBodyParam::Satellite
|
|
5
|
+
|
|
6
|
+
module CelestialBodyParam
|
|
7
|
+
extend ScalarGalaxy::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
type satellite =
|
|
10
|
+
{
|
|
11
|
+
name: String,
|
|
12
|
+
description: String?,
|
|
13
|
+
diameter: Float,
|
|
14
|
+
orbit: top,
|
|
15
|
+
type: ScalarGalaxy::Models::CelestialBodyParam::Satellite::type_
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class Satellite < ScalarGalaxy::Internal::Type::BaseModel
|
|
19
|
+
attr_accessor name: String
|
|
20
|
+
|
|
21
|
+
attr_accessor description: String?
|
|
22
|
+
|
|
23
|
+
attr_reader diameter: Float?
|
|
24
|
+
|
|
25
|
+
def diameter=: (Float) -> Float
|
|
26
|
+
|
|
27
|
+
attr_reader orbit: top?
|
|
28
|
+
|
|
29
|
+
def orbit=: (top) -> top
|
|
30
|
+
|
|
31
|
+
attr_reader type: ScalarGalaxy::Models::CelestialBodyParam::Satellite::type_?
|
|
32
|
+
|
|
33
|
+
def type=: (
|
|
34
|
+
ScalarGalaxy::Models::CelestialBodyParam::Satellite::type_
|
|
35
|
+
) -> ScalarGalaxy::Models::CelestialBodyParam::Satellite::type_
|
|
36
|
+
|
|
37
|
+
def initialize: (
|
|
38
|
+
name: String,
|
|
39
|
+
?description: String?,
|
|
40
|
+
?diameter: Float,
|
|
41
|
+
?orbit: top,
|
|
42
|
+
?type: ScalarGalaxy::Models::CelestialBodyParam::Satellite::type_
|
|
43
|
+
) -> void
|
|
44
|
+
|
|
45
|
+
def to_hash: -> {
|
|
46
|
+
name: String,
|
|
47
|
+
description: String?,
|
|
48
|
+
diameter: Float,
|
|
49
|
+
orbit: top,
|
|
50
|
+
type: ScalarGalaxy::Models::CelestialBodyParam::Satellite::type_
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type type_ = :moon | :asteroid | :comet
|
|
54
|
+
|
|
55
|
+
module Type
|
|
56
|
+
extend ScalarGalaxy::Internal::Type::Enum
|
|
57
|
+
|
|
58
|
+
MOON: :moon
|
|
59
|
+
ASTEROID: :asteroid
|
|
60
|
+
COMET: :comet
|
|
61
|
+
|
|
62
|
+
def self?.values: -> ::Array[ScalarGalaxy::Models::CelestialBodyParam::Satellite::type_]
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def self?.variants: -> ::Array[ScalarGalaxy::Models::celestial_body_param]
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -5,9 +5,7 @@ module ScalarGalaxy
|
|
|
5
5
|
class Credentials < ScalarGalaxy::Internal::Type::BaseModel
|
|
6
6
|
attr_accessor email: String
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def initialize: (email: String, password: String) -> void
|
|
8
|
+
def initialize: (email: String) -> void
|
|
11
9
|
|
|
12
10
|
def to_hash: -> { email: String, password: String }
|
|
13
11
|
end
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
module ScalarGalaxy
|
|
2
2
|
module Models
|
|
3
3
|
type planet_create_params =
|
|
4
|
-
{
|
|
4
|
+
{ creator: ScalarGalaxy::UserParam }
|
|
5
|
+
& ScalarGalaxy::Internal::Type::request_parameters
|
|
5
6
|
|
|
6
7
|
class PlanetCreateParams < ScalarGalaxy::Models::Planet
|
|
7
8
|
extend ScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
9
|
include ScalarGalaxy::Internal::Type::RequestParameters
|
|
9
10
|
|
|
10
|
-
def
|
|
11
|
+
def creator: -> ScalarGalaxy::UserParam?
|
|
11
12
|
|
|
12
|
-
def
|
|
13
|
+
def creator=: (ScalarGalaxy::UserParam _) -> ScalarGalaxy::UserParam
|
|
14
|
+
|
|
15
|
+
def initialize: (
|
|
16
|
+
?creator: ScalarGalaxy::UserParam,
|
|
17
|
+
?request_options: ScalarGalaxy::request_opts
|
|
18
|
+
) -> void
|
|
19
|
+
|
|
20
|
+
def to_hash: -> {
|
|
21
|
+
creator: ScalarGalaxy::UserParam,
|
|
22
|
+
request_options: ScalarGalaxy::RequestOptions
|
|
23
|
+
}
|
|
13
24
|
end
|
|
14
25
|
end
|
|
15
26
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module ScalarGalaxy
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type planet_list_params =
|
|
4
4
|
{ limit: Integer, offset: Integer }
|
|
5
5
|
& ScalarGalaxy::Internal::Type::request_parameters
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class PlanetListParams < ScalarGalaxy::Internal::Type::BaseModel
|
|
8
8
|
extend ScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include ScalarGalaxy::Internal::Type::RequestParameters
|
|
10
10
|
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
module ScalarGalaxy
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type planet_list_response =
|
|
4
4
|
{
|
|
5
|
-
data: ::Array[
|
|
6
|
-
meta: ScalarGalaxy::Models::
|
|
5
|
+
data: ::Array[ScalarGalaxy::Planet],
|
|
6
|
+
meta: ScalarGalaxy::Models::PlanetListResponse::Meta
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
class
|
|
10
|
-
attr_reader data: ::Array[
|
|
9
|
+
class PlanetListResponse < ScalarGalaxy::Internal::Type::BaseModel
|
|
10
|
+
attr_reader data: ::Array[ScalarGalaxy::Planet]?
|
|
11
11
|
|
|
12
|
-
def data=: (
|
|
12
|
+
def data=: (
|
|
13
|
+
::Array[ScalarGalaxy::Planet]
|
|
14
|
+
) -> ::Array[ScalarGalaxy::Planet]
|
|
13
15
|
|
|
14
|
-
attr_reader meta: ScalarGalaxy::Models::
|
|
16
|
+
attr_reader meta: ScalarGalaxy::Models::PlanetListResponse::Meta?
|
|
15
17
|
|
|
16
18
|
def meta=: (
|
|
17
|
-
ScalarGalaxy::Models::
|
|
18
|
-
) -> ScalarGalaxy::Models::
|
|
19
|
+
ScalarGalaxy::Models::PlanetListResponse::Meta
|
|
20
|
+
) -> ScalarGalaxy::Models::PlanetListResponse::Meta
|
|
19
21
|
|
|
20
22
|
def initialize: (
|
|
21
|
-
?data: ::Array[
|
|
22
|
-
?meta: ScalarGalaxy::Models::
|
|
23
|
+
?data: ::Array[ScalarGalaxy::Planet],
|
|
24
|
+
?meta: ScalarGalaxy::Models::PlanetListResponse::Meta
|
|
23
25
|
) -> void
|
|
24
26
|
|
|
25
27
|
def to_hash: -> {
|
|
26
|
-
data: ::Array[
|
|
27
|
-
meta: ScalarGalaxy::Models::
|
|
28
|
+
data: ::Array[ScalarGalaxy::Planet],
|
|
29
|
+
meta: ScalarGalaxy::Models::PlanetListResponse::Meta
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
type meta =
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
module ScalarGalaxy
|
|
2
|
+
module Models
|
|
3
|
+
type planet_param =
|
|
4
|
+
{
|
|
5
|
+
name: String,
|
|
6
|
+
atmosphere: ::Array[ScalarGalaxy::PlanetParam::Atmosphere],
|
|
7
|
+
creator: ScalarGalaxy::UserParam,
|
|
8
|
+
description: String?,
|
|
9
|
+
discovered_at: Time,
|
|
10
|
+
failure_callback_url: String,
|
|
11
|
+
habitability_index: Float,
|
|
12
|
+
image: String?,
|
|
13
|
+
physical_properties: ScalarGalaxy::PlanetParam::PhysicalProperties,
|
|
14
|
+
satellites: ::Array[top],
|
|
15
|
+
success_callback_url: String,
|
|
16
|
+
tags: ::Array[String],
|
|
17
|
+
type: ScalarGalaxy::Models::PlanetParam::type_
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class PlanetParam < ScalarGalaxy::Internal::Type::BaseModel
|
|
21
|
+
attr_accessor name: String
|
|
22
|
+
|
|
23
|
+
attr_reader atmosphere: ::Array[ScalarGalaxy::PlanetParam::Atmosphere]?
|
|
24
|
+
|
|
25
|
+
def atmosphere=: (
|
|
26
|
+
::Array[ScalarGalaxy::PlanetParam::Atmosphere]
|
|
27
|
+
) -> ::Array[ScalarGalaxy::PlanetParam::Atmosphere]
|
|
28
|
+
|
|
29
|
+
attr_reader creator: ScalarGalaxy::UserParam?
|
|
30
|
+
|
|
31
|
+
def creator=: (ScalarGalaxy::UserParam) -> ScalarGalaxy::UserParam
|
|
32
|
+
|
|
33
|
+
attr_accessor description: String?
|
|
34
|
+
|
|
35
|
+
attr_reader discovered_at: Time?
|
|
36
|
+
|
|
37
|
+
def discovered_at=: (Time) -> Time
|
|
38
|
+
|
|
39
|
+
attr_reader failure_callback_url: String?
|
|
40
|
+
|
|
41
|
+
def failure_callback_url=: (String) -> String
|
|
42
|
+
|
|
43
|
+
attr_reader habitability_index: Float?
|
|
44
|
+
|
|
45
|
+
def habitability_index=: (Float) -> Float
|
|
46
|
+
|
|
47
|
+
attr_accessor image: String?
|
|
48
|
+
|
|
49
|
+
attr_reader physical_properties: ScalarGalaxy::PlanetParam::PhysicalProperties?
|
|
50
|
+
|
|
51
|
+
def physical_properties=: (
|
|
52
|
+
ScalarGalaxy::PlanetParam::PhysicalProperties
|
|
53
|
+
) -> ScalarGalaxy::PlanetParam::PhysicalProperties
|
|
54
|
+
|
|
55
|
+
attr_reader satellites: ::Array[top]?
|
|
56
|
+
|
|
57
|
+
def satellites=: (::Array[top]) -> ::Array[top]
|
|
58
|
+
|
|
59
|
+
attr_reader success_callback_url: String?
|
|
60
|
+
|
|
61
|
+
def success_callback_url=: (String) -> String
|
|
62
|
+
|
|
63
|
+
attr_reader tags: ::Array[String]?
|
|
64
|
+
|
|
65
|
+
def tags=: (::Array[String]) -> ::Array[String]
|
|
66
|
+
|
|
67
|
+
attr_reader type: ScalarGalaxy::Models::PlanetParam::type_?
|
|
68
|
+
|
|
69
|
+
def type=: (
|
|
70
|
+
ScalarGalaxy::Models::PlanetParam::type_
|
|
71
|
+
) -> ScalarGalaxy::Models::PlanetParam::type_
|
|
72
|
+
|
|
73
|
+
def initialize: (
|
|
74
|
+
name: String,
|
|
75
|
+
?atmosphere: ::Array[ScalarGalaxy::PlanetParam::Atmosphere],
|
|
76
|
+
?creator: ScalarGalaxy::UserParam,
|
|
77
|
+
?description: String?,
|
|
78
|
+
?discovered_at: Time,
|
|
79
|
+
?failure_callback_url: String,
|
|
80
|
+
?habitability_index: Float,
|
|
81
|
+
?image: String?,
|
|
82
|
+
?physical_properties: ScalarGalaxy::PlanetParam::PhysicalProperties,
|
|
83
|
+
?satellites: ::Array[top],
|
|
84
|
+
?success_callback_url: String,
|
|
85
|
+
?tags: ::Array[String],
|
|
86
|
+
?type: ScalarGalaxy::Models::PlanetParam::type_
|
|
87
|
+
) -> void
|
|
88
|
+
|
|
89
|
+
def to_hash: -> {
|
|
90
|
+
name: String,
|
|
91
|
+
atmosphere: ::Array[ScalarGalaxy::PlanetParam::Atmosphere],
|
|
92
|
+
creator: ScalarGalaxy::UserParam,
|
|
93
|
+
description: String?,
|
|
94
|
+
discovered_at: Time,
|
|
95
|
+
failure_callback_url: String,
|
|
96
|
+
habitability_index: Float,
|
|
97
|
+
image: String?,
|
|
98
|
+
physical_properties: ScalarGalaxy::PlanetParam::PhysicalProperties,
|
|
99
|
+
satellites: ::Array[top],
|
|
100
|
+
success_callback_url: String,
|
|
101
|
+
tags: ::Array[String],
|
|
102
|
+
type: ScalarGalaxy::Models::PlanetParam::type_
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
type atmosphere = { compound: String, percentage: Float }
|
|
106
|
+
|
|
107
|
+
class Atmosphere < ScalarGalaxy::Internal::Type::BaseModel
|
|
108
|
+
attr_reader compound: String?
|
|
109
|
+
|
|
110
|
+
def compound=: (String) -> String
|
|
111
|
+
|
|
112
|
+
attr_reader percentage: Float?
|
|
113
|
+
|
|
114
|
+
def percentage=: (Float) -> Float
|
|
115
|
+
|
|
116
|
+
def initialize: (?compound: String, ?percentage: Float) -> void
|
|
117
|
+
|
|
118
|
+
def to_hash: -> { compound: String, percentage: Float }
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
type physical_properties =
|
|
122
|
+
{
|
|
123
|
+
gravity: Float,
|
|
124
|
+
mass: Float,
|
|
125
|
+
radius: Float,
|
|
126
|
+
temperature: ScalarGalaxy::PlanetParam::PhysicalProperties::Temperature
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
class PhysicalProperties < ScalarGalaxy::Internal::Type::BaseModel
|
|
130
|
+
attr_reader gravity: Float?
|
|
131
|
+
|
|
132
|
+
def gravity=: (Float) -> Float
|
|
133
|
+
|
|
134
|
+
attr_reader mass: Float?
|
|
135
|
+
|
|
136
|
+
def mass=: (Float) -> Float
|
|
137
|
+
|
|
138
|
+
attr_reader radius: Float?
|
|
139
|
+
|
|
140
|
+
def radius=: (Float) -> Float
|
|
141
|
+
|
|
142
|
+
attr_reader temperature: ScalarGalaxy::PlanetParam::PhysicalProperties::Temperature?
|
|
143
|
+
|
|
144
|
+
def temperature=: (
|
|
145
|
+
ScalarGalaxy::PlanetParam::PhysicalProperties::Temperature
|
|
146
|
+
) -> ScalarGalaxy::PlanetParam::PhysicalProperties::Temperature
|
|
147
|
+
|
|
148
|
+
def initialize: (
|
|
149
|
+
?gravity: Float,
|
|
150
|
+
?mass: Float,
|
|
151
|
+
?radius: Float,
|
|
152
|
+
?temperature: ScalarGalaxy::PlanetParam::PhysicalProperties::Temperature
|
|
153
|
+
) -> void
|
|
154
|
+
|
|
155
|
+
def to_hash: -> {
|
|
156
|
+
gravity: Float,
|
|
157
|
+
mass: Float,
|
|
158
|
+
radius: Float,
|
|
159
|
+
temperature: ScalarGalaxy::PlanetParam::PhysicalProperties::Temperature
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
type temperature = { average: Float, max: Float, min: Float }
|
|
163
|
+
|
|
164
|
+
class Temperature < ScalarGalaxy::Internal::Type::BaseModel
|
|
165
|
+
attr_reader average: Float?
|
|
166
|
+
|
|
167
|
+
def average=: (Float) -> Float
|
|
168
|
+
|
|
169
|
+
attr_reader max: Float?
|
|
170
|
+
|
|
171
|
+
def max=: (Float) -> Float
|
|
172
|
+
|
|
173
|
+
attr_reader min: Float?
|
|
174
|
+
|
|
175
|
+
def min=: (Float) -> Float
|
|
176
|
+
|
|
177
|
+
def initialize: (?average: Float, ?max: Float, ?min: Float) -> void
|
|
178
|
+
|
|
179
|
+
def to_hash: -> { average: Float, max: Float, min: Float }
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
type type_ =
|
|
184
|
+
:terrestrial | :gas_giant | :ice_giant | :dwarf | :super_earth
|
|
185
|
+
|
|
186
|
+
module Type
|
|
187
|
+
extend ScalarGalaxy::Internal::Type::Enum
|
|
188
|
+
|
|
189
|
+
TERRESTRIAL: :terrestrial
|
|
190
|
+
GAS_GIANT: :gas_giant
|
|
191
|
+
ICE_GIANT: :ice_giant
|
|
192
|
+
DWARF: :dwarf
|
|
193
|
+
SUPER_EARTH: :super_earth
|
|
194
|
+
|
|
195
|
+
def self?.values: -> ::Array[ScalarGalaxy::Models::PlanetParam::type_]
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
module ScalarGalaxy
|
|
2
2
|
module Models
|
|
3
3
|
type planet_update_params =
|
|
4
|
-
{ planet_id: Integer
|
|
4
|
+
{ planet_id: Integer, creator: ScalarGalaxy::UserParam }
|
|
5
|
+
& ScalarGalaxy::Internal::Type::request_parameters
|
|
5
6
|
|
|
6
7
|
class PlanetUpdateParams < ScalarGalaxy::Models::Planet
|
|
7
8
|
extend ScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
@@ -11,13 +12,19 @@ module ScalarGalaxy
|
|
|
11
12
|
|
|
12
13
|
def planet_id=: (Integer _) -> Integer
|
|
13
14
|
|
|
15
|
+
def creator: -> ScalarGalaxy::UserParam?
|
|
16
|
+
|
|
17
|
+
def creator=: (ScalarGalaxy::UserParam _) -> ScalarGalaxy::UserParam
|
|
18
|
+
|
|
14
19
|
def initialize: (
|
|
15
20
|
planet_id: Integer,
|
|
21
|
+
?creator: ScalarGalaxy::UserParam,
|
|
16
22
|
?request_options: ScalarGalaxy::request_opts
|
|
17
23
|
) -> void
|
|
18
24
|
|
|
19
25
|
def to_hash: -> {
|
|
20
26
|
planet_id: Integer,
|
|
27
|
+
creator: ScalarGalaxy::UserParam,
|
|
21
28
|
request_options: ScalarGalaxy::RequestOptions
|
|
22
29
|
}
|
|
23
30
|
end
|
data/sig/galaxy-ruby/models/{planet_delte_image_params.rbs → planet_upload_image_params.rbs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module ScalarGalaxy
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type planet_upload_image_params =
|
|
4
4
|
{ planet_id: Integer, image: ScalarGalaxy::Internal::file_input }
|
|
5
5
|
& ScalarGalaxy::Internal::Type::request_parameters
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class PlanetUploadImageParams < ScalarGalaxy::Internal::Type::BaseModel
|
|
8
8
|
extend ScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include ScalarGalaxy::Internal::Type::RequestParameters
|
|
10
10
|
|
data/sig/galaxy-ruby/models/{planet_delte_image_response.rbs → planet_upload_image_response.rbs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module ScalarGalaxy
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type planet_upload_image_response =
|
|
4
4
|
{
|
|
5
5
|
file_size: Integer,
|
|
6
6
|
image_url: String,
|
|
@@ -9,7 +9,7 @@ module ScalarGalaxy
|
|
|
9
9
|
uploaded_at: Time
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class PlanetUploadImageResponse < ScalarGalaxy::Internal::Type::BaseModel
|
|
13
13
|
attr_reader file_size: Integer?
|
|
14
14
|
|
|
15
15
|
def file_size=: (Integer) -> Integer
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module ScalarGalaxy
|
|
2
|
+
module Models
|
|
3
|
+
type user_param = { name: String }
|
|
4
|
+
|
|
5
|
+
class UserParam < ScalarGalaxy::Internal::Type::BaseModel
|
|
6
|
+
attr_reader name: String?
|
|
7
|
+
|
|
8
|
+
def name=: (String) -> String
|
|
9
|
+
|
|
10
|
+
def initialize: (?name: String) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { name: String }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/sig/galaxy-ruby/models.rbs
CHANGED
|
@@ -9,6 +9,8 @@ module ScalarGalaxy
|
|
|
9
9
|
|
|
10
10
|
class CelestialBodyCreateParams = ScalarGalaxy::Models::CelestialBodyCreateParams
|
|
11
11
|
|
|
12
|
+
module CelestialBodyParam = ScalarGalaxy::Models::CelestialBodyParam
|
|
13
|
+
|
|
12
14
|
class Credentials = ScalarGalaxy::Models::Credentials
|
|
13
15
|
|
|
14
16
|
class NewPlanetWebhookEvent = ScalarGalaxy::Models::NewPlanetWebhookEvent
|
|
@@ -19,17 +21,23 @@ module ScalarGalaxy
|
|
|
19
21
|
|
|
20
22
|
class PlanetDeleteParams = ScalarGalaxy::Models::PlanetDeleteParams
|
|
21
23
|
|
|
22
|
-
class
|
|
24
|
+
class PlanetListParams = ScalarGalaxy::Models::PlanetListParams
|
|
23
25
|
|
|
24
|
-
class
|
|
26
|
+
class PlanetParam = ScalarGalaxy::Models::PlanetParam
|
|
25
27
|
|
|
26
28
|
class PlanetRetrieveParams = ScalarGalaxy::Models::PlanetRetrieveParams
|
|
27
29
|
|
|
28
30
|
class PlanetUpdateParams = ScalarGalaxy::Models::PlanetUpdateParams
|
|
29
31
|
|
|
32
|
+
class PlanetUploadImageParams = ScalarGalaxy::Models::PlanetUploadImageParams
|
|
33
|
+
|
|
30
34
|
module UnwrapWebhookEvent = ScalarGalaxy::Models::UnwrapWebhookEvent
|
|
31
35
|
|
|
32
36
|
class User = ScalarGalaxy::Models::User
|
|
33
37
|
|
|
38
|
+
class UserParam = ScalarGalaxy::Models::UserParam
|
|
39
|
+
|
|
40
|
+
class WebhookParsedParams = ScalarGalaxy::Models::WebhookParsedParams
|
|
41
|
+
|
|
34
42
|
class WebhookUnwrapParams = ScalarGalaxy::Models::WebhookUnwrapParams
|
|
35
43
|
end
|
|
@@ -2,7 +2,7 @@ module ScalarGalaxy
|
|
|
2
2
|
module Resources
|
|
3
3
|
class CelestialBodies
|
|
4
4
|
def create: (
|
|
5
|
-
celestial_body: ScalarGalaxy::Models::
|
|
5
|
+
celestial_body: ScalarGalaxy::Models::celestial_body_param,
|
|
6
6
|
?request_options: ScalarGalaxy::request_opts
|
|
7
7
|
) -> ScalarGalaxy::Models::celestial_body
|
|
8
8
|
|
|
@@ -2,16 +2,14 @@ module ScalarGalaxy
|
|
|
2
2
|
module Resources
|
|
3
3
|
class Planets
|
|
4
4
|
def create: (
|
|
5
|
-
id: Integer,
|
|
6
5
|
name: String,
|
|
7
6
|
?atmosphere: ::Array[ScalarGalaxy::Planet::Atmosphere],
|
|
8
|
-
?creator: ScalarGalaxy::
|
|
7
|
+
?creator: ScalarGalaxy::UserParam,
|
|
9
8
|
?description: String?,
|
|
10
9
|
?discovered_at: Time,
|
|
11
10
|
?failure_callback_url: String,
|
|
12
11
|
?habitability_index: Float,
|
|
13
12
|
?image: String?,
|
|
14
|
-
?last_updated: Time,
|
|
15
13
|
?physical_properties: ScalarGalaxy::Planet::PhysicalProperties,
|
|
16
14
|
?satellites: ::Array[top],
|
|
17
15
|
?success_callback_url: String,
|
|
@@ -27,16 +25,14 @@ module ScalarGalaxy
|
|
|
27
25
|
|
|
28
26
|
def update: (
|
|
29
27
|
Integer planet_id,
|
|
30
|
-
id: Integer,
|
|
31
28
|
name: String,
|
|
32
29
|
?atmosphere: ::Array[ScalarGalaxy::Planet::Atmosphere],
|
|
33
|
-
?creator: ScalarGalaxy::
|
|
30
|
+
?creator: ScalarGalaxy::UserParam,
|
|
34
31
|
?description: String?,
|
|
35
32
|
?discovered_at: Time,
|
|
36
33
|
?failure_callback_url: String,
|
|
37
34
|
?habitability_index: Float,
|
|
38
35
|
?image: String?,
|
|
39
|
-
?last_updated: Time,
|
|
40
36
|
?physical_properties: ScalarGalaxy::Planet::PhysicalProperties,
|
|
41
37
|
?satellites: ::Array[top],
|
|
42
38
|
?success_callback_url: String,
|
|
@@ -45,22 +41,22 @@ module ScalarGalaxy
|
|
|
45
41
|
?request_options: ScalarGalaxy::request_opts
|
|
46
42
|
) -> ScalarGalaxy::Planet
|
|
47
43
|
|
|
44
|
+
def list: (
|
|
45
|
+
?limit: Integer,
|
|
46
|
+
?offset: Integer,
|
|
47
|
+
?request_options: ScalarGalaxy::request_opts
|
|
48
|
+
) -> ScalarGalaxy::Models::PlanetListResponse
|
|
49
|
+
|
|
48
50
|
def delete: (
|
|
49
51
|
Integer planet_id,
|
|
50
52
|
?request_options: ScalarGalaxy::request_opts
|
|
51
53
|
) -> nil
|
|
52
54
|
|
|
53
|
-
def
|
|
55
|
+
def upload_image: (
|
|
54
56
|
Integer planet_id,
|
|
55
57
|
?image: ScalarGalaxy::Internal::file_input,
|
|
56
58
|
?request_options: ScalarGalaxy::request_opts
|
|
57
|
-
) -> ScalarGalaxy::Models::
|
|
58
|
-
|
|
59
|
-
def list_all_data: (
|
|
60
|
-
?limit: Integer,
|
|
61
|
-
?offset: Integer,
|
|
62
|
-
?request_options: ScalarGalaxy::request_opts
|
|
63
|
-
) -> ScalarGalaxy::Models::PlanetListAllDataResponse
|
|
59
|
+
) -> ScalarGalaxy::Models::PlanetUploadImageResponse
|
|
64
60
|
|
|
65
61
|
def initialize: (client: ScalarGalaxy::Client) -> void
|
|
66
62
|
end
|