amritk-galaxy-staging 0.2.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 +7 -0
- data/CHANGELOG.md +13 -0
- data/LICENSE +201 -0
- data/README.md +169 -0
- data/SECURITY.md +19 -0
- data/SKILL.md +83 -0
- data/api.md +186 -0
- data/lib/amritk-galaxy-staging/client.rb +238 -0
- data/lib/amritk-galaxy-staging/errors.rb +227 -0
- data/lib/amritk-galaxy-staging/file_part.rb +58 -0
- data/lib/amritk-galaxy-staging/internal/transport/base_client.rb +588 -0
- data/lib/amritk-galaxy-staging/internal/transport/pooled_net_requester.rb +224 -0
- data/lib/amritk-galaxy-staging/internal/type/array_of.rb +164 -0
- data/lib/amritk-galaxy-staging/internal/type/base_model.rb +534 -0
- data/lib/amritk-galaxy-staging/internal/type/base_page.rb +55 -0
- data/lib/amritk-galaxy-staging/internal/type/boolean.rb +77 -0
- data/lib/amritk-galaxy-staging/internal/type/converter.rb +333 -0
- data/lib/amritk-galaxy-staging/internal/type/enum.rb +132 -0
- data/lib/amritk-galaxy-staging/internal/type/file_input.rb +111 -0
- data/lib/amritk-galaxy-staging/internal/type/hash_of.rb +186 -0
- data/lib/amritk-galaxy-staging/internal/type/request_parameters.rb +42 -0
- data/lib/amritk-galaxy-staging/internal/type/union.rb +238 -0
- data/lib/amritk-galaxy-staging/internal/type/unknown.rb +81 -0
- data/lib/amritk-galaxy-staging/internal/util.rb +965 -0
- data/lib/amritk-galaxy-staging/internal.rb +18 -0
- data/lib/amritk-galaxy-staging/models/authentication_create_token_params.rb +26 -0
- data/lib/amritk-galaxy-staging/models/authentication_create_user_params.rb +32 -0
- data/lib/amritk-galaxy-staging/models/authentication_list_me_params.rb +14 -0
- data/lib/amritk-galaxy-staging/models/celestial_body.rb +21 -0
- data/lib/amritk-galaxy-staging/models/celestial_body_create_params.rb +20 -0
- data/lib/amritk-galaxy-staging/models/new_planet_webhook_event.rb +9 -0
- data/lib/amritk-galaxy-staging/models/paginated_resource.rb +46 -0
- data/lib/amritk-galaxy-staging/models/planet.rb +221 -0
- data/lib/amritk-galaxy-staging/models/planet_create_params.rb +14 -0
- data/lib/amritk-galaxy-staging/models/planet_delete_params.rb +20 -0
- data/lib/amritk-galaxy-staging/models/planet_list_params.rb +30 -0
- data/lib/amritk-galaxy-staging/models/planet_list_response.rb +16 -0
- data/lib/amritk-galaxy-staging/models/planet_retrieve_params.rb +20 -0
- data/lib/amritk-galaxy-staging/models/planet_update_params.rb +20 -0
- data/lib/amritk-galaxy-staging/models/planet_upload_image_params.rb +29 -0
- data/lib/amritk-galaxy-staging/models/planet_upload_image_response.rb +48 -0
- data/lib/amritk-galaxy-staging/models/satellite.rb +96 -0
- data/lib/amritk-galaxy-staging/models/token.rb +18 -0
- data/lib/amritk-galaxy-staging/models/unwrap_webhook_event.rb +14 -0
- data/lib/amritk-galaxy-staging/models/user.rb +26 -0
- data/lib/amritk-galaxy-staging/models/webhook_unwrap_params.rb +14 -0
- data/lib/amritk-galaxy-staging/models.rb +87 -0
- data/lib/amritk-galaxy-staging/request_options.rb +79 -0
- data/lib/amritk-galaxy-staging/resources/authentication.rb +80 -0
- data/lib/amritk-galaxy-staging/resources/celestial_bodies.rb +36 -0
- data/lib/amritk-galaxy-staging/resources/planets.rb +215 -0
- data/lib/amritk-galaxy-staging/resources/webhooks.rb +37 -0
- data/lib/amritk-galaxy-staging/version.rb +5 -0
- data/lib/amritk-galaxy-staging.rb +79 -0
- data/rbi/amritk-galaxy-staging/client.rbi +130 -0
- data/rbi/amritk-galaxy-staging/errors.rbi +205 -0
- data/rbi/amritk-galaxy-staging/file_part.rbi +37 -0
- data/rbi/amritk-galaxy-staging/internal/transport/base_client.rbi +312 -0
- data/rbi/amritk-galaxy-staging/internal/transport/pooled_net_requester.rbi +84 -0
- data/rbi/amritk-galaxy-staging/internal/type/array_of.rbi +108 -0
- data/rbi/amritk-galaxy-staging/internal/type/base_model.rbi +319 -0
- data/rbi/amritk-galaxy-staging/internal/type/base_page.rbi +43 -0
- data/rbi/amritk-galaxy-staging/internal/type/boolean.rbi +59 -0
- data/rbi/amritk-galaxy-staging/internal/type/converter.rbi +225 -0
- data/rbi/amritk-galaxy-staging/internal/type/enum.rbi +82 -0
- data/rbi/amritk-galaxy-staging/internal/type/file_input.rbi +60 -0
- data/rbi/amritk-galaxy-staging/internal/type/hash_of.rbi +108 -0
- data/rbi/amritk-galaxy-staging/internal/type/request_parameters.rbi +33 -0
- data/rbi/amritk-galaxy-staging/internal/type/union.rbi +134 -0
- data/rbi/amritk-galaxy-staging/internal/type/unknown.rbi +59 -0
- data/rbi/amritk-galaxy-staging/internal/util.rbi +515 -0
- data/rbi/amritk-galaxy-staging/internal.rbi +18 -0
- data/rbi/amritk-galaxy-staging/models/authentication_create_token_params.rbi +46 -0
- data/rbi/amritk-galaxy-staging/models/authentication_create_user_params.rbi +54 -0
- data/rbi/amritk-galaxy-staging/models/authentication_list_me_params.rbi +34 -0
- data/rbi/amritk-galaxy-staging/models/celestial_body.rbi +21 -0
- data/rbi/amritk-galaxy-staging/models/celestial_body_create_params.rbi +53 -0
- data/rbi/amritk-galaxy-staging/models/new_planet_webhook_event.rbi +23 -0
- data/rbi/amritk-galaxy-staging/models/paginated_resource.rbi +93 -0
- data/rbi/amritk-galaxy-staging/models/planet.rbi +373 -0
- data/rbi/amritk-galaxy-staging/models/planet_create_params.rbi +34 -0
- data/rbi/amritk-galaxy-staging/models/planet_delete_params.rbi +41 -0
- data/rbi/amritk-galaxy-staging/models/planet_list_params.rbi +60 -0
- data/rbi/amritk-galaxy-staging/models/planet_list_response.rbi +33 -0
- data/rbi/amritk-galaxy-staging/models/planet_retrieve_params.rbi +41 -0
- data/rbi/amritk-galaxy-staging/models/planet_update_params.rbi +41 -0
- data/rbi/amritk-galaxy-staging/models/planet_upload_image_params.rbi +55 -0
- data/rbi/amritk-galaxy-staging/models/planet_upload_image_response.rbi +85 -0
- data/rbi/amritk-galaxy-staging/models/satellite.rbi +160 -0
- data/rbi/amritk-galaxy-staging/models/token.rbi +30 -0
- data/rbi/amritk-galaxy-staging/models/unwrap_webhook_event.rbi +20 -0
- data/rbi/amritk-galaxy-staging/models/user.rbi +36 -0
- data/rbi/amritk-galaxy-staging/models/webhook_unwrap_params.rbi +34 -0
- data/rbi/amritk-galaxy-staging/models.rbi +45 -0
- data/rbi/amritk-galaxy-staging/request_options.rbi +64 -0
- data/rbi/amritk-galaxy-staging/resources/authentication.rbi +49 -0
- data/rbi/amritk-galaxy-staging/resources/celestial_bodies.rbi +29 -0
- data/rbi/amritk-galaxy-staging/resources/planets.rbi +180 -0
- data/rbi/amritk-galaxy-staging/resources/webhooks.rbi +31 -0
- data/rbi/amritk-galaxy-staging/version.rbi +5 -0
- data/sig/amritk-galaxy-staging/client.rbs +62 -0
- data/sig/amritk-galaxy-staging/errors.rbs +117 -0
- data/sig/amritk-galaxy-staging/file_part.rbs +21 -0
- data/sig/amritk-galaxy-staging/internal/transport/base_client.rbs +133 -0
- data/sig/amritk-galaxy-staging/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/amritk-galaxy-staging/internal/type/array_of.rbs +48 -0
- data/sig/amritk-galaxy-staging/internal/type/base_model.rbs +102 -0
- data/sig/amritk-galaxy-staging/internal/type/base_page.rbs +24 -0
- data/sig/amritk-galaxy-staging/internal/type/boolean.rbs +26 -0
- data/sig/amritk-galaxy-staging/internal/type/converter.rbs +79 -0
- data/sig/amritk-galaxy-staging/internal/type/enum.rbs +32 -0
- data/sig/amritk-galaxy-staging/internal/type/file_input.rbs +25 -0
- data/sig/amritk-galaxy-staging/internal/type/hash_of.rbs +48 -0
- data/sig/amritk-galaxy-staging/internal/type/request_parameters.rbs +17 -0
- data/sig/amritk-galaxy-staging/internal/type/union.rbs +52 -0
- data/sig/amritk-galaxy-staging/internal/type/unknown.rbs +26 -0
- data/sig/amritk-galaxy-staging/internal/util.rbs +199 -0
- data/sig/amritk-galaxy-staging/internal.rbs +9 -0
- data/sig/amritk-galaxy-staging/models/authentication_create_token_params.rbs +28 -0
- data/sig/amritk-galaxy-staging/models/authentication_create_user_params.rbs +34 -0
- data/sig/amritk-galaxy-staging/models/authentication_list_me_params.rbs +17 -0
- data/sig/amritk-galaxy-staging/models/celestial_body.rbs +12 -0
- data/sig/amritk-galaxy-staging/models/celestial_body_create_params.rbs +24 -0
- data/sig/amritk-galaxy-staging/models/new_planet_webhook_event.rbs +11 -0
- data/sig/amritk-galaxy-staging/models/paginated_resource.rbs +53 -0
- data/sig/amritk-galaxy-staging/models/planet.rbs +210 -0
- data/sig/amritk-galaxy-staging/models/planet_create_params.rbs +17 -0
- data/sig/amritk-galaxy-staging/models/planet_delete_params.rbs +24 -0
- data/sig/amritk-galaxy-staging/models/planet_list_params.rbs +32 -0
- data/sig/amritk-galaxy-staging/models/planet_list_response.rbs +17 -0
- data/sig/amritk-galaxy-staging/models/planet_retrieve_params.rbs +24 -0
- data/sig/amritk-galaxy-staging/models/planet_update_params.rbs +26 -0
- data/sig/amritk-galaxy-staging/models/planet_upload_image_params.rbs +32 -0
- data/sig/amritk-galaxy-staging/models/planet_upload_image_response.rbs +50 -0
- data/sig/amritk-galaxy-staging/models/satellite.rbs +95 -0
- data/sig/amritk-galaxy-staging/models/token.rbs +15 -0
- data/sig/amritk-galaxy-staging/models/unwrap_webhook_event.rbs +11 -0
- data/sig/amritk-galaxy-staging/models/user.rbs +19 -0
- data/sig/amritk-galaxy-staging/models/webhook_unwrap_params.rbs +17 -0
- data/sig/amritk-galaxy-staging/models.rbs +39 -0
- data/sig/amritk-galaxy-staging/request_options.rbs +34 -0
- data/sig/amritk-galaxy-staging/resources/authentication.rbs +24 -0
- data/sig/amritk-galaxy-staging/resources/celestial_bodies.rbs +12 -0
- data/sig/amritk-galaxy-staging/resources/planets.rbs +68 -0
- data/sig/amritk-galaxy-staging/resources/webhooks.rbs +13 -0
- data/sig/amritk-galaxy-staging/version.rbs +3 -0
- data/sig/manifest.yaml +6 -0
- metadata +248 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Internal
|
|
5
|
+
extend DemoApiScalarGalaxy::Internal::Util::SorbetRuntimeSupport
|
|
6
|
+
|
|
7
|
+
OMIT =
|
|
8
|
+
Object
|
|
9
|
+
.new
|
|
10
|
+
.tap { _1.define_singleton_method(:inspect) { "#<#{DemoApiScalarGalaxy::Internal}::OMIT>" } }
|
|
11
|
+
.freeze
|
|
12
|
+
|
|
13
|
+
define_sorbet_constant!(:AnyHash) { T.type_alias { T::Hash[Symbol, T.anything] } }
|
|
14
|
+
define_sorbet_constant!(:FileInput) do
|
|
15
|
+
T.type_alias { T.any(Pathname, StringIO, IO, String, DemoApiScalarGalaxy::FilePart) }
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Authentication#create_token
|
|
6
|
+
class AuthenticationCreateTokenParams < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute email
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :email, String
|
|
14
|
+
|
|
15
|
+
# @!attribute password
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :password, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(email:, password:, request_options: {})
|
|
21
|
+
# @param email [String]
|
|
22
|
+
# @param password [String]
|
|
23
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Authentication#create_user
|
|
6
|
+
class AuthenticationCreateUserParams < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute email
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :email, String
|
|
14
|
+
|
|
15
|
+
# @!attribute password
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :password, String
|
|
19
|
+
|
|
20
|
+
# @!attribute name
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :name, String
|
|
24
|
+
|
|
25
|
+
# @!method initialize(email:, password:, name: nil, request_options: {})
|
|
26
|
+
# @param email [String]
|
|
27
|
+
# @param password [String]
|
|
28
|
+
# @param name [String]
|
|
29
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Authentication#list_me
|
|
6
|
+
class AuthenticationListMeParams < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# A celestial body which can be either a planet or a satellite
|
|
6
|
+
#
|
|
7
|
+
# @see DemoApiScalarGalaxy::Resources::CelestialBodies#create
|
|
8
|
+
module CelestialBody
|
|
9
|
+
extend DemoApiScalarGalaxy::Internal::Type::Union
|
|
10
|
+
|
|
11
|
+
discriminator :type
|
|
12
|
+
|
|
13
|
+
variant :planet, -> { DemoApiScalarGalaxy::Planet }
|
|
14
|
+
|
|
15
|
+
variant :satellite, -> { DemoApiScalarGalaxy::Satellite }
|
|
16
|
+
|
|
17
|
+
# @!method self.variants
|
|
18
|
+
# @return [Array(DemoApiScalarGalaxy::Models::Planet, DemoApiScalarGalaxy::Models::Satellite)]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::CelestialBodies#create
|
|
6
|
+
class CelestialBodyCreateParams < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute celestial_body
|
|
11
|
+
#
|
|
12
|
+
# @return [DemoApiScalarGalaxy::Models::Planet, DemoApiScalarGalaxy::Models::Satellite]
|
|
13
|
+
required :celestial_body, union: -> { DemoApiScalarGalaxy::CelestialBody }
|
|
14
|
+
|
|
15
|
+
# @!method initialize(celestial_body:, request_options: {})
|
|
16
|
+
# @param celestial_body [DemoApiScalarGalaxy::Models::Planet, DemoApiScalarGalaxy::Models::Satellite]
|
|
17
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
class PaginatedResource < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute meta
|
|
7
|
+
#
|
|
8
|
+
# @return [DemoApiScalarGalaxy::Models::PaginatedResource::Meta, nil]
|
|
9
|
+
optional :meta, -> { DemoApiScalarGalaxy::PaginatedResource::Meta }
|
|
10
|
+
|
|
11
|
+
# @!method initialize(meta: nil)
|
|
12
|
+
# A paginated resource
|
|
13
|
+
#
|
|
14
|
+
# @param meta [DemoApiScalarGalaxy::Models::PaginatedResource::Meta]
|
|
15
|
+
|
|
16
|
+
# @see DemoApiScalarGalaxy::Models::PaginatedResource#meta
|
|
17
|
+
class Meta < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
18
|
+
# @!attribute limit
|
|
19
|
+
#
|
|
20
|
+
# @return [Integer, nil]
|
|
21
|
+
optional :limit, Integer
|
|
22
|
+
|
|
23
|
+
# @!attribute next_
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :next_, String, api_name: :next, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute offset
|
|
29
|
+
#
|
|
30
|
+
# @return [Integer, nil]
|
|
31
|
+
optional :offset, Integer
|
|
32
|
+
|
|
33
|
+
# @!attribute total
|
|
34
|
+
#
|
|
35
|
+
# @return [Integer, nil]
|
|
36
|
+
optional :total, Integer
|
|
37
|
+
|
|
38
|
+
# @!method initialize(limit: nil, next_: nil, offset: nil, total: nil)
|
|
39
|
+
# @param limit [Integer]
|
|
40
|
+
# @param next_ [String, nil]
|
|
41
|
+
# @param offset [Integer]
|
|
42
|
+
# @param total [Integer]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Planets#create
|
|
6
|
+
class Planet < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute name
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :name, String
|
|
11
|
+
|
|
12
|
+
# @!attribute type
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, DemoApiScalarGalaxy::Models::Planet::Type]
|
|
15
|
+
required :type, enum: -> { DemoApiScalarGalaxy::Planet::Type }
|
|
16
|
+
|
|
17
|
+
# @!attribute atmosphere
|
|
18
|
+
# Atmospheric composition
|
|
19
|
+
#
|
|
20
|
+
# @return [Array<DemoApiScalarGalaxy::Models::Planet::Atmosphere>, nil]
|
|
21
|
+
optional :atmosphere,
|
|
22
|
+
-> { DemoApiScalarGalaxy::Internal::Type::ArrayOf[DemoApiScalarGalaxy::Planet::Atmosphere] }
|
|
23
|
+
|
|
24
|
+
# @!attribute creator
|
|
25
|
+
# A user
|
|
26
|
+
#
|
|
27
|
+
# @return [DemoApiScalarGalaxy::Models::User, nil]
|
|
28
|
+
optional :creator, -> { DemoApiScalarGalaxy::User }
|
|
29
|
+
|
|
30
|
+
# @!attribute description
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :description, String, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute discovered_at
|
|
36
|
+
#
|
|
37
|
+
# @return [Time, nil]
|
|
38
|
+
optional :discovered_at, Time, api_name: :discoveredAt
|
|
39
|
+
|
|
40
|
+
# @!attribute failure_callback_url
|
|
41
|
+
# URL which gets invoked upon a failed operation
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :failure_callback_url, String, api_name: :failureCallbackUrl
|
|
45
|
+
|
|
46
|
+
# @!attribute habitability_index
|
|
47
|
+
# A score from 0 to 1 indicating potential habitability
|
|
48
|
+
#
|
|
49
|
+
# @return [Float, nil]
|
|
50
|
+
optional :habitability_index, Float, api_name: :habitabilityIndex
|
|
51
|
+
|
|
52
|
+
# @!attribute image
|
|
53
|
+
#
|
|
54
|
+
# @return [String, nil]
|
|
55
|
+
optional :image, String, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!attribute physical_properties
|
|
58
|
+
#
|
|
59
|
+
# @return [DemoApiScalarGalaxy::Models::Planet::PhysicalProperties, nil]
|
|
60
|
+
optional :physical_properties,
|
|
61
|
+
-> { DemoApiScalarGalaxy::Planet::PhysicalProperties },
|
|
62
|
+
api_name: :physicalProperties
|
|
63
|
+
|
|
64
|
+
# @!attribute satellites
|
|
65
|
+
#
|
|
66
|
+
# @return [Array<DemoApiScalarGalaxy::Models::Satellite>, nil]
|
|
67
|
+
optional :satellites,
|
|
68
|
+
-> { DemoApiScalarGalaxy::Internal::Type::ArrayOf[DemoApiScalarGalaxy::Satellite] }
|
|
69
|
+
|
|
70
|
+
# @!attribute success_callback_url
|
|
71
|
+
# URL which gets invoked upon a successful operation
|
|
72
|
+
#
|
|
73
|
+
# @return [String, nil]
|
|
74
|
+
optional :success_callback_url, String, api_name: :successCallbackUrl
|
|
75
|
+
|
|
76
|
+
# @!attribute tags
|
|
77
|
+
#
|
|
78
|
+
# @return [Array<String>, nil]
|
|
79
|
+
optional :tags, DemoApiScalarGalaxy::Internal::Type::ArrayOf[String]
|
|
80
|
+
|
|
81
|
+
response_only do
|
|
82
|
+
# @!attribute id
|
|
83
|
+
#
|
|
84
|
+
# @return [Integer]
|
|
85
|
+
required :id, Integer
|
|
86
|
+
|
|
87
|
+
# @!attribute last_updated
|
|
88
|
+
#
|
|
89
|
+
# @return [Time, nil]
|
|
90
|
+
optional :last_updated, Time, api_name: :lastUpdated
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# @!method initialize(id:, name:, type:, atmosphere: nil, creator: nil, description: nil, discovered_at: nil, failure_callback_url: nil, habitability_index: nil, image: nil, last_updated: nil, physical_properties: nil, satellites: nil, success_callback_url: nil, tags: nil)
|
|
94
|
+
# A planet in the Scalar Galaxy
|
|
95
|
+
#
|
|
96
|
+
# @param id [Integer]
|
|
97
|
+
#
|
|
98
|
+
# @param name [String]
|
|
99
|
+
#
|
|
100
|
+
# @param type [Symbol, DemoApiScalarGalaxy::Models::Planet::Type]
|
|
101
|
+
#
|
|
102
|
+
# @param atmosphere [Array<DemoApiScalarGalaxy::Models::Planet::Atmosphere>] Atmospheric composition
|
|
103
|
+
#
|
|
104
|
+
# @param creator [DemoApiScalarGalaxy::Models::User] A user
|
|
105
|
+
#
|
|
106
|
+
# @param description [String, nil]
|
|
107
|
+
#
|
|
108
|
+
# @param discovered_at [Time]
|
|
109
|
+
#
|
|
110
|
+
# @param failure_callback_url [String] URL which gets invoked upon a failed operation
|
|
111
|
+
#
|
|
112
|
+
# @param habitability_index [Float] A score from 0 to 1 indicating potential habitability
|
|
113
|
+
#
|
|
114
|
+
# @param image [String, nil]
|
|
115
|
+
#
|
|
116
|
+
# @param last_updated [Time]
|
|
117
|
+
#
|
|
118
|
+
# @param physical_properties [DemoApiScalarGalaxy::Models::Planet::PhysicalProperties]
|
|
119
|
+
#
|
|
120
|
+
# @param satellites [Array<DemoApiScalarGalaxy::Models::Satellite>]
|
|
121
|
+
#
|
|
122
|
+
# @param success_callback_url [String] URL which gets invoked upon a successful operation
|
|
123
|
+
#
|
|
124
|
+
# @param tags [Array<String>]
|
|
125
|
+
|
|
126
|
+
# @see DemoApiScalarGalaxy::Models::Planet#type
|
|
127
|
+
module Type
|
|
128
|
+
extend DemoApiScalarGalaxy::Internal::Type::Enum
|
|
129
|
+
|
|
130
|
+
PLANET = :planet
|
|
131
|
+
TERRESTRIAL = :terrestrial
|
|
132
|
+
GAS_GIANT = :gas_giant
|
|
133
|
+
ICE_GIANT = :ice_giant
|
|
134
|
+
DWARF = :dwarf
|
|
135
|
+
SUPER_EARTH = :super_earth
|
|
136
|
+
|
|
137
|
+
# @!method self.values
|
|
138
|
+
# @return [Array<Symbol>]
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
class Atmosphere < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
142
|
+
# @!attribute compound
|
|
143
|
+
#
|
|
144
|
+
# @return [String, nil]
|
|
145
|
+
optional :compound, String
|
|
146
|
+
|
|
147
|
+
# @!attribute percentage
|
|
148
|
+
#
|
|
149
|
+
# @return [Float, nil]
|
|
150
|
+
optional :percentage, Float
|
|
151
|
+
|
|
152
|
+
# @!method initialize(compound: nil, percentage: nil)
|
|
153
|
+
# @param compound [String]
|
|
154
|
+
# @param percentage [Float]
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# @see DemoApiScalarGalaxy::Models::Planet#physical_properties
|
|
158
|
+
class PhysicalProperties < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
159
|
+
# @!attribute gravity
|
|
160
|
+
# Surface gravity in Earth g
|
|
161
|
+
#
|
|
162
|
+
# @return [Float, nil]
|
|
163
|
+
optional :gravity, Float
|
|
164
|
+
|
|
165
|
+
# @!attribute mass
|
|
166
|
+
# Mass in Earth masses (must be greater than 0)
|
|
167
|
+
#
|
|
168
|
+
# @return [Float, nil]
|
|
169
|
+
optional :mass, Float
|
|
170
|
+
|
|
171
|
+
# @!attribute radius
|
|
172
|
+
# Radius in Earth radii (must be greater than 0)
|
|
173
|
+
#
|
|
174
|
+
# @return [Float, nil]
|
|
175
|
+
optional :radius, Float
|
|
176
|
+
|
|
177
|
+
# @!attribute temperature
|
|
178
|
+
#
|
|
179
|
+
# @return [DemoApiScalarGalaxy::Models::Planet::PhysicalProperties::Temperature, nil]
|
|
180
|
+
optional :temperature, -> { DemoApiScalarGalaxy::Planet::PhysicalProperties::Temperature }
|
|
181
|
+
|
|
182
|
+
# @!method initialize(gravity: nil, mass: nil, radius: nil, temperature: nil)
|
|
183
|
+
# @param gravity [Float] Surface gravity in Earth g
|
|
184
|
+
#
|
|
185
|
+
# @param mass [Float] Mass in Earth masses (must be greater than 0)
|
|
186
|
+
#
|
|
187
|
+
# @param radius [Float] Radius in Earth radii (must be greater than 0)
|
|
188
|
+
#
|
|
189
|
+
# @param temperature [DemoApiScalarGalaxy::Models::Planet::PhysicalProperties::Temperature]
|
|
190
|
+
|
|
191
|
+
# @see DemoApiScalarGalaxy::Models::Planet::PhysicalProperties#temperature
|
|
192
|
+
class Temperature < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
193
|
+
# @!attribute average
|
|
194
|
+
# Average temperature in Kelvin
|
|
195
|
+
#
|
|
196
|
+
# @return [Float, nil]
|
|
197
|
+
optional :average, Float
|
|
198
|
+
|
|
199
|
+
# @!attribute max
|
|
200
|
+
# Maximum temperature in Kelvin
|
|
201
|
+
#
|
|
202
|
+
# @return [Float, nil]
|
|
203
|
+
optional :max, Float
|
|
204
|
+
|
|
205
|
+
# @!attribute min
|
|
206
|
+
# Minimum temperature in Kelvin
|
|
207
|
+
#
|
|
208
|
+
# @return [Float, nil]
|
|
209
|
+
optional :min, Float
|
|
210
|
+
|
|
211
|
+
# @!method initialize(average: nil, max: nil, min: nil)
|
|
212
|
+
# @param average [Float] Average temperature in Kelvin
|
|
213
|
+
#
|
|
214
|
+
# @param max [Float] Maximum temperature in Kelvin
|
|
215
|
+
#
|
|
216
|
+
# @param min [Float] Minimum temperature in Kelvin
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Planets#create
|
|
6
|
+
class PlanetCreateParams < DemoApiScalarGalaxy::Models::Planet
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Planets#delete
|
|
6
|
+
class PlanetDeleteParams < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute planet_id
|
|
11
|
+
#
|
|
12
|
+
# @return [Integer]
|
|
13
|
+
required :planet_id, Integer
|
|
14
|
+
|
|
15
|
+
# @!method initialize(planet_id:, request_options: {})
|
|
16
|
+
# @param planet_id [Integer]
|
|
17
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Planets#list
|
|
6
|
+
class PlanetListParams < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute limit
|
|
11
|
+
# The number of items to return
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer, nil]
|
|
14
|
+
optional :limit, Integer
|
|
15
|
+
|
|
16
|
+
# @!attribute offset
|
|
17
|
+
# The number of items to skip before starting to collect the result set
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :offset, Integer
|
|
21
|
+
|
|
22
|
+
# @!method initialize(limit: nil, offset: nil, request_options: {})
|
|
23
|
+
# @param limit [Integer] The number of items to return
|
|
24
|
+
#
|
|
25
|
+
# @param offset [Integer] The number of items to skip before starting to collect the result set
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Planets#list
|
|
6
|
+
class PlanetListResponse < DemoApiScalarGalaxy::Models::PaginatedResource
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<DemoApiScalarGalaxy::Models::Planet>, nil]
|
|
10
|
+
optional :data, -> { DemoApiScalarGalaxy::Internal::Type::ArrayOf[DemoApiScalarGalaxy::Planet] }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(data: nil)
|
|
13
|
+
# @param data [Array<DemoApiScalarGalaxy::Models::Planet>]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Planets#retrieve
|
|
6
|
+
class PlanetRetrieveParams < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute planet_id
|
|
11
|
+
#
|
|
12
|
+
# @return [Integer]
|
|
13
|
+
required :planet_id, Integer
|
|
14
|
+
|
|
15
|
+
# @!method initialize(planet_id:, request_options: {})
|
|
16
|
+
# @param planet_id [Integer]
|
|
17
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Planets#update
|
|
6
|
+
class PlanetUpdateParams < DemoApiScalarGalaxy::Models::Planet
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute planet_id
|
|
11
|
+
#
|
|
12
|
+
# @return [Integer]
|
|
13
|
+
required :planet_id, Integer
|
|
14
|
+
|
|
15
|
+
# @!method initialize(planet_id:, request_options: {})
|
|
16
|
+
# @param planet_id [Integer]
|
|
17
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Planets#upload_image
|
|
6
|
+
class PlanetUploadImageParams < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
extend DemoApiScalarGalaxy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include DemoApiScalarGalaxy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute planet_id
|
|
11
|
+
#
|
|
12
|
+
# @return [Integer]
|
|
13
|
+
required :planet_id, Integer
|
|
14
|
+
|
|
15
|
+
# @!attribute image
|
|
16
|
+
# The image file to upload
|
|
17
|
+
#
|
|
18
|
+
# @return [Pathname, StringIO, IO, String, DemoApiScalarGalaxy::FilePart, nil]
|
|
19
|
+
optional :image, DemoApiScalarGalaxy::Internal::Type::FileInput
|
|
20
|
+
|
|
21
|
+
# @!method initialize(planet_id:, image: nil, request_options: {})
|
|
22
|
+
# @param planet_id [Integer]
|
|
23
|
+
#
|
|
24
|
+
# @param image [Pathname, StringIO, IO, String, DemoApiScalarGalaxy::FilePart] The image file to upload
|
|
25
|
+
#
|
|
26
|
+
# @param request_options [DemoApiScalarGalaxy::RequestOptions, Hash{Symbol=>Object}]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoApiScalarGalaxy
|
|
4
|
+
module Models
|
|
5
|
+
# @see DemoApiScalarGalaxy::Resources::Planets#upload_image
|
|
6
|
+
class PlanetUploadImageResponse < DemoApiScalarGalaxy::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute file_size
|
|
8
|
+
# Size of the uploaded image in bytes
|
|
9
|
+
#
|
|
10
|
+
# @return [Integer, nil]
|
|
11
|
+
optional :file_size, Integer, api_name: :fileSize
|
|
12
|
+
|
|
13
|
+
# @!attribute image_url
|
|
14
|
+
# The URL where the uploaded image can be accessed
|
|
15
|
+
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
optional :image_url, String, api_name: :imageUrl
|
|
18
|
+
|
|
19
|
+
# @!attribute message
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :message, String
|
|
23
|
+
|
|
24
|
+
# @!attribute mime_type
|
|
25
|
+
# The content type of the uploaded image
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :mime_type, String, api_name: :mimeType
|
|
29
|
+
|
|
30
|
+
# @!attribute uploaded_at
|
|
31
|
+
# Timestamp when the image was uploaded
|
|
32
|
+
#
|
|
33
|
+
# @return [Time, nil]
|
|
34
|
+
optional :uploaded_at, Time, api_name: :uploadedAt
|
|
35
|
+
|
|
36
|
+
# @!method initialize(file_size: nil, image_url: nil, message: nil, mime_type: nil, uploaded_at: nil)
|
|
37
|
+
# @param file_size [Integer] Size of the uploaded image in bytes
|
|
38
|
+
#
|
|
39
|
+
# @param image_url [String] The URL where the uploaded image can be accessed
|
|
40
|
+
#
|
|
41
|
+
# @param message [String]
|
|
42
|
+
#
|
|
43
|
+
# @param mime_type [String] The content type of the uploaded image
|
|
44
|
+
#
|
|
45
|
+
# @param uploaded_at [Time] Timestamp when the image was uploaded
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|