handinger 0.0.2
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/.ignore +2 -0
- data/CHANGELOG.md +10 -0
- data/README.md +236 -0
- data/SECURITY.md +23 -0
- data/lib/handinger/client.rb +74 -0
- data/lib/handinger/errors.rb +228 -0
- data/lib/handinger/file_part.rb +58 -0
- data/lib/handinger/internal/stream.rb +29 -0
- data/lib/handinger/internal/transport/base_client.rb +575 -0
- data/lib/handinger/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/handinger/internal/type/array_of.rb +168 -0
- data/lib/handinger/internal/type/base_model.rb +531 -0
- data/lib/handinger/internal/type/base_page.rb +55 -0
- data/lib/handinger/internal/type/base_stream.rb +83 -0
- data/lib/handinger/internal/type/boolean.rb +77 -0
- data/lib/handinger/internal/type/converter.rb +327 -0
- data/lib/handinger/internal/type/enum.rb +131 -0
- data/lib/handinger/internal/type/file_input.rb +111 -0
- data/lib/handinger/internal/type/hash_of.rb +188 -0
- data/lib/handinger/internal/type/request_parameters.rb +42 -0
- data/lib/handinger/internal/type/union.rb +262 -0
- data/lib/handinger/internal/type/unknown.rb +81 -0
- data/lib/handinger/internal/util.rb +966 -0
- data/lib/handinger/internal.rb +20 -0
- data/lib/handinger/models/create_worker.rb +40 -0
- data/lib/handinger/models/worker.rb +360 -0
- data/lib/handinger/models/worker_continue_params.rb +20 -0
- data/lib/handinger/models/worker_create_params.rb +14 -0
- data/lib/handinger/models/worker_retrieve_email_params.rb +20 -0
- data/lib/handinger/models/worker_retrieve_email_response.rb +7 -0
- data/lib/handinger/models/worker_retrieve_file_params.rb +26 -0
- data/lib/handinger/models/worker_retrieve_params.rb +29 -0
- data/lib/handinger/models/worker_stream_updates_params.rb +20 -0
- data/lib/handinger/models/worker_stream_updates_response.rb +7 -0
- data/lib/handinger/models/workers/schedule_cancel_params.rb +28 -0
- data/lib/handinger/models/workers/schedule_cancel_response.rb +18 -0
- data/lib/handinger/models/workers/schedule_create_params.rb +133 -0
- data/lib/handinger/models/workers/schedule_list_params.rb +22 -0
- data/lib/handinger/models/workers/schedule_list_response.rb +24 -0
- data/lib/handinger/models/workers/worker_schedule.rb +233 -0
- data/lib/handinger/models.rb +59 -0
- data/lib/handinger/request_options.rb +77 -0
- data/lib/handinger/resources/workers/schedules.rb +92 -0
- data/lib/handinger/resources/workers.rb +167 -0
- data/lib/handinger/version.rb +5 -0
- data/lib/handinger.rb +75 -0
- data/manifest.yaml +17 -0
- data/rbi/handinger/client.rbi +49 -0
- data/rbi/handinger/errors.rbi +205 -0
- data/rbi/handinger/file_part.rbi +37 -0
- data/rbi/handinger/internal/stream.rbi +20 -0
- data/rbi/handinger/internal/transport/base_client.rbi +314 -0
- data/rbi/handinger/internal/transport/pooled_net_requester.rbi +83 -0
- data/rbi/handinger/internal/type/array_of.rbi +104 -0
- data/rbi/handinger/internal/type/base_model.rbi +308 -0
- data/rbi/handinger/internal/type/base_page.rbi +42 -0
- data/rbi/handinger/internal/type/base_stream.rbi +75 -0
- data/rbi/handinger/internal/type/boolean.rbi +58 -0
- data/rbi/handinger/internal/type/converter.rbi +216 -0
- data/rbi/handinger/internal/type/enum.rbi +82 -0
- data/rbi/handinger/internal/type/file_input.rbi +59 -0
- data/rbi/handinger/internal/type/hash_of.rbi +104 -0
- data/rbi/handinger/internal/type/request_parameters.rbi +29 -0
- data/rbi/handinger/internal/type/union.rbi +128 -0
- data/rbi/handinger/internal/type/unknown.rbi +58 -0
- data/rbi/handinger/internal/util.rbi +515 -0
- data/rbi/handinger/internal.rbi +18 -0
- data/rbi/handinger/models/create_worker.rbi +72 -0
- data/rbi/handinger/models/worker.rbi +546 -0
- data/rbi/handinger/models/worker_continue_params.rbi +35 -0
- data/rbi/handinger/models/worker_create_params.rbi +27 -0
- data/rbi/handinger/models/worker_retrieve_email_params.rbi +38 -0
- data/rbi/handinger/models/worker_retrieve_email_response.rbi +7 -0
- data/rbi/handinger/models/worker_retrieve_file_params.rbi +46 -0
- data/rbi/handinger/models/worker_retrieve_params.rbi +52 -0
- data/rbi/handinger/models/worker_stream_updates_params.rbi +38 -0
- data/rbi/handinger/models/worker_stream_updates_response.rbi +7 -0
- data/rbi/handinger/models/workers/schedule_cancel_params.rbi +48 -0
- data/rbi/handinger/models/workers/schedule_cancel_response.rbi +28 -0
- data/rbi/handinger/models/workers/schedule_create_params.rbi +270 -0
- data/rbi/handinger/models/workers/schedule_list_params.rbi +40 -0
- data/rbi/handinger/models/workers/schedule_list_response.rbi +51 -0
- data/rbi/handinger/models/workers/worker_schedule.rbi +461 -0
- data/rbi/handinger/models.rbi +21 -0
- data/rbi/handinger/request_options.rbi +59 -0
- data/rbi/handinger/resources/workers/schedules.rbi +72 -0
- data/rbi/handinger/resources/workers.rbi +112 -0
- data/rbi/handinger/version.rbi +5 -0
- data/sig/handinger/client.rbs +26 -0
- data/sig/handinger/errors.rbs +117 -0
- data/sig/handinger/file_part.rbs +21 -0
- data/sig/handinger/internal/stream.rbs +9 -0
- data/sig/handinger/internal/transport/base_client.rbs +133 -0
- data/sig/handinger/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/handinger/internal/type/array_of.rbs +48 -0
- data/sig/handinger/internal/type/base_model.rbs +102 -0
- data/sig/handinger/internal/type/base_page.rbs +24 -0
- data/sig/handinger/internal/type/base_stream.rbs +38 -0
- data/sig/handinger/internal/type/boolean.rbs +26 -0
- data/sig/handinger/internal/type/converter.rbs +79 -0
- data/sig/handinger/internal/type/enum.rbs +32 -0
- data/sig/handinger/internal/type/file_input.rbs +25 -0
- data/sig/handinger/internal/type/hash_of.rbs +48 -0
- data/sig/handinger/internal/type/request_parameters.rbs +19 -0
- data/sig/handinger/internal/type/union.rbs +52 -0
- data/sig/handinger/internal/type/unknown.rbs +26 -0
- data/sig/handinger/internal/util.rbs +199 -0
- data/sig/handinger/internal.rbs +9 -0
- data/sig/handinger/models/create_worker.rbs +49 -0
- data/sig/handinger/models/worker.rbs +364 -0
- data/sig/handinger/models/worker_continue_params.rbs +25 -0
- data/sig/handinger/models/worker_create_params.rbs +15 -0
- data/sig/handinger/models/worker_retrieve_email_params.rbs +23 -0
- data/sig/handinger/models/worker_retrieve_email_response.rbs +5 -0
- data/sig/handinger/models/worker_retrieve_file_params.rbs +28 -0
- data/sig/handinger/models/worker_retrieve_params.rbs +30 -0
- data/sig/handinger/models/worker_stream_updates_params.rbs +23 -0
- data/sig/handinger/models/worker_stream_updates_response.rbs +5 -0
- data/sig/handinger/models/workers/schedule_cancel_params.rbs +30 -0
- data/sig/handinger/models/workers/schedule_cancel_response.rbs +15 -0
- data/sig/handinger/models/workers/schedule_create_params.rbs +123 -0
- data/sig/handinger/models/workers/schedule_list_params.rbs +25 -0
- data/sig/handinger/models/workers/schedule_list_response.rbs +27 -0
- data/sig/handinger/models/workers/worker_schedule.rbs +234 -0
- data/sig/handinger/models.rbs +19 -0
- data/sig/handinger/request_options.rbs +34 -0
- data/sig/handinger/resources/workers/schedules.rbs +28 -0
- data/sig/handinger/resources/workers.rbs +46 -0
- data/sig/handinger/version.rbs +3 -0
- metadata +202 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Internal
|
|
3
|
+
module Type
|
|
4
|
+
class Boolean
|
|
5
|
+
extend Handinger::Internal::Type::Converter
|
|
6
|
+
extend Handinger::Internal::Util::SorbetRuntimeSupport
|
|
7
|
+
|
|
8
|
+
def self.===: (top other) -> bool
|
|
9
|
+
|
|
10
|
+
def self.==: (top other) -> bool
|
|
11
|
+
|
|
12
|
+
def self.coerce: (
|
|
13
|
+
bool | top value,
|
|
14
|
+
state: Handinger::Internal::Type::Converter::coerce_state
|
|
15
|
+
) -> (bool | top)
|
|
16
|
+
|
|
17
|
+
def self.dump: (
|
|
18
|
+
bool | top value,
|
|
19
|
+
state: Handinger::Internal::Type::Converter::dump_state
|
|
20
|
+
) -> (bool | top)
|
|
21
|
+
|
|
22
|
+
def self.to_sorbet_type: -> top
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Internal
|
|
3
|
+
module Type
|
|
4
|
+
module Converter
|
|
5
|
+
extend Handinger::Internal::Util::SorbetRuntimeSupport
|
|
6
|
+
|
|
7
|
+
type input = Handinger::Internal::Type::Converter | Class
|
|
8
|
+
|
|
9
|
+
type coerce_state =
|
|
10
|
+
{
|
|
11
|
+
translate_names: bool,
|
|
12
|
+
strictness: bool,
|
|
13
|
+
exactness: { yes: Integer, no: Integer, maybe: Integer },
|
|
14
|
+
error: Class,
|
|
15
|
+
branched: Integer
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type dump_state = { can_retry: bool }
|
|
19
|
+
|
|
20
|
+
def coerce: (
|
|
21
|
+
top value,
|
|
22
|
+
state: Handinger::Internal::Type::Converter::coerce_state
|
|
23
|
+
) -> top
|
|
24
|
+
|
|
25
|
+
def dump: (
|
|
26
|
+
top value,
|
|
27
|
+
state: Handinger::Internal::Type::Converter::dump_state
|
|
28
|
+
) -> top
|
|
29
|
+
|
|
30
|
+
def inspect: (?depth: Integer) -> String
|
|
31
|
+
|
|
32
|
+
def self.type_info: (
|
|
33
|
+
{
|
|
34
|
+
const: (nil | bool | Integer | Float | Symbol)?,
|
|
35
|
+
enum: ^-> Handinger::Internal::Type::Converter::input?,
|
|
36
|
+
union: ^-> Handinger::Internal::Type::Converter::input?
|
|
37
|
+
}
|
|
38
|
+
| ^-> Handinger::Internal::Type::Converter::input
|
|
39
|
+
| Handinger::Internal::Type::Converter::input spec
|
|
40
|
+
) -> (^-> top)
|
|
41
|
+
|
|
42
|
+
def self.meta_info: (
|
|
43
|
+
{
|
|
44
|
+
const: (nil | bool | Integer | Float | Symbol)?,
|
|
45
|
+
enum: ^-> Handinger::Internal::Type::Converter::input?,
|
|
46
|
+
union: ^-> Handinger::Internal::Type::Converter::input?
|
|
47
|
+
}
|
|
48
|
+
| ^-> Handinger::Internal::Type::Converter::input
|
|
49
|
+
| Handinger::Internal::Type::Converter::input type_info,
|
|
50
|
+
{
|
|
51
|
+
const: (nil | bool | Integer | Float | Symbol)?,
|
|
52
|
+
enum: ^-> Handinger::Internal::Type::Converter::input?,
|
|
53
|
+
union: ^-> Handinger::Internal::Type::Converter::input?
|
|
54
|
+
}
|
|
55
|
+
| ^-> Handinger::Internal::Type::Converter::input
|
|
56
|
+
| Handinger::Internal::Type::Converter::input spec
|
|
57
|
+
) -> ::Hash[Symbol, top]
|
|
58
|
+
|
|
59
|
+
def self.new_coerce_state: (
|
|
60
|
+
?translate_names: bool
|
|
61
|
+
) -> Handinger::Internal::Type::Converter::coerce_state
|
|
62
|
+
|
|
63
|
+
def self.coerce: (
|
|
64
|
+
Handinger::Internal::Type::Converter::input target,
|
|
65
|
+
top value,
|
|
66
|
+
?state: Handinger::Internal::Type::Converter::coerce_state
|
|
67
|
+
) -> top
|
|
68
|
+
|
|
69
|
+
def self.dump: (
|
|
70
|
+
Handinger::Internal::Type::Converter::input target,
|
|
71
|
+
top value,
|
|
72
|
+
?state: Handinger::Internal::Type::Converter::dump_state
|
|
73
|
+
) -> top
|
|
74
|
+
|
|
75
|
+
def self.inspect: (top target, depth: Integer) -> String
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Internal
|
|
3
|
+
module Type
|
|
4
|
+
module Enum
|
|
5
|
+
include Handinger::Internal::Type::Converter
|
|
6
|
+
include Handinger::Internal::Util::SorbetRuntimeSupport
|
|
7
|
+
|
|
8
|
+
def self.values: -> ::Array[(nil | bool | Integer | Float | Symbol)]
|
|
9
|
+
|
|
10
|
+
def ===: (top other) -> bool
|
|
11
|
+
|
|
12
|
+
def ==: (top other) -> bool
|
|
13
|
+
|
|
14
|
+
def hash: -> Integer
|
|
15
|
+
|
|
16
|
+
def coerce: (
|
|
17
|
+
String | Symbol | top value,
|
|
18
|
+
state: Handinger::Internal::Type::Converter::coerce_state
|
|
19
|
+
) -> (Symbol | top)
|
|
20
|
+
|
|
21
|
+
def dump: (
|
|
22
|
+
Symbol | top value,
|
|
23
|
+
state: Handinger::Internal::Type::Converter::dump_state
|
|
24
|
+
) -> (Symbol | top)
|
|
25
|
+
|
|
26
|
+
def to_sorbet_type: -> top
|
|
27
|
+
|
|
28
|
+
def inspect: (?depth: Integer) -> String
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Internal
|
|
3
|
+
module Type
|
|
4
|
+
class FileInput
|
|
5
|
+
extend Handinger::Internal::Type::Converter
|
|
6
|
+
|
|
7
|
+
def self.===: (top other) -> bool
|
|
8
|
+
|
|
9
|
+
def self.==: (top other) -> bool
|
|
10
|
+
|
|
11
|
+
def self.coerce: (
|
|
12
|
+
StringIO | String | top value,
|
|
13
|
+
state: Handinger::Internal::Type::Converter::coerce_state
|
|
14
|
+
) -> (StringIO | top)
|
|
15
|
+
|
|
16
|
+
def self.dump: (
|
|
17
|
+
Pathname | StringIO | IO | String | top value,
|
|
18
|
+
state: Handinger::Internal::Type::Converter::dump_state
|
|
19
|
+
) -> (Pathname | StringIO | IO | String | top)
|
|
20
|
+
|
|
21
|
+
def self.to_sorbet_type: -> top
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Internal
|
|
3
|
+
module Type
|
|
4
|
+
class HashOf[Elem]
|
|
5
|
+
include Handinger::Internal::Type::Converter
|
|
6
|
+
include Handinger::Internal::Util::SorbetRuntimeSupport
|
|
7
|
+
|
|
8
|
+
def self.[]: (
|
|
9
|
+
::Hash[Symbol, top]
|
|
10
|
+
| ^-> Handinger::Internal::Type::Converter::input
|
|
11
|
+
| Handinger::Internal::Type::Converter::input type_info,
|
|
12
|
+
?::Hash[Symbol, top] spec
|
|
13
|
+
) -> instance
|
|
14
|
+
|
|
15
|
+
def ===: (top other) -> bool
|
|
16
|
+
|
|
17
|
+
def ==: (top other) -> bool
|
|
18
|
+
|
|
19
|
+
def hash: -> Integer
|
|
20
|
+
|
|
21
|
+
def coerce: (
|
|
22
|
+
::Hash[top, top] | top value,
|
|
23
|
+
state: Handinger::Internal::Type::Converter::coerce_state
|
|
24
|
+
) -> (::Hash[Symbol, top] | top)
|
|
25
|
+
|
|
26
|
+
def dump: (
|
|
27
|
+
::Hash[top, top] | top value,
|
|
28
|
+
state: Handinger::Internal::Type::Converter::dump_state
|
|
29
|
+
) -> (::Hash[Symbol, top] | top)
|
|
30
|
+
|
|
31
|
+
def to_sorbet_type: -> top
|
|
32
|
+
|
|
33
|
+
def item_type: -> Elem
|
|
34
|
+
|
|
35
|
+
def nilable?: -> bool
|
|
36
|
+
|
|
37
|
+
def initialize: (
|
|
38
|
+
::Hash[Symbol, top]
|
|
39
|
+
| ^-> Handinger::Internal::Type::Converter::input
|
|
40
|
+
| Handinger::Internal::Type::Converter::input type_info,
|
|
41
|
+
?::Hash[Symbol, top] spec
|
|
42
|
+
) -> void
|
|
43
|
+
|
|
44
|
+
def inspect: (?depth: Integer) -> String
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Internal
|
|
3
|
+
module Type
|
|
4
|
+
type request_parameters = { request_options: Handinger::request_opts }
|
|
5
|
+
|
|
6
|
+
module RequestParameters
|
|
7
|
+
attr_reader request_options: Handinger::request_opts
|
|
8
|
+
|
|
9
|
+
def request_options=: (
|
|
10
|
+
Handinger::request_opts
|
|
11
|
+
) -> Handinger::request_opts
|
|
12
|
+
|
|
13
|
+
module Converter
|
|
14
|
+
def dump_request: (top params) -> [top, ::Hash[Symbol, top]]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Internal
|
|
3
|
+
module Type
|
|
4
|
+
module Union
|
|
5
|
+
include Handinger::Internal::Type::Converter
|
|
6
|
+
include Handinger::Internal::Util::SorbetRuntimeSupport
|
|
7
|
+
|
|
8
|
+
private def self.known_variants: -> ::Array[[Symbol?, (^-> Handinger::Internal::Type::Converter::input), ::Hash[Symbol, top]]]
|
|
9
|
+
|
|
10
|
+
def self.derefed_variants: -> ::Array[[Symbol?, top, ::Hash[Symbol, top]]]
|
|
11
|
+
|
|
12
|
+
def self.variants: -> ::Array[top]
|
|
13
|
+
|
|
14
|
+
private def self.discriminator: (Symbol property) -> void
|
|
15
|
+
|
|
16
|
+
private def self.variant: (
|
|
17
|
+
Symbol
|
|
18
|
+
| ::Hash[Symbol, top]
|
|
19
|
+
| ^-> Handinger::Internal::Type::Converter::input
|
|
20
|
+
| Handinger::Internal::Type::Converter::input key,
|
|
21
|
+
?::Hash[Symbol, top]
|
|
22
|
+
| ^-> Handinger::Internal::Type::Converter::input
|
|
23
|
+
| Handinger::Internal::Type::Converter::input spec
|
|
24
|
+
) -> void
|
|
25
|
+
|
|
26
|
+
private def self.resolve_variant: (
|
|
27
|
+
top value
|
|
28
|
+
) -> Handinger::Internal::Type::Converter::input?
|
|
29
|
+
|
|
30
|
+
def ===: (top other) -> bool
|
|
31
|
+
|
|
32
|
+
def ==: (top other) -> bool
|
|
33
|
+
|
|
34
|
+
def hash: -> Integer
|
|
35
|
+
|
|
36
|
+
def coerce: (
|
|
37
|
+
top value,
|
|
38
|
+
state: Handinger::Internal::Type::Converter::coerce_state
|
|
39
|
+
) -> top
|
|
40
|
+
|
|
41
|
+
def dump: (
|
|
42
|
+
top value,
|
|
43
|
+
state: Handinger::Internal::Type::Converter::dump_state
|
|
44
|
+
) -> top
|
|
45
|
+
|
|
46
|
+
def to_sorbet_type: -> top
|
|
47
|
+
|
|
48
|
+
def inspect: (?depth: Integer) -> String
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Internal
|
|
3
|
+
module Type
|
|
4
|
+
class Unknown
|
|
5
|
+
extend Handinger::Internal::Type::Converter
|
|
6
|
+
extend Handinger::Internal::Util::SorbetRuntimeSupport
|
|
7
|
+
|
|
8
|
+
def self.===: (top other) -> bool
|
|
9
|
+
|
|
10
|
+
def self.==: (top other) -> bool
|
|
11
|
+
|
|
12
|
+
def self.coerce: (
|
|
13
|
+
top value,
|
|
14
|
+
state: Handinger::Internal::Type::Converter::coerce_state
|
|
15
|
+
) -> top
|
|
16
|
+
|
|
17
|
+
def self.dump: (
|
|
18
|
+
top value,
|
|
19
|
+
state: Handinger::Internal::Type::Converter::dump_state
|
|
20
|
+
) -> top
|
|
21
|
+
|
|
22
|
+
def self.to_sorbet_type: -> top
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Internal
|
|
3
|
+
module Util
|
|
4
|
+
extend Handinger::Internal::Util::SorbetRuntimeSupport
|
|
5
|
+
|
|
6
|
+
def self?.monotonic_secs: -> Float
|
|
7
|
+
|
|
8
|
+
def self?.walk_namespaces: (
|
|
9
|
+
Module | Class ns
|
|
10
|
+
) -> Enumerable[(Module | Class)]
|
|
11
|
+
|
|
12
|
+
def self?.arch: -> String
|
|
13
|
+
|
|
14
|
+
def self?.os: -> String
|
|
15
|
+
|
|
16
|
+
def self?.primitive?: (top input) -> bool
|
|
17
|
+
|
|
18
|
+
def self?.coerce_boolean: (String | bool input) -> (bool | top)
|
|
19
|
+
|
|
20
|
+
def self?.coerce_boolean!: (String | bool input) -> bool?
|
|
21
|
+
|
|
22
|
+
def self?.coerce_integer: (String | Integer input) -> (Integer | top)
|
|
23
|
+
|
|
24
|
+
def self?.coerce_float: (String | Integer | Float input) -> (Float | top)
|
|
25
|
+
|
|
26
|
+
def self?.coerce_hash: (top input) -> (::Hash[top, top] | top)
|
|
27
|
+
|
|
28
|
+
def self?.coerce_hash!: (top input) -> ::Hash[top, top]?
|
|
29
|
+
|
|
30
|
+
def self?.deep_merge_lr: (top lhs, top rhs, ?concat: bool) -> top
|
|
31
|
+
|
|
32
|
+
def self?.deep_merge: (
|
|
33
|
+
*::Array[top] values,
|
|
34
|
+
?sentinel: top?,
|
|
35
|
+
?concat: bool
|
|
36
|
+
) -> top
|
|
37
|
+
|
|
38
|
+
def self?.dig: (
|
|
39
|
+
::Hash[Symbol, top] | ::Array[top] | top data,
|
|
40
|
+
(Symbol
|
|
41
|
+
| Integer
|
|
42
|
+
| ::Array[(Symbol | Integer)]
|
|
43
|
+
| (^(top arg0) -> top))? pick
|
|
44
|
+
) {
|
|
45
|
+
-> top?
|
|
46
|
+
} -> top?
|
|
47
|
+
|
|
48
|
+
RFC_3986_NOT_PCHARS: Regexp
|
|
49
|
+
|
|
50
|
+
def self?.uri_origin: (URI::Generic uri) -> String
|
|
51
|
+
|
|
52
|
+
def self?.encode_path: (String | Integer path) -> String
|
|
53
|
+
|
|
54
|
+
def self?.interpolate_path: (String | ::Array[String] path) -> String
|
|
55
|
+
|
|
56
|
+
def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
|
|
57
|
+
|
|
58
|
+
def self?.encode_query: (
|
|
59
|
+
::Hash[String, (::Array[String] | String)?]? query
|
|
60
|
+
) -> String?
|
|
61
|
+
|
|
62
|
+
type parsed_uri =
|
|
63
|
+
{
|
|
64
|
+
scheme: String?,
|
|
65
|
+
host: String?,
|
|
66
|
+
port: Integer?,
|
|
67
|
+
path: String?,
|
|
68
|
+
query: ::Hash[String, ::Array[String]]
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
def self?.parse_uri: (
|
|
72
|
+
URI::Generic | String url
|
|
73
|
+
) -> Handinger::Internal::Util::parsed_uri
|
|
74
|
+
|
|
75
|
+
def self?.unparse_uri: (
|
|
76
|
+
Handinger::Internal::Util::parsed_uri parsed
|
|
77
|
+
) -> URI::Generic
|
|
78
|
+
|
|
79
|
+
def self?.join_parsed_uri: (
|
|
80
|
+
Handinger::Internal::Util::parsed_uri lhs,
|
|
81
|
+
Handinger::Internal::Util::parsed_uri rhs
|
|
82
|
+
) -> URI::Generic
|
|
83
|
+
|
|
84
|
+
def self?.normalized_headers: (
|
|
85
|
+
*::Hash[String, (String
|
|
86
|
+
| Integer
|
|
87
|
+
| ::Array[(String | Integer)?])?] headers
|
|
88
|
+
) -> ::Hash[String, String]
|
|
89
|
+
|
|
90
|
+
class ReadIOAdapter
|
|
91
|
+
def close?: -> bool?
|
|
92
|
+
|
|
93
|
+
def close: -> void
|
|
94
|
+
|
|
95
|
+
private def read_enum: (Integer? max_len) -> String
|
|
96
|
+
|
|
97
|
+
def read: (?Integer? max_len, ?String? out_string) -> String?
|
|
98
|
+
|
|
99
|
+
def initialize: (
|
|
100
|
+
String | Pathname | StringIO | Enumerable[String] src
|
|
101
|
+
) {
|
|
102
|
+
(String arg0) -> void
|
|
103
|
+
} -> void
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def self?.writable_enum: {
|
|
107
|
+
(Enumerator::Yielder y) -> void
|
|
108
|
+
} -> Enumerable[String]
|
|
109
|
+
|
|
110
|
+
JSON_CONTENT: Regexp
|
|
111
|
+
JSONL_CONTENT: Regexp
|
|
112
|
+
|
|
113
|
+
def encode_query_params: (
|
|
114
|
+
::Hash[Symbol, top] query
|
|
115
|
+
) -> ::Hash[Symbol, top]
|
|
116
|
+
|
|
117
|
+
private def write_query_param_element!: (
|
|
118
|
+
::Hash[Symbol, top] collection,
|
|
119
|
+
String key,
|
|
120
|
+
top element
|
|
121
|
+
) -> nil
|
|
122
|
+
|
|
123
|
+
def self?.write_multipart_content: (
|
|
124
|
+
Enumerator::Yielder y,
|
|
125
|
+
val: top,
|
|
126
|
+
closing: ::Array[^-> void],
|
|
127
|
+
?content_type: String?
|
|
128
|
+
) -> void
|
|
129
|
+
|
|
130
|
+
def self?.write_multipart_chunk: (
|
|
131
|
+
Enumerator::Yielder y,
|
|
132
|
+
boundary: String,
|
|
133
|
+
key: Symbol | String,
|
|
134
|
+
val: top,
|
|
135
|
+
closing: ::Array[^-> void]
|
|
136
|
+
) -> void
|
|
137
|
+
|
|
138
|
+
def self?.encode_multipart_streaming: (
|
|
139
|
+
top body
|
|
140
|
+
) -> [String, Enumerable[String]]
|
|
141
|
+
|
|
142
|
+
def self?.encode_content: (
|
|
143
|
+
::Hash[String, String] headers,
|
|
144
|
+
top body
|
|
145
|
+
) -> top
|
|
146
|
+
|
|
147
|
+
def self?.force_charset!: (String content_type, text: String) -> void
|
|
148
|
+
|
|
149
|
+
def self?.decode_content: (
|
|
150
|
+
::Hash[String, String] headers,
|
|
151
|
+
stream: Enumerable[String],
|
|
152
|
+
?suppress_error: bool
|
|
153
|
+
) -> top
|
|
154
|
+
|
|
155
|
+
def self?.fused_enum: (
|
|
156
|
+
Enumerable[top] enum,
|
|
157
|
+
?external: bool
|
|
158
|
+
) {
|
|
159
|
+
-> void
|
|
160
|
+
} -> Enumerable[top]
|
|
161
|
+
|
|
162
|
+
def self?.close_fused!: (Enumerable[top]? enum) -> void
|
|
163
|
+
|
|
164
|
+
def self?.chain_fused: (
|
|
165
|
+
Enumerable[top]? enum
|
|
166
|
+
) {
|
|
167
|
+
(Enumerator::Yielder arg0) -> void
|
|
168
|
+
} -> Enumerable[top]
|
|
169
|
+
|
|
170
|
+
type server_sent_event =
|
|
171
|
+
{ event: String?, data: String?, id: String?, retry: Integer? }
|
|
172
|
+
|
|
173
|
+
def self?.decode_lines: (Enumerable[String] enum) -> Enumerable[String]
|
|
174
|
+
|
|
175
|
+
def self?.decode_sse: (
|
|
176
|
+
Enumerable[String] lines
|
|
177
|
+
) -> Enumerable[Handinger::Internal::Util::server_sent_event]
|
|
178
|
+
|
|
179
|
+
module SorbetRuntimeSupport
|
|
180
|
+
class MissingSorbetRuntimeError < ::RuntimeError
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
private def sorbet_runtime_constants: -> ::Hash[Symbol, top]
|
|
184
|
+
|
|
185
|
+
def const_missing: (Symbol name) -> void
|
|
186
|
+
|
|
187
|
+
def sorbet_constant_defined?: (Symbol name) -> bool
|
|
188
|
+
|
|
189
|
+
def define_sorbet_constant!: (Symbol name) { -> top } -> void
|
|
190
|
+
|
|
191
|
+
def to_sorbet_type: -> top
|
|
192
|
+
|
|
193
|
+
def self.to_sorbet_type: (
|
|
194
|
+
Handinger::Internal::Util::SorbetRuntimeSupport | top `type`
|
|
195
|
+
) -> top
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module Handinger
|
|
2
|
+
module Models
|
|
3
|
+
type create_worker =
|
|
4
|
+
{
|
|
5
|
+
input: String,
|
|
6
|
+
budget: Handinger::Models::CreateWorker::budget,
|
|
7
|
+
stream: bool
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class CreateWorker < Handinger::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor input: String
|
|
12
|
+
|
|
13
|
+
attr_reader budget: Handinger::Models::CreateWorker::budget?
|
|
14
|
+
|
|
15
|
+
def budget=: (
|
|
16
|
+
Handinger::Models::CreateWorker::budget
|
|
17
|
+
) -> Handinger::Models::CreateWorker::budget
|
|
18
|
+
|
|
19
|
+
attr_reader stream: bool?
|
|
20
|
+
|
|
21
|
+
def stream=: (bool) -> bool
|
|
22
|
+
|
|
23
|
+
def initialize: (
|
|
24
|
+
input: String,
|
|
25
|
+
?budget: Handinger::Models::CreateWorker::budget,
|
|
26
|
+
?stream: bool
|
|
27
|
+
) -> void
|
|
28
|
+
|
|
29
|
+
def to_hash: -> {
|
|
30
|
+
input: String,
|
|
31
|
+
budget: Handinger::Models::CreateWorker::budget,
|
|
32
|
+
stream: bool
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type budget = :low | :standard | :high | :unlimited
|
|
36
|
+
|
|
37
|
+
module Budget
|
|
38
|
+
extend Handinger::Internal::Type::Enum
|
|
39
|
+
|
|
40
|
+
LOW: :low
|
|
41
|
+
STANDARD: :standard
|
|
42
|
+
HIGH: :high
|
|
43
|
+
UNLIMITED: :unlimited
|
|
44
|
+
|
|
45
|
+
def self?.values: -> ::Array[Handinger::Models::CreateWorker::budget]
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|