fal 0.0.3 → 0.1.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.
@@ -0,0 +1,88 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ module Fal
5
+ class Request
6
+ sig { returns(String) }
7
+ def id; end
8
+
9
+ sig { returns(String) }
10
+ def status; end
11
+
12
+ sig { returns(T.nilable(Integer)) }
13
+ def queue_position; end
14
+
15
+ sig { returns(T.untyped) }
16
+ def logs; end
17
+
18
+ sig { returns(T.untyped) }
19
+ def response; end
20
+
21
+ sig { returns(String) }
22
+ def endpoint_id; end
23
+
24
+ sig do
25
+ params(
26
+ attributes: T.untyped,
27
+ endpoint_id: String,
28
+ client: Fal::Client
29
+ ).void
30
+ end
31
+ def initialize(attributes, endpoint_id:, client:); end
32
+
33
+ class << self
34
+ sig do
35
+ params(
36
+ endpoint_id: String,
37
+ input: T.untyped,
38
+ client: Fal::Client,
39
+ webhook_url: T.nilable(String)
40
+ ).returns(Fal::Request)
41
+ end
42
+ def create!(endpoint_id:, input:, client:, webhook_url: nil); end
43
+
44
+ sig do
45
+ params(
46
+ id: String,
47
+ endpoint_id: String,
48
+ client: Fal::Client,
49
+ logs: T::Boolean
50
+ ).returns(Fal::Request)
51
+ end
52
+ def find_by!(id:, endpoint_id:, client:, logs: false); end
53
+
54
+ sig do
55
+ params(
56
+ endpoint_id: String,
57
+ input: T.untyped,
58
+ client: Fal::Client,
59
+ block: T.nilable(T.proc.params(arg0: T.untyped).void)
60
+ ).returns(Fal::Request)
61
+ end
62
+ def stream!(endpoint_id:, input:, client: Fal.client, &block); end
63
+ end
64
+
65
+ sig { returns(String) }
66
+ def endpoint_id_without_subpath; end
67
+
68
+ sig { params(logs: T::Boolean).returns(Fal::Request) }
69
+ def reload!(logs: false); end
70
+
71
+ sig { returns(T.untyped) }
72
+ def cancel!; end
73
+
74
+ sig { returns(T::Boolean) }
75
+ def in_queue?; end
76
+
77
+ sig { returns(T::Boolean) }
78
+ def in_progress?; end
79
+
80
+ sig { returns(T::Boolean) }
81
+ def completed?; end
82
+
83
+ private
84
+
85
+ sig { params(attributes: T.untyped).void }
86
+ def reset_attributes(attributes); end
87
+ end
88
+ end
@@ -0,0 +1,37 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ module Fal
5
+ class Stream
6
+ sig { returns(String) }
7
+ def path; end
8
+
9
+ sig do
10
+ params(
11
+ path: String,
12
+ input: T.untyped,
13
+ client: Fal::Client
14
+ ).void
15
+ end
16
+ def initialize(path:, input:, client: Fal.client); end
17
+
18
+ sig do
19
+ params(block: T.proc.params(arg0: T.untyped)
20
+ .void).void
21
+ end
22
+ def each(&block); end
23
+
24
+ class SSEDecoder
25
+ sig { void }
26
+ def initialize; end
27
+
28
+ sig { params(line: String).returns(T.untyped) }
29
+ def decode(line); end
30
+
31
+ private
32
+
33
+ sig { returns(T.untyped) }
34
+ def flush_event; end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,6 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ module Fal
5
+ VERSION = T.let(T.unsafe(nil), String)
6
+ end
@@ -0,0 +1,61 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ module Fal
5
+ class WebhookRequest
6
+ sig { returns(T.nilable(String)) }
7
+ def request_id; end
8
+
9
+ sig { returns(T.nilable(String)) }
10
+ def gateway_request_id; end
11
+
12
+ sig { returns(T.nilable(String)) }
13
+ def status; end
14
+
15
+ sig { returns(T.nilable(String)) }
16
+ def error; end
17
+
18
+ sig { returns(T.untyped) }
19
+ def response; end
20
+
21
+ sig { returns(T.untyped) }
22
+ def logs; end
23
+
24
+ sig { returns(T.untyped) }
25
+ def metrics; end
26
+
27
+ sig { returns(T.untyped) }
28
+ def raw; end
29
+
30
+ sig { params(attributes: T.untyped).void }
31
+ def initialize(attributes); end
32
+
33
+ class << self
34
+ sig { params(json: String).returns(Fal::WebhookRequest) }
35
+ def from_json(json); end
36
+
37
+ sig { params(request: T.untyped).returns(Fal::WebhookRequest) }
38
+ def from_rack_request(request); end
39
+
40
+ sig { params(payload: T.untyped).returns(Fal::WebhookRequest) }
41
+ def from_hash(payload); end
42
+ end
43
+
44
+ sig { returns(T::Boolean) }
45
+ def success?; end
46
+
47
+ sig { returns(T::Boolean) }
48
+ def error?; end
49
+
50
+ sig { returns(T.untyped) }
51
+ def payload; end
52
+
53
+ sig { returns(T.untyped) }
54
+ def error_detail; end
55
+
56
+ private
57
+
58
+ sig { params(attributes: T.untyped).void }
59
+ def reset_attributes(attributes); end
60
+ end
61
+ end
data/sorbet/config ADDED
@@ -0,0 +1,2 @@
1
+ --dir=rbi/
2
+ --ignore=test/
@@ -0,0 +1,2 @@
1
+ *
2
+ !.gitignore
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Player
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-10-04 00:00:00.000000000 Z
11
+ date: 2025-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -42,10 +42,24 @@ files:
42
42
  - fal.gemspec
43
43
  - lib/fal.rb
44
44
  - lib/fal/client.rb
45
+ - lib/fal/model.rb
46
+ - lib/fal/price.rb
47
+ - lib/fal/price_estimate.rb
45
48
  - lib/fal/request.rb
46
49
  - lib/fal/stream.rb
47
50
  - lib/fal/version.rb
48
51
  - lib/fal/webhook_request.rb
52
+ - rbi/fal/client.rbi
53
+ - rbi/fal/fal.rbi
54
+ - rbi/fal/model.rbi
55
+ - rbi/fal/price.rbi
56
+ - rbi/fal/price_estimate.rbi
57
+ - rbi/fal/request.rbi
58
+ - rbi/fal/stream.rbi
59
+ - rbi/fal/version.rbi
60
+ - rbi/fal/webhook_request.rbi
61
+ - sorbet/config
62
+ - sorbet/rbi/.gitignore
49
63
  homepage: https://github.com/851-labs/fal
50
64
  licenses:
51
65
  - MIT