firecrawl-sdk 1.11.0 → 1.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 641011f5718ad4fecf09861e420a819375e7c64749e4e9e917df7e8074ac40d9
4
- data.tar.gz: 83a88e47d5d6ee4fc9fc58ff6c13aa4f5d9bcee2617301d5b32f0a794b831616
3
+ metadata.gz: d608bb13154ad02ebe2a4925c4c12674b9a0d6160a20af3357fc882846b82a45
4
+ data.tar.gz: d8c167c5fe3709c140a2f97f1dc6e4bbb12aa9dcfa88d14f921e59ee4d6c8ca5
5
5
  SHA512:
6
- metadata.gz: 77b5914d46ba55d1648118c6f2a3bf0a172e53fe674ef670cc3dd58de128b4766b43b7f420c7998b721d1b2fda156d938c9514758bdc34a2c2e9175a094b8ec7
7
- data.tar.gz: e3bf73d11c0be846bede682d52da8c5349b436e9654f9c921b29dc010f291d21662e16187a4d7845f934bc5818ca4d357824e39ff08b3e1f93b5b44fd5d81b10
6
+ metadata.gz: 61230d82a359bbd4334b3bab3c8c7863ca27e1dba5f0a4781b5672b5108fb7afaeb2e85d573f8247a8f1df93a3472921820b36ecf18c26c04e410384780f292b
7
+ data.tar.gz: c0172fda9bc21d6fa4132ebc9b6e606cb39a9ec9a8bc9276d0d44906b1ca012ad83a5500e37984f58b1d47f84f608c68363d81f2a32788187fbbbdda359d4d97
@@ -13,6 +13,9 @@ module Firecrawl
13
13
 
14
14
  def initialize(**kwargs)
15
15
  FIELDS.each { |f| instance_variable_set(:"@#{f}", kwargs[f]) }
16
+ if audit_metadata && !audit_metadata.is_a?(AuditMetadata)
17
+ raise ArgumentError, "audit_metadata must be an AuditMetadata"
18
+ end
16
19
  raise ArgumentError, "Agent prompt is required" if prompt.nil? || prompt.empty?
17
20
  end
18
21
 
@@ -26,7 +29,7 @@ module Firecrawl
26
29
  "strictConstrainToURLs" => strict_constrain_to_urls,
27
30
  "model" => model,
28
31
  "webhook" => webhook.is_a?(Hash) ? webhook : webhook&.to_h,
29
- "auditMetadata" => audit_metadata,
32
+ "auditMetadata" => audit_metadata&.to_h,
30
33
  }.compact
31
34
  end
32
35
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Firecrawl
4
+ module Models
5
+ # User attribution included with SIEM logging events.
6
+ class AuditMetadata
7
+ attr_reader :username
8
+
9
+ def initialize(username:)
10
+ raise ArgumentError, "username must be a string" unless username.is_a?(String)
11
+
12
+ @username = username
13
+ end
14
+
15
+ def to_h
16
+ { "username" => username }
17
+ end
18
+ end
19
+ end
20
+ end
@@ -13,6 +13,9 @@ module Firecrawl
13
13
 
14
14
  def initialize(**kwargs)
15
15
  FIELDS.each { |f| instance_variable_set(:"@#{f}", kwargs[f]) }
16
+ if audit_metadata && !audit_metadata.is_a?(AuditMetadata)
17
+ raise ArgumentError, "audit_metadata must be an AuditMetadata"
18
+ end
16
19
  end
17
20
 
18
21
  def to_h
@@ -25,7 +28,7 @@ module Firecrawl
25
28
  "timeout" => timeout,
26
29
  "integration" => integration,
27
30
  "location" => location.is_a?(Hash) ? location : location&.to_h,
28
- "auditMetadata" => audit_metadata,
31
+ "auditMetadata" => audit_metadata&.to_h,
29
32
  }.compact
30
33
  end
31
34
  end
@@ -20,6 +20,9 @@ module Firecrawl
20
20
 
21
21
  def initialize(**kwargs)
22
22
  FIELDS.each { |f| instance_variable_set(:"@#{f}", kwargs[f]) }
23
+ if audit_metadata && !audit_metadata.is_a?(AuditMetadata)
24
+ raise ArgumentError, "audit_metadata must be an AuditMetadata"
25
+ end
23
26
 
24
27
  validate!
25
28
  end
@@ -40,7 +43,7 @@ module Firecrawl
40
43
  "integration" => integration,
41
44
  "redactPII" => redact_pii,
42
45
  "jsonOptions" => json_options.is_a?(Hash) ? json_options : json_options&.to_h,
43
- "auditMetadata" => audit_metadata,
46
+ "auditMetadata" => audit_metadata&.to_h,
44
47
  }.compact
45
48
  end
46
49
 
@@ -15,6 +15,9 @@ module Firecrawl
15
15
 
16
16
  def initialize(**kwargs)
17
17
  FIELDS.each { |f| instance_variable_set(:"@#{f}", kwargs[f]) }
18
+ if audit_metadata && !audit_metadata.is_a?(AuditMetadata)
19
+ raise ArgumentError, "audit_metadata must be an AuditMetadata"
20
+ end
18
21
  @skip_tls_verification = false if @skip_tls_verification.nil?
19
22
  end
20
23
 
@@ -40,7 +43,7 @@ module Firecrawl
40
43
  "lockdown" => lockdown,
41
44
  "redactPII" => redact_pii,
42
45
  "integration" => integration,
43
- "auditMetadata" => audit_metadata,
46
+ "auditMetadata" => audit_metadata&.to_h,
44
47
  }.compact
45
48
  end
46
49
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Firecrawl
4
- VERSION = "1.11.0"
4
+ VERSION = "1.11.1"
5
5
  end
data/lib/firecrawl.rb CHANGED
@@ -7,6 +7,7 @@ require_relative "firecrawl/models/query_format"
7
7
  require_relative "firecrawl/models/product_profile"
8
8
  require_relative "firecrawl/models/menu_profile"
9
9
  require_relative "firecrawl/models/document"
10
+ require_relative "firecrawl/models/audit_metadata"
10
11
  require_relative "firecrawl/models/scrape_options"
11
12
  require_relative "firecrawl/models/crawl_options"
12
13
  require_relative "firecrawl/models/crawl_response"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firecrawl-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firecrawl
@@ -27,6 +27,7 @@ files:
27
27
  - lib/firecrawl/models/agent_options.rb
28
28
  - lib/firecrawl/models/agent_response.rb
29
29
  - lib/firecrawl/models/agent_status_response.rb
30
+ - lib/firecrawl/models/audit_metadata.rb
30
31
  - lib/firecrawl/models/batch_scrape_job.rb
31
32
  - lib/firecrawl/models/batch_scrape_options.rb
32
33
  - lib/firecrawl/models/batch_scrape_response.rb