galaxy-ruby 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.
Files changed (145) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +8 -0
  3. data/LICENSE +201 -0
  4. data/README.md +169 -0
  5. data/SECURITY.md +19 -0
  6. data/SKILL.md +83 -0
  7. data/api.md +188 -0
  8. data/lib/galaxy-ruby/client.rb +254 -0
  9. data/lib/galaxy-ruby/errors.rb +227 -0
  10. data/lib/galaxy-ruby/file_part.rb +58 -0
  11. data/lib/galaxy-ruby/internal/transport/base_client.rb +576 -0
  12. data/lib/galaxy-ruby/internal/transport/pooled_net_requester.rb +224 -0
  13. data/lib/galaxy-ruby/internal/type/array_of.rb +164 -0
  14. data/lib/galaxy-ruby/internal/type/base_model.rb +529 -0
  15. data/lib/galaxy-ruby/internal/type/base_page.rb +55 -0
  16. data/lib/galaxy-ruby/internal/type/boolean.rb +77 -0
  17. data/lib/galaxy-ruby/internal/type/converter.rb +333 -0
  18. data/lib/galaxy-ruby/internal/type/enum.rb +130 -0
  19. data/lib/galaxy-ruby/internal/type/file_input.rb +111 -0
  20. data/lib/galaxy-ruby/internal/type/hash_of.rb +184 -0
  21. data/lib/galaxy-ruby/internal/type/request_parameters.rb +42 -0
  22. data/lib/galaxy-ruby/internal/type/union.rb +234 -0
  23. data/lib/galaxy-ruby/internal/type/unknown.rb +81 -0
  24. data/lib/galaxy-ruby/internal/util.rb +960 -0
  25. data/lib/galaxy-ruby/internal.rb +15 -0
  26. data/lib/galaxy-ruby/models/authentication_create_token_params.rb +14 -0
  27. data/lib/galaxy-ruby/models/authentication_create_token_response.rb +16 -0
  28. data/lib/galaxy-ruby/models/authentication_create_user_params.rb +32 -0
  29. data/lib/galaxy-ruby/models/authentication_list_me_params.rb +14 -0
  30. data/lib/galaxy-ruby/models/celestial_body.rb +81 -0
  31. data/lib/galaxy-ruby/models/celestial_body_create_params.rb +20 -0
  32. data/lib/galaxy-ruby/models/credentials.rb +25 -0
  33. data/lib/galaxy-ruby/models/new_planet_webhook_event.rb +216 -0
  34. data/lib/galaxy-ruby/models/planet.rb +218 -0
  35. data/lib/galaxy-ruby/models/planet_create_params.rb +14 -0
  36. data/lib/galaxy-ruby/models/planet_delete_params.rb +20 -0
  37. data/lib/galaxy-ruby/models/planet_delte_image_params.rb +29 -0
  38. data/lib/galaxy-ruby/models/planet_delte_image_response.rb +48 -0
  39. data/lib/galaxy-ruby/models/planet_list_all_data_params.rb +30 -0
  40. data/lib/galaxy-ruby/models/planet_list_all_data_response.rb +51 -0
  41. data/lib/galaxy-ruby/models/planet_retrieve_params.rb +20 -0
  42. data/lib/galaxy-ruby/models/planet_update_params.rb +20 -0
  43. data/lib/galaxy-ruby/models/unwrap_webhook_event.rb +14 -0
  44. data/lib/galaxy-ruby/models/user.rb +26 -0
  45. data/lib/galaxy-ruby/models/webhook_unwrap_params.rb +14 -0
  46. data/lib/galaxy-ruby/models.rb +78 -0
  47. data/lib/galaxy-ruby/request_options.rb +77 -0
  48. data/lib/galaxy-ruby/resources/authentication.rb +80 -0
  49. data/lib/galaxy-ruby/resources/celestial_bodies.rb +37 -0
  50. data/lib/galaxy-ruby/resources/planets.rb +215 -0
  51. data/lib/galaxy-ruby/resources/webhooks.rb +34 -0
  52. data/lib/galaxy-ruby/version.rb +5 -0
  53. data/lib/galaxy-ruby.rb +78 -0
  54. data/rbi/galaxy-ruby/client.rbi +128 -0
  55. data/rbi/galaxy-ruby/errors.rbi +205 -0
  56. data/rbi/galaxy-ruby/file_part.rbi +37 -0
  57. data/rbi/galaxy-ruby/internal/transport/base_client.rbi +305 -0
  58. data/rbi/galaxy-ruby/internal/transport/pooled_net_requester.rbi +84 -0
  59. data/rbi/galaxy-ruby/internal/type/array_of.rbi +104 -0
  60. data/rbi/galaxy-ruby/internal/type/base_model.rbi +314 -0
  61. data/rbi/galaxy-ruby/internal/type/base_page.rbi +43 -0
  62. data/rbi/galaxy-ruby/internal/type/boolean.rbi +58 -0
  63. data/rbi/galaxy-ruby/internal/type/converter.rbi +222 -0
  64. data/rbi/galaxy-ruby/internal/type/enum.rbi +82 -0
  65. data/rbi/galaxy-ruby/internal/type/file_input.rbi +59 -0
  66. data/rbi/galaxy-ruby/internal/type/hash_of.rbi +104 -0
  67. data/rbi/galaxy-ruby/internal/type/request_parameters.rbi +31 -0
  68. data/rbi/galaxy-ruby/internal/type/union.rbi +128 -0
  69. data/rbi/galaxy-ruby/internal/type/unknown.rbi +58 -0
  70. data/rbi/galaxy-ruby/internal/util.rbi +515 -0
  71. data/rbi/galaxy-ruby/internal.rbi +18 -0
  72. data/rbi/galaxy-ruby/models/authentication_create_token_params.rbi +32 -0
  73. data/rbi/galaxy-ruby/models/authentication_create_token_response.rbi +29 -0
  74. data/rbi/galaxy-ruby/models/authentication_create_user_params.rbi +54 -0
  75. data/rbi/galaxy-ruby/models/authentication_list_me_params.rbi +32 -0
  76. data/rbi/galaxy-ruby/models/celestial_body.rbi +140 -0
  77. data/rbi/galaxy-ruby/models/celestial_body_create_params.rbi +53 -0
  78. data/rbi/galaxy-ruby/models/credentials.rbi +27 -0
  79. data/rbi/galaxy-ruby/models/new_planet_webhook_event.rbi +396 -0
  80. data/rbi/galaxy-ruby/models/planet.rbi +350 -0
  81. data/rbi/galaxy-ruby/models/planet_create_params.rbi +32 -0
  82. data/rbi/galaxy-ruby/models/planet_delete_params.rbi +38 -0
  83. data/rbi/galaxy-ruby/models/planet_delte_image_params.rbi +55 -0
  84. data/rbi/galaxy-ruby/models/planet_delte_image_response.rbi +85 -0
  85. data/rbi/galaxy-ruby/models/planet_list_all_data_params.rbi +60 -0
  86. data/rbi/galaxy-ruby/models/planet_list_all_data_response.rbi +110 -0
  87. data/rbi/galaxy-ruby/models/planet_retrieve_params.rbi +38 -0
  88. data/rbi/galaxy-ruby/models/planet_update_params.rbi +38 -0
  89. data/rbi/galaxy-ruby/models/unwrap_webhook_event.rbi +17 -0
  90. data/rbi/galaxy-ruby/models/user.rbi +33 -0
  91. data/rbi/galaxy-ruby/models/webhook_unwrap_params.rbi +32 -0
  92. data/rbi/galaxy-ruby/models.rbi +39 -0
  93. data/rbi/galaxy-ruby/request_options.rbi +59 -0
  94. data/rbi/galaxy-ruby/resources/authentication.rbi +47 -0
  95. data/rbi/galaxy-ruby/resources/celestial_bodies.rbi +28 -0
  96. data/rbi/galaxy-ruby/resources/planets.rbi +176 -0
  97. data/rbi/galaxy-ruby/resources/webhooks.rbi +29 -0
  98. data/rbi/galaxy-ruby/version.rbi +5 -0
  99. data/sig/galaxy-ruby/client.rbs +62 -0
  100. data/sig/galaxy-ruby/errors.rbs +117 -0
  101. data/sig/galaxy-ruby/file_part.rbs +21 -0
  102. data/sig/galaxy-ruby/internal/transport/base_client.rbs +133 -0
  103. data/sig/galaxy-ruby/internal/transport/pooled_net_requester.rbs +48 -0
  104. data/sig/galaxy-ruby/internal/type/array_of.rbs +48 -0
  105. data/sig/galaxy-ruby/internal/type/base_model.rbs +102 -0
  106. data/sig/galaxy-ruby/internal/type/base_page.rbs +24 -0
  107. data/sig/galaxy-ruby/internal/type/boolean.rbs +26 -0
  108. data/sig/galaxy-ruby/internal/type/converter.rbs +79 -0
  109. data/sig/galaxy-ruby/internal/type/enum.rbs +32 -0
  110. data/sig/galaxy-ruby/internal/type/file_input.rbs +25 -0
  111. data/sig/galaxy-ruby/internal/type/hash_of.rbs +48 -0
  112. data/sig/galaxy-ruby/internal/type/request_parameters.rbs +17 -0
  113. data/sig/galaxy-ruby/internal/type/union.rbs +52 -0
  114. data/sig/galaxy-ruby/internal/type/unknown.rbs +26 -0
  115. data/sig/galaxy-ruby/internal/util.rbs +199 -0
  116. data/sig/galaxy-ruby/internal.rbs +9 -0
  117. data/sig/galaxy-ruby/models/authentication_create_token_params.rbs +15 -0
  118. data/sig/galaxy-ruby/models/authentication_create_token_response.rbs +15 -0
  119. data/sig/galaxy-ruby/models/authentication_create_user_params.rbs +34 -0
  120. data/sig/galaxy-ruby/models/authentication_list_me_params.rbs +15 -0
  121. data/sig/galaxy-ruby/models/celestial_body.rbs +76 -0
  122. data/sig/galaxy-ruby/models/celestial_body_create_params.rbs +24 -0
  123. data/sig/galaxy-ruby/models/credentials.rbs +15 -0
  124. data/sig/galaxy-ruby/models/new_planet_webhook_event.rbs +211 -0
  125. data/sig/galaxy-ruby/models/planet.rbs +211 -0
  126. data/sig/galaxy-ruby/models/planet_create_params.rbs +15 -0
  127. data/sig/galaxy-ruby/models/planet_delete_params.rbs +23 -0
  128. data/sig/galaxy-ruby/models/planet_delte_image_params.rbs +32 -0
  129. data/sig/galaxy-ruby/models/planet_delte_image_response.rbs +50 -0
  130. data/sig/galaxy-ruby/models/planet_list_all_data_params.rbs +32 -0
  131. data/sig/galaxy-ruby/models/planet_list_all_data_response.rbs +64 -0
  132. data/sig/galaxy-ruby/models/planet_retrieve_params.rbs +23 -0
  133. data/sig/galaxy-ruby/models/planet_update_params.rbs +25 -0
  134. data/sig/galaxy-ruby/models/unwrap_webhook_event.rbs +11 -0
  135. data/sig/galaxy-ruby/models/user.rbs +19 -0
  136. data/sig/galaxy-ruby/models/webhook_unwrap_params.rbs +15 -0
  137. data/sig/galaxy-ruby/models.rbs +35 -0
  138. data/sig/galaxy-ruby/request_options.rbs +34 -0
  139. data/sig/galaxy-ruby/resources/authentication.rbs +24 -0
  140. data/sig/galaxy-ruby/resources/celestial_bodies.rbs +12 -0
  141. data/sig/galaxy-ruby/resources/planets.rbs +68 -0
  142. data/sig/galaxy-ruby/resources/webhooks.rbs +13 -0
  143. data/sig/galaxy-ruby/version.rbs +3 -0
  144. data/sig/manifest.yaml +6 -0
  145. metadata +245 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 52af9e52e9028b047358e14b0138327e49f180087900f75312de775f43e1de33
