openlayer 0.0.2 → 0.1.1
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/.env +0 -0
- data/.rspec +3 -0
- data/.rubocop.yml +13 -0
- data/LICENSE +21 -0
- data/README.md +19 -294
- data/Rakefile +12 -0
- data/lib/openlayer/client.rb +21 -71
- data/lib/openlayer/error.rb +5 -0
- data/lib/openlayer/inference_pipeline.rb +36 -0
- data/lib/openlayer/version.rb +1 -1
- data/lib/openlayer.rb +7 -96
- data/openlayer.gemspec +42 -0
- data/sig/openlayer.rbs +4 -0
- metadata +44 -227
- data/.ignore +0 -2
- data/CHANGELOG.md +0 -15
- data/SECURITY.md +0 -27
- data/lib/openlayer/errors.rb +0 -228
- data/lib/openlayer/file_part.rb +0 -58
- data/lib/openlayer/internal/transport/base_client.rb +0 -567
- data/lib/openlayer/internal/transport/pooled_net_requester.rb +0 -198
- data/lib/openlayer/internal/type/array_of.rb +0 -168
- data/lib/openlayer/internal/type/base_model.rb +0 -531
- data/lib/openlayer/internal/type/base_page.rb +0 -55
- data/lib/openlayer/internal/type/boolean.rb +0 -77
- data/lib/openlayer/internal/type/converter.rb +0 -327
- data/lib/openlayer/internal/type/enum.rb +0 -131
- data/lib/openlayer/internal/type/file_input.rb +0 -111
- data/lib/openlayer/internal/type/hash_of.rb +0 -188
- data/lib/openlayer/internal/type/request_parameters.rb +0 -42
- data/lib/openlayer/internal/type/union.rb +0 -237
- data/lib/openlayer/internal/type/unknown.rb +0 -81
- data/lib/openlayer/internal/util.rb +0 -915
- data/lib/openlayer/internal.rb +0 -20
- data/lib/openlayer/models/commit_retrieve_params.rb +0 -14
- data/lib/openlayer/models/commit_retrieve_response.rb +0 -275
- data/lib/openlayer/models/commits/test_result_list_params.rb +0 -91
- data/lib/openlayer/models/commits/test_result_list_response.rb +0 -566
- data/lib/openlayer/models/inference_pipeline_delete_params.rb +0 -14
- data/lib/openlayer/models/inference_pipeline_retrieve_params.rb +0 -33
- data/lib/openlayer/models/inference_pipeline_retrieve_response.rb +0 -605
- data/lib/openlayer/models/inference_pipeline_update_params.rb +0 -42
- data/lib/openlayer/models/inference_pipeline_update_response.rb +0 -605
- data/lib/openlayer/models/inference_pipelines/data_stream_params.rb +0 -463
- data/lib/openlayer/models/inference_pipelines/data_stream_response.rb +0 -28
- data/lib/openlayer/models/inference_pipelines/row_update_params.rb +0 -90
- data/lib/openlayer/models/inference_pipelines/row_update_response.rb +0 -28
- data/lib/openlayer/models/inference_pipelines/test_result_list_params.rb +0 -83
- data/lib/openlayer/models/inference_pipelines/test_result_list_response.rb +0 -568
- data/lib/openlayer/models/project_create_params.rb +0 -51
- data/lib/openlayer/models/project_create_response.rb +0 -262
- data/lib/openlayer/models/project_list_params.rb +0 -59
- data/lib/openlayer/models/project_list_response.rb +0 -274
- data/lib/openlayer/models/projects/commit_create_params.rb +0 -61
- data/lib/openlayer/models/projects/commit_create_response.rb +0 -277
- data/lib/openlayer/models/projects/commit_list_params.rb +0 -32
- data/lib/openlayer/models/projects/commit_list_response.rb +0 -288
- data/lib/openlayer/models/projects/inference_pipeline_create_params.rb +0 -229
- data/lib/openlayer/models/projects/inference_pipeline_create_response.rb +0 -612
- data/lib/openlayer/models/projects/inference_pipeline_list_params.rb +0 -40
- data/lib/openlayer/models/projects/inference_pipeline_list_response.rb +0 -623
- data/lib/openlayer/models/projects/test_create_params.rb +0 -367
- data/lib/openlayer/models/projects/test_create_response.rb +0 -438
- data/lib/openlayer/models/projects/test_list_params.rb +0 -91
- data/lib/openlayer/models/projects/test_list_response.rb +0 -452
- data/lib/openlayer/models/projects/test_update_params.rb +0 -262
- data/lib/openlayer/models/projects/test_update_response.rb +0 -24
- data/lib/openlayer/models/storage/presigned_url_create_params.rb +0 -24
- data/lib/openlayer/models/storage/presigned_url_create_response.rb +0 -35
- data/lib/openlayer/models.rb +0 -61
- data/lib/openlayer/request_options.rb +0 -77
- data/lib/openlayer/resources/commits/test_results.rb +0 -51
- data/lib/openlayer/resources/commits.rb +0 -38
- data/lib/openlayer/resources/inference_pipelines/data.rb +0 -46
- data/lib/openlayer/resources/inference_pipelines/rows.rb +0 -46
- data/lib/openlayer/resources/inference_pipelines/test_results.rb +0 -49
- data/lib/openlayer/resources/inference_pipelines.rb +0 -101
- data/lib/openlayer/resources/projects/commits.rb +0 -72
- data/lib/openlayer/resources/projects/inference_pipelines.rb +0 -74
- data/lib/openlayer/resources/projects/tests.rb +0 -135
- data/lib/openlayer/resources/projects.rb +0 -80
- data/lib/openlayer/resources/storage/presigned_url.rb +0 -38
- data/lib/openlayer/resources/storage.rb +0 -18
- data/manifest.yaml +0 -15
- data/rbi/openlayer/client.rbi +0 -58
- data/rbi/openlayer/errors.rbi +0 -205
- data/rbi/openlayer/file_part.rbi +0 -37
- data/rbi/openlayer/internal/transport/base_client.rbi +0 -293
- data/rbi/openlayer/internal/transport/pooled_net_requester.rbi +0 -79
- data/rbi/openlayer/internal/type/array_of.rbi +0 -104
- data/rbi/openlayer/internal/type/base_model.rbi +0 -304
- data/rbi/openlayer/internal/type/base_page.rbi +0 -42
- data/rbi/openlayer/internal/type/boolean.rbi +0 -58
- data/rbi/openlayer/internal/type/converter.rbi +0 -216
- data/rbi/openlayer/internal/type/enum.rbi +0 -82
- data/rbi/openlayer/internal/type/file_input.rbi +0 -59
- data/rbi/openlayer/internal/type/hash_of.rbi +0 -104
- data/rbi/openlayer/internal/type/request_parameters.rbi +0 -29
- data/rbi/openlayer/internal/type/union.rbi +0 -128
- data/rbi/openlayer/internal/type/unknown.rbi +0 -58
- data/rbi/openlayer/internal/util.rbi +0 -487
- data/rbi/openlayer/internal.rbi +0 -18
- data/rbi/openlayer/models/commit_retrieve_params.rbi +0 -27
- data/rbi/openlayer/models/commit_retrieve_response.rbi +0 -393
- data/rbi/openlayer/models/commits/test_result_list_params.rbi +0 -214
- data/rbi/openlayer/models/commits/test_result_list_response.rbi +0 -1256
- data/rbi/openlayer/models/inference_pipeline_delete_params.rbi +0 -30
- data/rbi/openlayer/models/inference_pipeline_retrieve_params.rbi +0 -101
- data/rbi/openlayer/models/inference_pipeline_retrieve_response.rbi +0 -1022
- data/rbi/openlayer/models/inference_pipeline_update_params.rbi +0 -67
- data/rbi/openlayer/models/inference_pipeline_update_response.rbi +0 -1018
- data/rbi/openlayer/models/inference_pipelines/data_stream_params.rbi +0 -750
- data/rbi/openlayer/models/inference_pipelines/data_stream_response.rbi +0 -73
- data/rbi/openlayer/models/inference_pipelines/row_update_params.rbi +0 -153
- data/rbi/openlayer/models/inference_pipelines/row_update_response.rbi +0 -73
- data/rbi/openlayer/models/inference_pipelines/test_result_list_params.rbi +0 -216
- data/rbi/openlayer/models/inference_pipelines/test_result_list_response.rbi +0 -1258
- data/rbi/openlayer/models/project_create_params.rbi +0 -99
- data/rbi/openlayer/models/project_create_response.rbi +0 -401
- data/rbi/openlayer/models/project_list_params.rbi +0 -121
- data/rbi/openlayer/models/project_list_response.rbi +0 -442
- data/rbi/openlayer/models/projects/commit_create_params.rbi +0 -125
- data/rbi/openlayer/models/projects/commit_create_response.rbi +0 -409
- data/rbi/openlayer/models/projects/commit_list_params.rbi +0 -62
- data/rbi/openlayer/models/projects/commit_list_response.rbi +0 -454
- data/rbi/openlayer/models/projects/inference_pipeline_create_params.rbi +0 -560
- data/rbi/openlayer/models/projects/inference_pipeline_create_response.rbi +0 -1027
- data/rbi/openlayer/models/projects/inference_pipeline_list_params.rbi +0 -73
- data/rbi/openlayer/models/projects/inference_pipeline_list_response.rbi +0 -1070
- data/rbi/openlayer/models/projects/test_create_params.rbi +0 -940
- data/rbi/openlayer/models/projects/test_create_response.rbi +0 -1026
- data/rbi/openlayer/models/projects/test_list_params.rbi +0 -165
- data/rbi/openlayer/models/projects/test_list_response.rbi +0 -1067
- data/rbi/openlayer/models/projects/test_update_params.rbi +0 -699
- data/rbi/openlayer/models/projects/test_update_response.rbi +0 -43
- data/rbi/openlayer/models/storage/presigned_url_create_params.rbi +0 -45
- data/rbi/openlayer/models/storage/presigned_url_create_response.rbi +0 -55
- data/rbi/openlayer/models.rbi +0 -26
- data/rbi/openlayer/request_options.rbi +0 -59
- data/rbi/openlayer/resources/commits/test_results.rbi +0 -45
- data/rbi/openlayer/resources/commits.rbi +0 -29
- data/rbi/openlayer/resources/inference_pipelines/data.rbi +0 -41
- data/rbi/openlayer/resources/inference_pipelines/rows.rbi +0 -40
- data/rbi/openlayer/resources/inference_pipelines/test_results.rbi +0 -46
- data/rbi/openlayer/resources/inference_pipelines.rbi +0 -79
- data/rbi/openlayer/resources/projects/commits.rbi +0 -60
- data/rbi/openlayer/resources/projects/inference_pipelines.rbi +0 -69
- data/rbi/openlayer/resources/projects/tests.rbi +0 -123
- data/rbi/openlayer/resources/projects.rbi +0 -64
- data/rbi/openlayer/resources/storage/presigned_url.rbi +0 -28
- data/rbi/openlayer/resources/storage.rbi +0 -15
- data/rbi/openlayer/version.rbi +0 -5
- data/sig/openlayer/client.rbs +0 -32
- data/sig/openlayer/errors.rbs +0 -117
- data/sig/openlayer/file_part.rbs +0 -21
- data/sig/openlayer/internal/transport/base_client.rbs +0 -131
- data/sig/openlayer/internal/transport/pooled_net_requester.rbs +0 -45
- data/sig/openlayer/internal/type/array_of.rbs +0 -48
- data/sig/openlayer/internal/type/base_model.rbs +0 -102
- data/sig/openlayer/internal/type/base_page.rbs +0 -24
- data/sig/openlayer/internal/type/boolean.rbs +0 -26
- data/sig/openlayer/internal/type/converter.rbs +0 -79
- data/sig/openlayer/internal/type/enum.rbs +0 -32
- data/sig/openlayer/internal/type/file_input.rbs +0 -25
- data/sig/openlayer/internal/type/hash_of.rbs +0 -48
- data/sig/openlayer/internal/type/request_parameters.rbs +0 -19
- data/sig/openlayer/internal/type/union.rbs +0 -52
- data/sig/openlayer/internal/type/unknown.rbs +0 -26
- data/sig/openlayer/internal/util.rbs +0 -185
- data/sig/openlayer/internal.rbs +0 -9
- data/sig/openlayer/models/commit_retrieve_params.rbs +0 -15
- data/sig/openlayer/models/commit_retrieve_response.rbs +0 -209
- data/sig/openlayer/models/commits/test_result_list_params.rbs +0 -91
- data/sig/openlayer/models/commits/test_result_list_response.rbs +0 -529
- data/sig/openlayer/models/inference_pipeline_delete_params.rbs +0 -15
- data/sig/openlayer/models/inference_pipeline_retrieve_params.rbs +0 -41
- data/sig/openlayer/models/inference_pipeline_retrieve_response.rbs +0 -493
- data/sig/openlayer/models/inference_pipeline_update_params.rbs +0 -34
- data/sig/openlayer/models/inference_pipeline_update_response.rbs +0 -493
- data/sig/openlayer/models/inference_pipelines/data_stream_params.rbs +0 -386
- data/sig/openlayer/models/inference_pipelines/data_stream_response.rbs +0 -32
- data/sig/openlayer/models/inference_pipelines/row_update_params.rbs +0 -75
- data/sig/openlayer/models/inference_pipelines/row_update_response.rbs +0 -32
- data/sig/openlayer/models/inference_pipelines/test_result_list_params.rbs +0 -84
- data/sig/openlayer/models/inference_pipelines/test_result_list_response.rbs +0 -529
- data/sig/openlayer/models/project_create_params.rbs +0 -53
- data/sig/openlayer/models/project_create_response.rbs +0 -210
- data/sig/openlayer/models/project_list_params.rbs +0 -68
- data/sig/openlayer/models/project_list_response.rbs +0 -225
- data/sig/openlayer/models/projects/commit_create_params.rbs +0 -82
- data/sig/openlayer/models/projects/commit_create_response.rbs +0 -211
- data/sig/openlayer/models/projects/commit_list_params.rbs +0 -34
- data/sig/openlayer/models/projects/commit_list_response.rbs +0 -228
- data/sig/openlayer/models/projects/inference_pipeline_create_params.rbs +0 -308
- data/sig/openlayer/models/projects/inference_pipeline_create_response.rbs +0 -495
- data/sig/openlayer/models/projects/inference_pipeline_list_params.rbs +0 -40
- data/sig/openlayer/models/projects/inference_pipeline_list_response.rbs +0 -512
- data/sig/openlayer/models/projects/test_create_params.rbs +0 -388
- data/sig/openlayer/models/projects/test_create_response.rbs +0 -427
- data/sig/openlayer/models/projects/test_list_params.rbs +0 -85
- data/sig/openlayer/models/projects/test_list_response.rbs +0 -442
- data/sig/openlayer/models/projects/test_update_params.rbs +0 -275
- data/sig/openlayer/models/projects/test_update_response.rbs +0 -25
- data/sig/openlayer/models/storage/presigned_url_create_params.rbs +0 -25
- data/sig/openlayer/models/storage/presigned_url_create_response.rbs +0 -22
- data/sig/openlayer/models.rbs +0 -21
- data/sig/openlayer/request_options.rbs +0 -34
- data/sig/openlayer/resources/commits/test_results.rbs +0 -19
- data/sig/openlayer/resources/commits.rbs +0 -14
- data/sig/openlayer/resources/inference_pipelines/data.rbs +0 -16
- data/sig/openlayer/resources/inference_pipelines/rows.rbs +0 -17
- data/sig/openlayer/resources/inference_pipelines/test_results.rbs +0 -18
- data/sig/openlayer/resources/inference_pipelines.rbs +0 -32
- data/sig/openlayer/resources/projects/commits.rbs +0 -25
- data/sig/openlayer/resources/projects/inference_pipelines.rbs +0 -26
- data/sig/openlayer/resources/projects/tests.rbs +0 -45
- data/sig/openlayer/resources/projects.rbs +0 -28
- data/sig/openlayer/resources/storage/presigned_url.rbs +0 -14
- data/sig/openlayer/resources/storage.rbs +0 -9
- data/sig/openlayer/version.rbs +0 -3
|
@@ -1,487 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Openlayer
|
|
4
|
-
module Internal
|
|
5
|
-
# @api private
|
|
6
|
-
module Util
|
|
7
|
-
extend Openlayer::Internal::Util::SorbetRuntimeSupport
|
|
8
|
-
|
|
9
|
-
# @api private
|
|
10
|
-
sig { returns(Float) }
|
|
11
|
-
def self.monotonic_secs
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# @api private
|
|
15
|
-
sig do
|
|
16
|
-
params(ns: T.any(Module, T::Class[T.anything])).returns(
|
|
17
|
-
T::Enumerable[T.any(Module, T::Class[T.anything])]
|
|
18
|
-
)
|
|
19
|
-
end
|
|
20
|
-
def self.walk_namespaces(ns)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
class << self
|
|
24
|
-
# @api private
|
|
25
|
-
sig { returns(String) }
|
|
26
|
-
def arch
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# @api private
|
|
30
|
-
sig { returns(String) }
|
|
31
|
-
def os
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
class << self
|
|
36
|
-
# @api private
|
|
37
|
-
sig { params(input: T.anything).returns(T::Boolean) }
|
|
38
|
-
def primitive?(input)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# @api private
|
|
42
|
-
sig do
|
|
43
|
-
params(input: T.any(String, T::Boolean)).returns(
|
|
44
|
-
T.any(T::Boolean, T.anything)
|
|
45
|
-
)
|
|
46
|
-
end
|
|
47
|
-
def coerce_boolean(input)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# @api private
|
|
51
|
-
sig do
|
|
52
|
-
params(input: T.any(String, T::Boolean)).returns(
|
|
53
|
-
T.nilable(T::Boolean)
|
|
54
|
-
)
|
|
55
|
-
end
|
|
56
|
-
def coerce_boolean!(input)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
# @api private
|
|
60
|
-
sig do
|
|
61
|
-
params(input: T.any(String, Integer)).returns(
|
|
62
|
-
T.any(Integer, T.anything)
|
|
63
|
-
)
|
|
64
|
-
end
|
|
65
|
-
def coerce_integer(input)
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
# @api private
|
|
69
|
-
sig do
|
|
70
|
-
params(input: T.any(String, Integer, Float)).returns(
|
|
71
|
-
T.any(Float, T.anything)
|
|
72
|
-
)
|
|
73
|
-
end
|
|
74
|
-
def coerce_float(input)
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# @api private
|
|
78
|
-
sig do
|
|
79
|
-
params(input: T.anything).returns(
|
|
80
|
-
T.any(T::Hash[T.anything, T.anything], T.anything)
|
|
81
|
-
)
|
|
82
|
-
end
|
|
83
|
-
def coerce_hash(input)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# @api private
|
|
87
|
-
sig do
|
|
88
|
-
params(input: T.anything).returns(
|
|
89
|
-
T.nilable(T::Hash[T.anything, T.anything])
|
|
90
|
-
)
|
|
91
|
-
end
|
|
92
|
-
def coerce_hash!(input)
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
class << self
|
|
97
|
-
# @api private
|
|
98
|
-
sig do
|
|
99
|
-
params(lhs: T.anything, rhs: T.anything, concat: T::Boolean).returns(
|
|
100
|
-
T.anything
|
|
101
|
-
)
|
|
102
|
-
end
|
|
103
|
-
private def deep_merge_lr(lhs, rhs, concat: false)
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
# @api private
|
|
107
|
-
#
|
|
108
|
-
# Recursively merge one hash with another. If the values at a given key are not
|
|
109
|
-
# both hashes, just take the new value.
|
|
110
|
-
sig do
|
|
111
|
-
params(
|
|
112
|
-
values: T::Array[T.anything],
|
|
113
|
-
sentinel: T.nilable(T.anything),
|
|
114
|
-
concat: T::Boolean
|
|
115
|
-
).returns(T.anything)
|
|
116
|
-
end
|
|
117
|
-
def deep_merge(
|
|
118
|
-
*values,
|
|
119
|
-
# the value to return if no values are provided.
|
|
120
|
-
sentinel: nil,
|
|
121
|
-
# whether to merge sequences by concatenation.
|
|
122
|
-
concat: false
|
|
123
|
-
)
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
# @api private
|
|
127
|
-
sig do
|
|
128
|
-
params(
|
|
129
|
-
data:
|
|
130
|
-
T.any(
|
|
131
|
-
Openlayer::Internal::AnyHash,
|
|
132
|
-
T::Array[T.anything],
|
|
133
|
-
T.anything
|
|
134
|
-
),
|
|
135
|
-
pick:
|
|
136
|
-
T.nilable(
|
|
137
|
-
T.any(
|
|
138
|
-
Symbol,
|
|
139
|
-
Integer,
|
|
140
|
-
T::Array[T.any(Symbol, Integer)],
|
|
141
|
-
T.proc.params(arg0: T.anything).returns(T.anything)
|
|
142
|
-
)
|
|
143
|
-
),
|
|
144
|
-
blk: T.nilable(T.proc.returns(T.anything))
|
|
145
|
-
).returns(T.nilable(T.anything))
|
|
146
|
-
end
|
|
147
|
-
def dig(data, pick, &blk)
|
|
148
|
-
end
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
class << self
|
|
152
|
-
# @api private
|
|
153
|
-
sig { params(uri: URI::Generic).returns(String) }
|
|
154
|
-
def uri_origin(uri)
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
# @api private
|
|
158
|
-
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
|
159
|
-
def interpolate_path(path)
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
class << self
|
|
164
|
-
# @api private
|
|
165
|
-
sig do
|
|
166
|
-
params(query: T.nilable(String)).returns(
|
|
167
|
-
T::Hash[String, T::Array[String]]
|
|
168
|
-
)
|
|
169
|
-
end
|
|
170
|
-
def decode_query(query)
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
# @api private
|
|
174
|
-
sig do
|
|
175
|
-
params(
|
|
176
|
-
query:
|
|
177
|
-
T.nilable(
|
|
178
|
-
T::Hash[String, T.nilable(T.any(T::Array[String], String))]
|
|
179
|
-
)
|
|
180
|
-
).returns(T.nilable(String))
|
|
181
|
-
end
|
|
182
|
-
def encode_query(query)
|
|
183
|
-
end
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
ParsedUri =
|
|
187
|
-
T.type_alias do
|
|
188
|
-
{
|
|
189
|
-
scheme: T.nilable(String),
|
|
190
|
-
host: T.nilable(String),
|
|
191
|
-
port: T.nilable(Integer),
|
|
192
|
-
path: T.nilable(String),
|
|
193
|
-
query: T::Hash[String, T::Array[String]]
|
|
194
|
-
}
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
class << self
|
|
198
|
-
# @api private
|
|
199
|
-
sig do
|
|
200
|
-
params(url: T.any(URI::Generic, String)).returns(
|
|
201
|
-
Openlayer::Internal::Util::ParsedUri
|
|
202
|
-
)
|
|
203
|
-
end
|
|
204
|
-
def parse_uri(url)
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
# @api private
|
|
208
|
-
sig do
|
|
209
|
-
params(parsed: Openlayer::Internal::Util::ParsedUri).returns(
|
|
210
|
-
URI::Generic
|
|
211
|
-
)
|
|
212
|
-
end
|
|
213
|
-
def unparse_uri(parsed)
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
# @api private
|
|
217
|
-
sig do
|
|
218
|
-
params(
|
|
219
|
-
lhs: Openlayer::Internal::Util::ParsedUri,
|
|
220
|
-
rhs: Openlayer::Internal::Util::ParsedUri
|
|
221
|
-
).returns(URI::Generic)
|
|
222
|
-
end
|
|
223
|
-
def join_parsed_uri(lhs, rhs)
|
|
224
|
-
end
|
|
225
|
-
end
|
|
226
|
-
|
|
227
|
-
class << self
|
|
228
|
-
# @api private
|
|
229
|
-
sig do
|
|
230
|
-
params(
|
|
231
|
-
headers:
|
|
232
|
-
T::Hash[
|
|
233
|
-
String,
|
|
234
|
-
T.nilable(
|
|
235
|
-
T.any(
|
|
236
|
-
String,
|
|
237
|
-
Integer,
|
|
238
|
-
T::Array[T.nilable(T.any(String, Integer))]
|
|
239
|
-
)
|
|
240
|
-
)
|
|
241
|
-
]
|
|
242
|
-
).returns(T::Hash[String, String])
|
|
243
|
-
end
|
|
244
|
-
def normalized_headers(*headers)
|
|
245
|
-
end
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
# @api private
|
|
249
|
-
#
|
|
250
|
-
# An adapter that satisfies the IO interface required by `::IO.copy_stream`
|
|
251
|
-
class ReadIOAdapter
|
|
252
|
-
# @api private
|
|
253
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
254
|
-
def close?
|
|
255
|
-
end
|
|
256
|
-
|
|
257
|
-
# @api private
|
|
258
|
-
sig { void }
|
|
259
|
-
def close
|
|
260
|
-
end
|
|
261
|
-
|
|
262
|
-
# @api private
|
|
263
|
-
sig { params(max_len: T.nilable(Integer)).returns(String) }
|
|
264
|
-
private def read_enum(max_len)
|
|
265
|
-
end
|
|
266
|
-
|
|
267
|
-
# @api private
|
|
268
|
-
sig do
|
|
269
|
-
params(
|
|
270
|
-
max_len: T.nilable(Integer),
|
|
271
|
-
out_string: T.nilable(String)
|
|
272
|
-
).returns(T.nilable(String))
|
|
273
|
-
end
|
|
274
|
-
def read(max_len = nil, out_string = nil)
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
# @api private
|
|
278
|
-
sig do
|
|
279
|
-
params(
|
|
280
|
-
src: T.any(String, Pathname, StringIO, T::Enumerable[String]),
|
|
281
|
-
blk: T.proc.params(arg0: String).void
|
|
282
|
-
).returns(T.attached_class)
|
|
283
|
-
end
|
|
284
|
-
def self.new(src, &blk)
|
|
285
|
-
end
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
class << self
|
|
289
|
-
sig do
|
|
290
|
-
params(blk: T.proc.params(y: Enumerator::Yielder).void).returns(
|
|
291
|
-
T::Enumerable[String]
|
|
292
|
-
)
|
|
293
|
-
end
|
|
294
|
-
def writable_enum(&blk)
|
|
295
|
-
end
|
|
296
|
-
end
|
|
297
|
-
|
|
298
|
-
JSON_CONTENT =
|
|
299
|
-
T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp)
|
|
300
|
-
JSONL_CONTENT =
|
|
301
|
-
T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
|
|
302
|
-
|
|
303
|
-
class << self
|
|
304
|
-
# @api private
|
|
305
|
-
sig do
|
|
306
|
-
params(
|
|
307
|
-
y: Enumerator::Yielder,
|
|
308
|
-
val: T.anything,
|
|
309
|
-
closing: T::Array[T.proc.void],
|
|
310
|
-
content_type: T.nilable(String)
|
|
311
|
-
).void
|
|
312
|
-
end
|
|
313
|
-
private def write_multipart_content(
|
|
314
|
-
y,
|
|
315
|
-
val:,
|
|
316
|
-
closing:,
|
|
317
|
-
content_type: nil
|
|
318
|
-
)
|
|
319
|
-
end
|
|
320
|
-
|
|
321
|
-
# @api private
|
|
322
|
-
sig do
|
|
323
|
-
params(
|
|
324
|
-
y: Enumerator::Yielder,
|
|
325
|
-
boundary: String,
|
|
326
|
-
key: T.any(Symbol, String),
|
|
327
|
-
val: T.anything,
|
|
328
|
-
closing: T::Array[T.proc.void]
|
|
329
|
-
).void
|
|
330
|
-
end
|
|
331
|
-
private def write_multipart_chunk(y, boundary:, key:, val:, closing:)
|
|
332
|
-
end
|
|
333
|
-
|
|
334
|
-
# @api private
|
|
335
|
-
#
|
|
336
|
-
# https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content
|
|
337
|
-
sig do
|
|
338
|
-
params(body: T.anything).returns([String, T::Enumerable[String]])
|
|
339
|
-
end
|
|
340
|
-
private def encode_multipart_streaming(body)
|
|
341
|
-
end
|
|
342
|
-
|
|
343
|
-
# @api private
|
|
344
|
-
sig do
|
|
345
|
-
params(headers: T::Hash[String, String], body: T.anything).returns(
|
|
346
|
-
T.anything
|
|
347
|
-
)
|
|
348
|
-
end
|
|
349
|
-
def encode_content(headers, body)
|
|
350
|
-
end
|
|
351
|
-
|
|
352
|
-
# @api private
|
|
353
|
-
#
|
|
354
|
-
# https://www.iana.org/assignments/character-sets/character-sets.xhtml
|
|
355
|
-
sig { params(content_type: String, text: String).void }
|
|
356
|
-
def force_charset!(content_type, text:)
|
|
357
|
-
end
|
|
358
|
-
|
|
359
|
-
# @api private
|
|
360
|
-
#
|
|
361
|
-
# Assumes each chunk in stream has `Encoding::BINARY`.
|
|
362
|
-
sig do
|
|
363
|
-
params(
|
|
364
|
-
headers: T::Hash[String, String],
|
|
365
|
-
stream: T::Enumerable[String],
|
|
366
|
-
suppress_error: T::Boolean
|
|
367
|
-
).returns(T.anything)
|
|
368
|
-
end
|
|
369
|
-
def decode_content(headers, stream:, suppress_error: false)
|
|
370
|
-
end
|
|
371
|
-
end
|
|
372
|
-
|
|
373
|
-
class << self
|
|
374
|
-
# @api private
|
|
375
|
-
#
|
|
376
|
-
# https://doc.rust-lang.org/std/iter/trait.FusedIterator.html
|
|
377
|
-
sig do
|
|
378
|
-
params(
|
|
379
|
-
enum: T::Enumerable[T.anything],
|
|
380
|
-
external: T::Boolean,
|
|
381
|
-
close: T.proc.void
|
|
382
|
-
).returns(T::Enumerable[T.anything])
|
|
383
|
-
end
|
|
384
|
-
def fused_enum(enum, external: false, &close)
|
|
385
|
-
end
|
|
386
|
-
|
|
387
|
-
# @api private
|
|
388
|
-
sig { params(enum: T.nilable(T::Enumerable[T.anything])).void }
|
|
389
|
-
def close_fused!(enum)
|
|
390
|
-
end
|
|
391
|
-
|
|
392
|
-
# @api private
|
|
393
|
-
sig do
|
|
394
|
-
params(
|
|
395
|
-
enum: T.nilable(T::Enumerable[T.anything]),
|
|
396
|
-
blk: T.proc.params(arg0: Enumerator::Yielder).void
|
|
397
|
-
).returns(T::Enumerable[T.anything])
|
|
398
|
-
end
|
|
399
|
-
def chain_fused(enum, &blk)
|
|
400
|
-
end
|
|
401
|
-
end
|
|
402
|
-
|
|
403
|
-
ServerSentEvent =
|
|
404
|
-
T.type_alias do
|
|
405
|
-
{
|
|
406
|
-
event: T.nilable(String),
|
|
407
|
-
data: T.nilable(String),
|
|
408
|
-
id: T.nilable(String),
|
|
409
|
-
retry: T.nilable(Integer)
|
|
410
|
-
}
|
|
411
|
-
end
|
|
412
|
-
|
|
413
|
-
class << self
|
|
414
|
-
# @api private
|
|
415
|
-
#
|
|
416
|
-
# Assumes Strings have been forced into having `Encoding::BINARY`.
|
|
417
|
-
#
|
|
418
|
-
# This decoder is responsible for reassembling lines split across multiple
|
|
419
|
-
# fragments.
|
|
420
|
-
sig do
|
|
421
|
-
params(enum: T::Enumerable[String]).returns(T::Enumerable[String])
|
|
422
|
-
end
|
|
423
|
-
def decode_lines(enum)
|
|
424
|
-
end
|
|
425
|
-
|
|
426
|
-
# @api private
|
|
427
|
-
#
|
|
428
|
-
# https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream
|
|
429
|
-
#
|
|
430
|
-
# Assumes that `lines` has been decoded with `#decode_lines`.
|
|
431
|
-
sig do
|
|
432
|
-
params(lines: T::Enumerable[String]).returns(
|
|
433
|
-
T::Enumerable[Openlayer::Internal::Util::ServerSentEvent]
|
|
434
|
-
)
|
|
435
|
-
end
|
|
436
|
-
def decode_sse(lines)
|
|
437
|
-
end
|
|
438
|
-
end
|
|
439
|
-
|
|
440
|
-
# @api private
|
|
441
|
-
module SorbetRuntimeSupport
|
|
442
|
-
class MissingSorbetRuntimeError < ::RuntimeError
|
|
443
|
-
end
|
|
444
|
-
|
|
445
|
-
# @api private
|
|
446
|
-
sig { returns(T::Hash[Symbol, T.anything]) }
|
|
447
|
-
private def sorbet_runtime_constants
|
|
448
|
-
end
|
|
449
|
-
|
|
450
|
-
# @api private
|
|
451
|
-
sig { params(name: Symbol).void }
|
|
452
|
-
def const_missing(name)
|
|
453
|
-
end
|
|
454
|
-
|
|
455
|
-
# @api private
|
|
456
|
-
sig { params(name: Symbol).returns(T::Boolean) }
|
|
457
|
-
def sorbet_constant_defined?(name)
|
|
458
|
-
end
|
|
459
|
-
|
|
460
|
-
# @api private
|
|
461
|
-
sig { params(name: Symbol, blk: T.proc.returns(T.anything)).void }
|
|
462
|
-
def define_sorbet_constant!(name, &blk)
|
|
463
|
-
end
|
|
464
|
-
|
|
465
|
-
# @api private
|
|
466
|
-
sig { returns(T.anything) }
|
|
467
|
-
def to_sorbet_type
|
|
468
|
-
end
|
|
469
|
-
|
|
470
|
-
class << self
|
|
471
|
-
# @api private
|
|
472
|
-
sig do
|
|
473
|
-
params(
|
|
474
|
-
type:
|
|
475
|
-
T.any(
|
|
476
|
-
Openlayer::Internal::Util::SorbetRuntimeSupport,
|
|
477
|
-
T.anything
|
|
478
|
-
)
|
|
479
|
-
).returns(T.anything)
|
|
480
|
-
end
|
|
481
|
-
def to_sorbet_type(type)
|
|
482
|
-
end
|
|
483
|
-
end
|
|
484
|
-
end
|
|
485
|
-
end
|
|
486
|
-
end
|
|
487
|
-
end
|
data/rbi/openlayer/internal.rbi
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Openlayer
|
|
4
|
-
module Internal
|
|
5
|
-
extend Openlayer::Internal::Util::SorbetRuntimeSupport
|
|
6
|
-
|
|
7
|
-
# Due to the current WIP status of Shapes support in Sorbet, types referencing
|
|
8
|
-
# this alias might be refined in the future.
|
|
9
|
-
AnyHash = T.type_alias { T::Hash[Symbol, T.anything] }
|
|
10
|
-
|
|
11
|
-
FileInput =
|
|
12
|
-
T.type_alias do
|
|
13
|
-
T.any(Pathname, StringIO, IO, String, Openlayer::FilePart)
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
OMIT = T.let(Object.new.freeze, T.anything)
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Openlayer
|
|
4
|
-
module Models
|
|
5
|
-
class CommitRetrieveParams < Openlayer::Internal::Type::BaseModel
|
|
6
|
-
extend Openlayer::Internal::Type::RequestParameters::Converter
|
|
7
|
-
include Openlayer::Internal::Type::RequestParameters
|
|
8
|
-
|
|
9
|
-
OrHash =
|
|
10
|
-
T.type_alias do
|
|
11
|
-
T.any(Openlayer::CommitRetrieveParams, Openlayer::Internal::AnyHash)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
sig do
|
|
15
|
-
params(request_options: Openlayer::RequestOptions::OrHash).returns(
|
|
16
|
-
T.attached_class
|
|
17
|
-
)
|
|
18
|
-
end
|
|
19
|
-
def self.new(request_options: {})
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
sig { override.returns({ request_options: Openlayer::RequestOptions }) }
|
|
23
|
-
def to_hash
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|