4
+ data.tar.gz: abb6f6c86dc295c1617bf52f20b1e36e3cb5483520dfccdbf46478a88d73a6b3
5
+ SHA512:
6
+ metadata.gz: d947022358926a2509db9ee3f5da0c70e78e0924b36da15b012a1da367a754c08bbcc33daaa9fa236e82811d0d60452d2934900a316c9c0c86fda48e28378193
7
+ data.tar.gz: 3e36c402732652d54582cc6f6e03063e1e197b5084bbd0649ae5886b981fcf948a8bd3f616b1d18b012185c942acbca6d3d92d510a3b04c3db9be5adb1b63601
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0](https://github.com/scalar/galaxy-ruby/compare/v0.1.0...v0.2.0) (2026-08-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** initial SDK generation ([f5c29ae](https://github.com/scalar/galaxy-ruby/commit/f5c29ae59487047b27a0bfa78927f34e2f11f3db))
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Scalar Galaxy
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,169 @@
1
+ # Scalar Galaxy
2
+
3
+ This library provides convenient access to the Scalar Galaxy REST API from Ruby.
4
+
5
+ The full API of this library can be found in [api.md](./api.md).
6
+
7
+ <br />
8
+
9
+ ## Contents
10
+
11
+ - [Installation](#installation)
12
+ - [Usage](#usage)
13
+ - [API Reference](./api.md)
14
+ - [Authentication](#authentication)
15
+ - [Errors](#errors)
16
+ - [Client Options](#client-options)
17
+ - [Request Options](#request-options)
18
+ - [Retries and Timeouts](#retries-and-timeouts)
19
+ - [Helpers](#helpers)
20
+ - [Requirements](#requirements)
21
+
22
+ <br />
23
+
24
+ ## Installation
25
+
26
+ Add the gem to your application's `Gemfile`:
27
+
28
+ ```ruby
29
+ gem "galaxy-ruby", "~> 0.2.0" # x-release-please-version
30
+ ```
31
+
32
+ Or install it directly:
33
+
34
+ ```sh
35
+ gem install galaxy-ruby
36
+ ```
37
+
38
+ <br />
39
+
40
+ ## Usage
41
+
42
+ ```ruby
43
+ require "galaxy-ruby"
44
+
45
+ client = ScalarGalaxy::Client.new(
46
+ bearer_auth: ENV["BEARER_AUTH"], # defaults to the BEARER_AUTH env var
47
+ )
48
+
49
+ response = client.planets.list_all_data({ limit: 10, offset: 0 })
50
+
51
+ puts response.inspect
52
+ ```
53
+
54
+ The examples in the following sections assume a `client` configured as shown above.
55
+
56
+ See the [API reference](./api.md) for every available operation.
57
+
58
+ <br />
59
+
60
+ ## Authentication
61
+
62
+ Pass credentials to the generated client constructor. Environment variables are read automatically when supported by the target runtime.
63
+
64
+ | Option | Type | Default | Description |
65
+ | --- | --- | --- | --- |
66
+ | `bearer_auth` | `String \| nil` | - | JWT Bearer token authentication Defaults to BEARER_AUTH. |
67
+ | `basic_auth_username` | `String \| nil` | - | Basic HTTP authentication Defaults to BASIC_AUTH_USERNAME. |
68
+ | `basic_auth_password` | `String \| nil` | - | Basic HTTP authentication Defaults to BASIC_AUTH_PASSWORD. |
69
+ | `api_key_header` | `String \| nil` | - | API key request header Defaults to API_KEY_HEADER. |
70
+ | `api_key_query` | `String \| nil` | - | API key query parameter Defaults to API_KEY_QUERY. |
71
+ | `api_key_cookie` | `String \| nil` | - | API key browser cookie Defaults to API_KEY_COOKIE. |
72
+ | `o_auth2` | `String \| nil` | - | OAuth 2.0 authentication Defaults to SCALAR_O_AUTH2. |
73
+ | `open_id_connect` | `String \| nil` | - | OpenID Connect Authentication Defaults to SCALAR_OPEN_ID_CONNECT. |
74
+
75
+ Declared schemes:
76
+
77
+ - `bearerAuth` bearer token
78
+ - `basicAuth` basic authentication
79
+ - `apiKeyHeader` API key in header `X-API-Key`
80
+ - `apiKeyQuery` API key in query `api_key`
81
+ - `apiKeyCookie` API key in cookie `api_key`
82
+ - `oAuth2` OAuth2/OpenID Connect
83
+ - `openIdConnect` OAuth2/OpenID Connect
84
+
85
+ <br />
86
+
87
+ ## Errors
88
+
89
+ Non-success responses throw generated API errors. Error objects expose status, headers, response body, and request metadata where the target runtime supports it.
90
+
91
+ ```ruby
92
+ begin
93
+ response = client.planets.list_all_data({ limit: 10, offset: 0 })
94
+
95
+ puts response.inspect
96
+ rescue ScalarGalaxy::Errors::APIError => error
97
+ puts "#{error.status}: #{error.message}"
98
+ raise
99
+ end
100
+ ```
101
+
102
+ Documented error statuses: `400`, `401`, `403`, `404`, `409`, `422`, `429`.
103
+
104
+ <br />
105
+
106
+ ## Client Options
107
+
108
+ Configure the generated client by setting any of these options when you create it.
109
+
110
+ ```ruby
111
+ require "galaxy-ruby"
112
+
113
+ client = ScalarGalaxy::Client.new(
114
+ timeout: 60.0,
115
+ max_retries: 2,
116
+ )
117
+ ```
118
+
119
+ | Option | Type | Default | Description |
120
+ | --- | --- | --- | --- |
121
+ | `bearer_auth` | `String \| nil` | `ENV["BEARER_AUTH"]` | JWT Bearer token authentication |
122
+ | `basic_auth_username` | `String \| nil` | `ENV["BASIC_AUTH_USERNAME"]` | Basic HTTP authentication |
123
+ | `basic_auth_password` | `String \| nil` | `ENV["BASIC_AUTH_PASSWORD"]` | Basic HTTP authentication |
124
+ | `api_key_header` | `String \| nil` | `ENV["API_KEY_HEADER"]` | API key request header |
125
+ | `api_key_query` | `String \| nil` | `ENV["API_KEY_QUERY"]` | API key query parameter |
126
+ | `api_key_cookie` | `String \| nil` | `ENV["API_KEY_COOKIE"]` | API key browser cookie |
127
+ | `o_auth2` | `String \| nil` | `ENV["SCALAR_O_AUTH2"]` | OAuth 2.0 authentication |
128
+ | `open_id_connect` | `String \| nil` | `ENV["SCALAR_OPEN_ID_CONNECT"]` | OpenID Connect Authentication |
129
+ | `webhook_secret` | `String \| nil` | `ENV["SCALAR_WEBHOOK_SECRET"]` | Secret used to verify incoming webhook signatures. |
130
+ | `environment` | `:production \| :void \| nil` | - | Environment to target; each one maps to a different base URL. |
131
+ | `base_url` | `String \| nil` | `ENV["SCALAR_BASE_URL"]` | Override the default API base URL. |
132
+ | `max_retries` | `Integer` | `2` | Max number of retries to attempt after a failed retryable request. |
133
+ | `timeout` | `Float` | `60.0` | Seconds to wait for a response before timing out. |
134
+ | `initial_retry_delay` | `Float` | `0.5` | Seconds to wait before the first retry; later retries back off exponentially. |
135
+ | `max_retry_delay` | `Float` | `8.0` | Upper bound, in seconds, on the delay between retries. |
136
+
137
+ <br />
138
+
139
+ ## Request Options
140
+
141
+ | Option | Type | Default | Description |
142
+ | --- | --- | --- | --- |
143
+ | `idempotency_key` | `String` | - | Idempotency key for one request, sent when the SDK configures an idempotency header. |
144
+ | `extra_query` | `Hash` | - | Additional query parameters for one request. |
145
+ | `extra_headers` | `Hash` | - | Additional headers for one request. |
146
+ | `extra_body` | `Hash` | - | Additional body fields for one request. |
147
+ | `max_retries` | `Integer` | - | Override retry count for one request. |
148
+ | `timeout` | `Float` | - | Override timeout for one request. |
149
+
150
+ <br />
151
+
152
+ ## Retries and Timeouts
153
+
154
+ Generated clients support request timeouts and retry temporary failures such as network errors, 408, 409, 429, and 5xx responses. Retry delays honor `Retry-After` headers when present. Tune the retry and timeout client options shown above, or override them per request.
155
+
156
+ <br />
157
+
158
+ ## Helpers
159
+
160
+ - Every model is a `BaseModel`: pass a plain hash or a model instance, and read decoded values back as attributes.
161
+ - The gem ships `rbi/` and `sig/` trees, so Sorbet and Steep type-check calls into the SDK.
162
+
163
+ <br />
164
+
165
+ ## Requirements
166
+
167
+ - Ruby >= 3.2
168
+
169
+ Powered by Scalar.
data/SECURITY.md ADDED
@@ -0,0 +1,19 @@
1
+ # Security Policy
2
+
3
+ ## Reporting Security Issues
4
+
5
+ This is a generated Ruby SDK for Scalar Galaxy, produced by the Scalar SDK Generator (https://scalar.com).
6
+
7
+ If the issue is in the generated SDK itself — its runtime, authentication handling, path construction, or serialization — report it to the Scalar team at support@scalar.com. We will acknowledge the report, triage it for severity and impact, and communicate a timeline for a fix or an explanation if we decline it.
8
+
9
+ ## Responsible Disclosure
10
+
11
+ Please allow us reasonable time to investigate and address the issue before disclosing it publicly. Do not include credentials, tokens, or private API payloads in a public issue.
12
+
13
+ ## Reporting Non-SDK Security Issues
14
+
15
+ If the issue is in the Scalar Galaxy API or service rather than in this SDK, report it through the security process Scalar Galaxy has published.
16
+
17
+ ---
18
+
19
+ Generated code validates emitted paths and escapes spec-derived strings, but OpenAPI documents should still be treated as untrusted input before generation.
data/SKILL.md ADDED
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: scalar-galaxy-ruby-sdk
3
+ description: "Ruby SDK for Scalar Galaxy API. Use when writing Ruby code that calls Scalar Galaxy API with the galaxy-ruby package: installing it, constructing and authenticating the client, and calling API operations."
4
+ ---
5
+
6
+ # Scalar Galaxy Ruby SDK
7
+
8
+ Generated Ruby client for Scalar Galaxy API, published as `galaxy-ruby`. Use the generated client instead of hand-writing HTTP requests.
9
+
10
+ ## Install
11
+
12
+ Add the gem to your application's `Gemfile`:
13
+
14
+ ```ruby
15
+ gem "galaxy-ruby", "~> 0.2.0" # x-release-please-version
16
+ ```
17
+
18
+ Or install it directly:
19
+
20
+ ```sh
21
+ gem install galaxy-ruby
22
+ ```
23
+
24
+ ## Client setup and authentication
25
+
26
+ ```ruby
27
+ require "galaxy-ruby"
28
+
29
+ client = ScalarGalaxy::Client.new(
30
+ bearer_auth: ENV["BEARER_AUTH"], # defaults to the BEARER_AUTH env var
31
+ )
32
+ ```
33
+
34
+ Provide credentials using the options below. Environment variables are read automatically when the target runtime supports them:
35
+
36
+ - `bearer_auth` (env: `BEARER_AUTH`) — JWT Bearer token authentication
37
+ - `basic_auth_username` (env: `BASIC_AUTH_USERNAME`) — Basic HTTP authentication
38
+ - `basic_auth_password` (env: `BASIC_AUTH_PASSWORD`) — Basic HTTP authentication
39
+ - `api_key_header` (env: `API_KEY_HEADER`) — API key request header
40
+ - `api_key_query` (env: `API_KEY_QUERY`) — API key query parameter
41
+ - `api_key_cookie` (env: `API_KEY_COOKIE`) — API key browser cookie
42
+ - `o_auth2` (env: `SCALAR_O_AUTH2`) — OAuth 2.0 authentication
43
+ - `open_id_connect` (env: `SCALAR_OPEN_ID_CONNECT`) — OpenID Connect Authentication
44
+
45
+ ## Calling operations
46
+
47
+ ```ruby
48
+ require "galaxy-ruby"
49
+
50
+ client = ScalarGalaxy::Client.new(
51
+ bearer_auth: ENV["BEARER_AUTH"], # defaults to the BEARER_AUTH env var
52
+ )
53
+
54
+ response = client.planets.list_all_data({ limit: 10, offset: 0 })
55
+
56
+ puts response.inspect
57
+ ```
58
+
59
+ Method names, parameter shapes, and response types are generated from the API description — do not guess them. Look up the exact call signature in [api.md](./api.md) before writing a call.
60
+
61
+ ## Error handling
62
+
63
+ Non-success responses throw generated API errors. Error objects expose status, headers, response body, and request metadata where the target runtime supports it.
64
+
65
+ ```ruby
66
+ begin
67
+ response = client.planets.list_all_data({ limit: 10, offset: 0 })
68
+
69
+ puts response.inspect
70
+ rescue ScalarGalaxy::Errors::APIError => error
71
+ puts "#{error.status}: #{error.message}"
72
+ raise
73
+ end
74
+ ```
75
+
76
+ ## Requirements
77
+
78
+ - Ruby >= 3.2
79
+
80
+ ## Reference files
81
+
82
+ - [README.md](./README.md) — full feature tour: client options, request options, retries and timeouts.
83
+ - [api.md](./api.md) — complete catalogue of every operation with request and response types.
data/api.md ADDED
@@ -0,0 +1,188 @@
1
+ # Scalar Galaxy Ruby API
2
+
3
+ Complete reference of every operation, grouped by resource. See [the README](./README.md) for usage and configuration.
4
+
5
+ ## Contents
6
+
7
+ - [`Planets`](#planets)
8
+ - [Get all planets](#get-all-planets)
9
+ - [Create a planet](#create-a-planet)
10
+ - [Get a planet](#get-a-planet)
11
+ - [Update a planet](#update-a-planet)
12
+ - [Delete a planet](#delete-a-planet)
13
+ - [Upload an image to a planet](#upload-an-image-to-a-planet)
14
+ - [`CelestialBodies`](#celestialbodies)
15
+ - [Create a celestial body](#create-a-celestial-body)
16
+ - [`Authentication`](#authentication)
17
+ - [Create a user](#create-a-user)
18
+ - [Get a token](#get-a-token)
19
+ - [Get authenticated user](#get-authenticated-user)
20
+
21
+ ## Setup
22
+
23
+ ```ruby
24
+ require "galaxy-ruby"
25
+
26
+ client = ScalarGalaxy::Client.new(
27
+ bearer_auth: ENV["BEARER_AUTH"], # defaults to the BEARER_AUTH env var
28
+ )
29
+ ```
30
+
31
+ ## `Planets`
32
+
33
+ Everything about planets
34
+
35
+ ### Get all planets
36
+
37
+ It's easy to say you know them all, but do you really? Retrieve all the planets and check whether you missed one.
38
+
39
+ | Direction | Type |
40
+ | --- | --- |
41
+ | Request | [`PlanetListAllDataParams`](././lib/galaxy-ruby/models/planet_list_all_data_params.rb) |
42
+ | Response | [`PlanetListAllDataResponse`](././lib/galaxy-ruby/models/planet_list_all_data_response.rb) |
43
+
44
+ ```ruby
45
+ response = client.planets.list_all_data({ limit: 10, offset: 0 })
46
+
47
+ puts response.inspect
48
+ ```
49
+
50
+ ### Create a planet
51
+
52
+ Time to play god and create a new planet. What do you think? Ah, don't think too much. What could go wrong anyway?
53
+
54
+ | Direction | Type |
55
+ | --- | --- |
56
+ | Request | [`PlanetCreateParams`](././lib/galaxy-ruby/models/planet_create_params.rb) |
57
+ | Response | [`Planet`](././lib/galaxy-ruby/models/planet.rb) |
58
+
59
+ ```ruby
60
+ response = client.planets.create({ id: 1, name: "Mars", atmosphere: [], creator: { }, description: "The red planet", discovered_at: "1610-01-07T00:00:00Z", failure_callback_url: "https://example.com/webhook", habitability_index: 0.68, image: "https://cdn.scalar.com/photos/mars.jpg", last_updated: "2024-01-15T14:30:00Z", physical_properties: { }, satellites: [], success_callback_url: "https://example.com/webhook", tags: [], type: "terrestrial" })
61
+
62
+ puts response.inspect
63
+ ```
64
+
65
+ ### Get a planet
66
+
67
+ You'll better learn a little bit more about the planets. It might come in handy once space travel is available for everyone.
68
+
69
+ | Direction | Type |
70
+ | --- | --- |
71
+ | Request | [`PlanetRetrieveParams`](././lib/galaxy-ruby/models/planet_retrieve_params.rb) |
72
+ | Response | [`Planet`](././lib/galaxy-ruby/models/planet.rb) |
73
+
74
+ ```ruby
75
+ response = client.planets.retrieve(1)
76
+
77
+ puts response.inspect
78
+ ```
79
+
80
+ ### Update a planet
81
+
82
+ Sometimes you make mistakes, that's fine. No worries, you can update all planets.
83
+
84
+ | Direction | Type |
85
+ | --- | --- |
86
+ | Request | [`PlanetUpdateParams`](././lib/galaxy-ruby/models/planet_update_params.rb) |
87
+ | Response | [`Planet`](././lib/galaxy-ruby/models/planet.rb) |
88
+
89
+ ```ruby
90
+ response = client.planets.update(1, { id: 1, name: "Mars", atmosphere: [], creator: { }, description: "The red planet", discovered_at: "1610-01-07T00:00:00Z", failure_callback_url: "https://example.com/webhook", habitability_index: 0.68, image: "https://cdn.scalar.com/photos/mars.jpg", last_updated: "2024-01-15T14:30:00Z", physical_properties: { }, satellites: [], success_callback_url: "https://example.com/webhook", tags: [], type: "terrestrial" })
91
+
92
+ puts response.inspect
93
+ ```
94
+
95
+ ### Delete a planet
96
+
97
+ This endpoint was used to delete planets. Unfortunately, that caused a lot of trouble for planets with life. So, this endpoint is now deprecated and should not be used anymore.
98
+
99
+ | Direction | Type |
100
+ | --- | --- |
101
+ | Request | [`PlanetDeleteParams`](././lib/galaxy-ruby/models/planet_delete_params.rb) |
102
+
103
+ ```ruby
104
+ client.planets.delete(1)
105
+ ```
106
+
107
+ ### Upload an image to a planet
108
+
109
+ Got a crazy good photo of a planet? Share it with the world!
110
+
111
+ | Direction | Type |
112
+ | --- | --- |
113
+ | Request | [`PlanetDelteImageParams`](././lib/galaxy-ruby/models/planet_delte_image_params.rb) |
114
+ | Response | [`PlanetDelteImageResponse`](././lib/galaxy-ruby/models/planet_delte_image_response.rb) |
115
+
116
+ ```ruby
117
+ response = client.planets.delte_image(1, { image: "@mars.jpg" })
118
+
119
+ puts response.inspect
120
+ ```
121
+
122
+ ## `CelestialBodies`
123
+
124
+ Celestial bodies are the planets and satellites in the Scalar Galaxy.
125
+
126
+ ### Create a celestial body
127
+
128
+ Stars, moons, comets, the occasional rogue asteroid — if it glows or drifts through the void, you can add it here.
129
+
130
+ | Direction | Type |
131
+ | --- | --- |
132
+ | Request | [`CelestialBodyCreateParams`](././lib/galaxy-ruby/models/celestial_body_create_params.rb) |
133
+ | Response | [`CelestialBody`](././lib/galaxy-ruby/models/celestial_body.rb) |
134
+
135
+ ```ruby
136
+ response = client.celestial_bodies.create({ celestial_body: { "name" => "Mars" } })
137
+
138
+ puts response.inspect
139
+ ```
140
+
141
+ ## `Authentication`
142
+
143
+ Some endpoints are public, but some require authentication. We provide all the required endpoints to create an account and authorize yourself.
144
+
145
+ ### Create a user
146
+
147
+ Time to create a user account, eh?
148
+
149
+ | Direction | Type |
150
+ | --- | --- |
151
+ | Request | [`AuthenticationCreateUserParams`](././lib/galaxy-ruby/models/authentication_create_user_params.rb) |
152
+ | Response | [`User`](././lib/galaxy-ruby/models/user.rb) |
153
+
154
+ ```ruby
155
+ response = client.authentication.create_user({ email: "marc@scalar.com", password: "i-love-scalar", name: "Marc" })
156
+
157
+ puts response.inspect
158
+ ```
159
+
160
+ ### Get a token
161
+
162
+ Yeah, this is the boring security stuff. Just get your super secret token and move on.
163
+
164
+ | Direction | Type |
165
+ | --- | --- |
166
+ | Request | [`AuthenticationCreateTokenParams`](././lib/galaxy-ruby/models/authentication_create_token_params.rb) |
167
+ | Response | [`AuthenticationCreateTokenResponse`](././lib/galaxy-ruby/models/authentication_create_token_response.rb) |
168
+
169
+ ```ruby
170
+ response = client.authentication.create_token({ email: "marc@scalar.com", password: "i-love-scalar" })
171
+
172
+ puts response.inspect
173
+ ```
174
+
175
+ ### Get authenticated user
176
+
177
+ Find yourself they say. That's what you can do here.
178
+
179
+ | Direction | Type |
180
+ | --- | --- |
181
+ | Request | [`AuthenticationListMeParams`](././lib/galaxy-ruby/models/authentication_list_me_params.rb) |
182
+ | Response | [`User`](././lib/galaxy-ruby/models/user.rb) |
183
+
184
+ ```ruby
185
+ response = client.authentication.list_me
186
+
187
+ puts response.inspect
188
+ ```