berrycrawl 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.
- checksums.yaml +7 -0
- data/.fern/metadata.json +12 -0
- data/.rubocop.yml +103 -0
- data/CONTRIBUTING.md +120 -0
- data/LICENSE +17 -0
- data/README.md +183 -0
- data/Rakefile +20 -0
- data/custom.gemspec.rb +16 -0
- data/lib/Berrycrawl/account/client.rb +44 -0
- data/lib/Berrycrawl/brand/client.rb +48 -0
- data/lib/Berrycrawl/brand/types/brand_dto.rb +15 -0
- data/lib/Berrycrawl/client.rb +268 -0
- data/lib/Berrycrawl/environment.rb +7 -0
- data/lib/Berrycrawl/errors/api_error.rb +8 -0
- data/lib/Berrycrawl/errors/client_error.rb +17 -0
- data/lib/Berrycrawl/errors/redirect_error.rb +8 -0
- data/lib/Berrycrawl/errors/response_error.rb +42 -0
- data/lib/Berrycrawl/errors/server_error.rb +11 -0
- data/lib/Berrycrawl/errors/timeout_error.rb +8 -0
- data/lib/Berrycrawl/internal/errors/constraint_error.rb +10 -0
- data/lib/Berrycrawl/internal/errors/type_error.rb +10 -0
- data/lib/Berrycrawl/internal/http/base_request.rb +51 -0
- data/lib/Berrycrawl/internal/http/raw_client.rb +252 -0
- data/lib/Berrycrawl/internal/iterators/cursor_item_iterator.rb +28 -0
- data/lib/Berrycrawl/internal/iterators/cursor_page_iterator.rb +63 -0
- data/lib/Berrycrawl/internal/iterators/item_iterator.rb +65 -0
- data/lib/Berrycrawl/internal/iterators/offset_item_iterator.rb +30 -0
- data/lib/Berrycrawl/internal/iterators/offset_page_iterator.rb +103 -0
- data/lib/Berrycrawl/internal/json/request.rb +41 -0
- data/lib/Berrycrawl/internal/json/serializable.rb +25 -0
- data/lib/Berrycrawl/internal/multipart/multipart_encoder.rb +141 -0
- data/lib/Berrycrawl/internal/multipart/multipart_form_data.rb +78 -0
- data/lib/Berrycrawl/internal/multipart/multipart_form_data_part.rb +51 -0
- data/lib/Berrycrawl/internal/multipart/multipart_request.rb +40 -0
- data/lib/Berrycrawl/internal/types/array.rb +47 -0
- data/lib/Berrycrawl/internal/types/boolean.rb +34 -0
- data/lib/Berrycrawl/internal/types/enum.rb +56 -0
- data/lib/Berrycrawl/internal/types/hash.rb +36 -0
- data/lib/Berrycrawl/internal/types/model/field.rb +38 -0
- data/lib/Berrycrawl/internal/types/model.rb +208 -0
- data/lib/Berrycrawl/internal/types/type.rb +35 -0
- data/lib/Berrycrawl/internal/types/union.rb +161 -0
- data/lib/Berrycrawl/internal/types/unknown.rb +15 -0
- data/lib/Berrycrawl/internal/types/utils.rb +116 -0
- data/lib/Berrycrawl/jobs/client.rb +127 -0
- data/lib/Berrycrawl/jobs/types/cancel_jobs_request.rb +11 -0
- data/lib/Berrycrawl/jobs/types/get_jobs_request.rb +15 -0
- data/lib/Berrycrawl/jobs/types/list_jobs_request.rb +17 -0
- data/lib/Berrycrawl/jobs/types/list_jobs_request_status.rb +17 -0
- data/lib/Berrycrawl/jobs/types/list_jobs_request_type.rb +14 -0
- data/lib/Berrycrawl/types/account_response.rb +11 -0
- data/lib/Berrycrawl/types/account_response_data.rb +21 -0
- data/lib/Berrycrawl/types/account_response_data_plan.rb +17 -0
- data/lib/Berrycrawl/types/account_response_data_queue.rb +11 -0
- data/lib/Berrycrawl/types/action_dto.rb +21 -0
- data/lib/Berrycrawl/types/action_dto_direction.rb +12 -0
- data/lib/Berrycrawl/types/action_dto_type.rb +18 -0
- data/lib/Berrycrawl/types/agent_config_dto.rb +11 -0
- data/lib/Berrycrawl/types/agent_config_dto_mode.rb +12 -0
- data/lib/Berrycrawl/types/brand_asset.rb +17 -0
- data/lib/Berrycrawl/types/brand_profile.rb +27 -0
- data/lib/Berrycrawl/types/brand_profile_colors_item.rb +11 -0
- data/lib/Berrycrawl/types/brand_profile_fonts_item.rb +11 -0
- data/lib/Berrycrawl/types/brand_profile_socials_item.rb +11 -0
- data/lib/Berrycrawl/types/brand_response.rb +11 -0
- data/lib/Berrycrawl/types/brand_response_data.rb +11 -0
- data/lib/Berrycrawl/types/brand_response_data_meta.rb +15 -0
- data/lib/Berrycrawl/types/cancel_job_response.rb +11 -0
- data/lib/Berrycrawl/types/cancel_job_response_data.rb +11 -0
- data/lib/Berrycrawl/types/change_tracking_format_dto.rb +15 -0
- data/lib/Berrycrawl/types/change_tracking_format_dto_type.rb +11 -0
- data/lib/Berrycrawl/types/crawl_dto.rb +41 -0
- data/lib/Berrycrawl/types/crawl_dto_sitemap.rb +13 -0
- data/lib/Berrycrawl/types/extract_dto.rb +29 -0
- data/lib/Berrycrawl/types/extract_webhook_config_dto.rb +15 -0
- data/lib/Berrycrawl/types/job_created_response.rb +15 -0
- data/lib/Berrycrawl/types/job_response.rb +11 -0
- data/lib/Berrycrawl/types/job_response_data.rb +37 -0
- data/lib/Berrycrawl/types/job_response_data_errors_item.rb +11 -0
- data/lib/Berrycrawl/types/job_summary.rb +29 -0
- data/lib/Berrycrawl/types/job_summary_type.rb +12 -0
- data/lib/Berrycrawl/types/json_format_dto.rb +13 -0
- data/lib/Berrycrawl/types/json_format_dto_type.rb +11 -0
- data/lib/Berrycrawl/types/list_jobs_response.rb +11 -0
- data/lib/Berrycrawl/types/list_jobs_response_data.rb +11 -0
- data/lib/Berrycrawl/types/list_webhooks_response.rb +11 -0
- data/lib/Berrycrawl/types/location_dto.rb +11 -0
- data/lib/Berrycrawl/types/map_dto.rb +23 -0
- data/lib/Berrycrawl/types/map_dto_sitemap.rb +13 -0
- data/lib/Berrycrawl/types/map_link.rb +13 -0
- data/lib/Berrycrawl/types/map_response.rb +15 -0
- data/lib/Berrycrawl/types/message_response.rb +11 -0
- data/lib/Berrycrawl/types/pagination.rb +15 -0
- data/lib/Berrycrawl/types/parse_dto.rb +11 -0
- data/lib/Berrycrawl/types/scrape_dto.rb +49 -0
- data/lib/Berrycrawl/types/scrape_dto_formats_item.rb +17 -0
- data/lib/Berrycrawl/types/scrape_dto_formats_item_zero.rb +18 -0
- data/lib/Berrycrawl/types/scrape_dto_proxy.rb +16 -0
- data/lib/Berrycrawl/types/scrape_metadata.rb +17 -0
- data/lib/Berrycrawl/types/scrape_response.rb +17 -0
- data/lib/Berrycrawl/types/scrape_response_credits.rb +9 -0
- data/lib/Berrycrawl/types/screenshot_clip_dto.rb +15 -0
- data/lib/Berrycrawl/types/screenshot_cookie_dto.rb +21 -0
- data/lib/Berrycrawl/types/screenshot_cookie_dto_same_site.rb +13 -0
- data/lib/Berrycrawl/types/screenshot_dto.rb +79 -0
- data/lib/Berrycrawl/types/screenshot_dto_color_scheme.rb +12 -0
- data/lib/Berrycrawl/types/screenshot_dto_device.rb +15 -0
- data/lib/Berrycrawl/types/screenshot_dto_format.rb +13 -0
- data/lib/Berrycrawl/types/screenshot_dto_full_page_algorithm.rb +13 -0
- data/lib/Berrycrawl/types/screenshot_dto_proxy.rb +16 -0
- data/lib/Berrycrawl/types/screenshot_dto_response_format.rb +12 -0
- data/lib/Berrycrawl/types/screenshot_dto_scale.rb +12 -0
- data/lib/Berrycrawl/types/screenshot_dto_wait_until.rb +13 -0
- data/lib/Berrycrawl/types/screenshot_location_dto.rb +11 -0
- data/lib/Berrycrawl/types/screenshot_viewport_dto.rb +11 -0
- data/lib/Berrycrawl/types/search_dto.rb +23 -0
- data/lib/Berrycrawl/types/search_response.rb +19 -0
- data/lib/Berrycrawl/types/search_response_provider.rb +11 -0
- data/lib/Berrycrawl/types/search_result.rb +19 -0
- data/lib/Berrycrawl/types/search_result_provider.rb +11 -0
- data/lib/Berrycrawl/types/summary_format_dto.rb +11 -0
- data/lib/Berrycrawl/types/summary_format_dto_type.rb +11 -0
- data/lib/Berrycrawl/types/test_webhook_response.rb +15 -0
- data/lib/Berrycrawl/types/webhook.rb +23 -0
- data/lib/Berrycrawl/types/webhook_config_dto.rb +15 -0
- data/lib/Berrycrawl/types/webhook_response.rb +11 -0
- data/lib/Berrycrawl/version.rb +5 -0
- data/lib/Berrycrawl/webhooks/client.rb +214 -0
- data/lib/Berrycrawl/webhooks/types/create_webhook_dto.rb +13 -0
- data/lib/Berrycrawl/webhooks/types/delete_webhooks_request.rb +11 -0
- data/lib/Berrycrawl/webhooks/types/get_webhooks_request.rb +11 -0
- data/lib/Berrycrawl/webhooks/types/test_webhook_dto.rb +15 -0
- data/lib/Berrycrawl/webhooks/types/update_webhook_dto.rb +17 -0
- data/lib/Berrycrawl.rb +130 -0
- data/reference.md +1759 -0
- metadata +179 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Jobs
|
|
5
|
+
module Types
|
|
6
|
+
class ListJobsRequest < Internal::Types::Model
|
|
7
|
+
field :type, -> { Berrycrawl::Jobs::Types::ListJobsRequestType }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :status, -> { Berrycrawl::Jobs::Types::ListJobsRequestStatus }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :page, -> { Integer }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Jobs
|
|
5
|
+
module Types
|
|
6
|
+
module ListJobsRequestStatus
|
|
7
|
+
extend Berrycrawl::Internal::Types::Enum
|
|
8
|
+
|
|
9
|
+
PENDING = "PENDING"
|
|
10
|
+
RUNNING = "RUNNING"
|
|
11
|
+
COMPLETED = "COMPLETED"
|
|
12
|
+
FAILED = "FAILED"
|
|
13
|
+
CANCELLED = "CANCELLED"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class AccountResponse < Internal::Types::Model
|
|
6
|
+
field :data, -> { Berrycrawl::Types::AccountResponseData }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class AccountResponseData < Internal::Types::Model
|
|
6
|
+
field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
|
|
7
|
+
|
|
8
|
+
field :credits, -> { Integer }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :email, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :lifetime_spend_usd, -> { Integer }, optional: false, nullable: false, api_name: "lifetimeSpendUsd"
|
|
15
|
+
|
|
16
|
+
field :plan, -> { Berrycrawl::Types::AccountResponseDataPlan }, optional: false, nullable: false
|
|
17
|
+
|
|
18
|
+
field :queue, -> { Berrycrawl::Types::AccountResponseDataQueue }, optional: false, nullable: false
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class AccountResponseDataPlan < Internal::Types::Model
|
|
6
|
+
field :concurrency, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :queue_limit, -> { Integer }, optional: false, nullable: false, api_name: "queueLimit"
|
|
13
|
+
|
|
14
|
+
field :rate_limit_per_minute, -> { Integer }, optional: false, nullable: false, api_name: "rateLimitPerMinute"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class AccountResponseDataQueue < Internal::Types::Model
|
|
6
|
+
field :active, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :waiting, -> { Integer }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class ActionDto < Internal::Types::Model
|
|
6
|
+
field :amount, -> { Integer }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :direction, -> { Berrycrawl::Types::ActionDtoDirection }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :key, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :milliseconds, -> { Integer }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :selector, -> { String }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :text, -> { String }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :type, -> { Berrycrawl::Types::ActionDtoType }, optional: false, nullable: false
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
module ActionDtoType
|
|
6
|
+
extend Berrycrawl::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
WAIT = "wait"
|
|
9
|
+
CLICK = "click"
|
|
10
|
+
WRITE = "write"
|
|
11
|
+
PRESS = "press"
|
|
12
|
+
SCROLL = "scroll"
|
|
13
|
+
SCRAPE = "scrape"
|
|
14
|
+
SCREENSHOT = "screenshot"
|
|
15
|
+
PDF = "pdf"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class AgentConfigDto < Internal::Types::Model
|
|
6
|
+
field :mode, -> { Berrycrawl::Types::AgentConfigDtoMode }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :model, -> { String }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class BrandAsset < Internal::Types::Model
|
|
6
|
+
field :height, -> { Integer }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :theme, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :type, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :url, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :width, -> { Integer }, optional: true, nullable: false
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class BrandProfile < Internal::Types::Model
|
|
6
|
+
field :colors, -> { Internal::Types::Array[Berrycrawl::Types::BrandProfileColorsItem] }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :domain, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :fonts, -> { Internal::Types::Array[Berrycrawl::Types::BrandProfileFontsItem] }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :images, -> { Internal::Types::Array[Berrycrawl::Types::BrandAsset] }, optional: false, nullable: false
|
|
15
|
+
|
|
16
|
+
field :language, -> { String }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :logos, -> { Internal::Types::Array[Berrycrawl::Types::BrandAsset] }, optional: false, nullable: false
|
|
19
|
+
|
|
20
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
21
|
+
|
|
22
|
+
field :socials, -> { Internal::Types::Array[Berrycrawl::Types::BrandProfileSocialsItem] }, optional: false, nullable: false
|
|
23
|
+
|
|
24
|
+
field :tagline, -> { String }, optional: true, nullable: false
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class BrandProfileColorsItem < Internal::Types::Model
|
|
6
|
+
field :hex, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class BrandProfileFontsItem < Internal::Types::Model
|
|
6
|
+
field :family, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :weights, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class BrandProfileSocialsItem < Internal::Types::Model
|
|
6
|
+
field :network, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :url, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class BrandResponse < Internal::Types::Model
|
|
6
|
+
field :data, -> { Berrycrawl::Types::BrandResponseData }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class BrandResponseData < Internal::Types::Model
|
|
6
|
+
field :brand, -> { Berrycrawl::Types::BrandProfile }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :meta, -> { Berrycrawl::Types::BrandResponseDataMeta }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class BrandResponseDataMeta < Internal::Types::Model
|
|
6
|
+
field :cached, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :credits_used, -> { Integer }, optional: false, nullable: false, api_name: "creditsUsed"
|
|
9
|
+
|
|
10
|
+
field :fetched_at, -> { String }, optional: false, nullable: false, api_name: "fetchedAt"
|
|
11
|
+
|
|
12
|
+
field :source_url, -> { String }, optional: false, nullable: false, api_name: "sourceUrl"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class CancelJobResponse < Internal::Types::Model
|
|
6
|
+
field :data, -> { Berrycrawl::Types::CancelJobResponseData }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class CancelJobResponseData < Internal::Types::Model
|
|
6
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :status, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class ChangeTrackingFormatDto < Internal::Types::Model
|
|
6
|
+
field :modes, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :schema, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :tag, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :type, -> { Berrycrawl::Types::ChangeTrackingFormatDtoType }, optional: false, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class CrawlDto < Internal::Types::Model
|
|
6
|
+
field :allow_external_links, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "allowExternalLinks"
|
|
7
|
+
|
|
8
|
+
field :allow_subdomains, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "allowSubdomains"
|
|
9
|
+
|
|
10
|
+
field :crawl_entire_domain, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "crawlEntireDomain"
|
|
11
|
+
|
|
12
|
+
field :deduplicate_similar_ur_ls, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "deduplicateSimilarURLs"
|
|
13
|
+
|
|
14
|
+
field :delay, -> { Integer }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :exclude_paths, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "excludePaths"
|
|
17
|
+
|
|
18
|
+
field :ignore_query_parameters, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "ignoreQueryParameters"
|
|
19
|
+
|
|
20
|
+
field :include_paths, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "includePaths"
|
|
21
|
+
|
|
22
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
23
|
+
|
|
24
|
+
field :max_concurrency, -> { Integer }, optional: true, nullable: false, api_name: "maxConcurrency"
|
|
25
|
+
|
|
26
|
+
field :max_discovery_depth, -> { Integer }, optional: true, nullable: false, api_name: "maxDiscoveryDepth"
|
|
27
|
+
|
|
28
|
+
field :prompt, -> { String }, optional: true, nullable: false
|
|
29
|
+
|
|
30
|
+
field :scrape_options, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false, api_name: "scrapeOptions"
|
|
31
|
+
|
|
32
|
+
field :sitemap, -> { Berrycrawl::Types::CrawlDtoSitemap }, optional: true, nullable: false
|
|
33
|
+
|
|
34
|
+
field :url, -> { String }, optional: false, nullable: false
|
|
35
|
+
|
|
36
|
+
field :webhook, -> { Berrycrawl::Types::WebhookConfigDto }, optional: true, nullable: false
|
|
37
|
+
|
|
38
|
+
field :zero_data_retention, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "zeroDataRetention"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class ExtractDto < Internal::Types::Model
|
|
6
|
+
field :agent, -> { Berrycrawl::Types::AgentConfigDto }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :enable_web_search, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "enableWebSearch"
|
|
9
|
+
|
|
10
|
+
field :ignore_invalid_ur_ls, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "ignoreInvalidURLs"
|
|
11
|
+
|
|
12
|
+
field :ignore_sitemap, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "ignoreSitemap"
|
|
13
|
+
|
|
14
|
+
field :include_subdomains, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "includeSubdomains"
|
|
15
|
+
|
|
16
|
+
field :prompt, -> { String }, optional: false, nullable: false
|
|
17
|
+
|
|
18
|
+
field :schema, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
19
|
+
|
|
20
|
+
field :scrape_options, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false, api_name: "scrapeOptions"
|
|
21
|
+
|
|
22
|
+
field :show_sources, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "showSources"
|
|
23
|
+
|
|
24
|
+
field :urls, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
25
|
+
|
|
26
|
+
field :webhook, -> { Berrycrawl::Types::ExtractWebhookConfigDto }, optional: true, nullable: false
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class ExtractWebhookConfigDto < Internal::Types::Model
|
|
6
|
+
field :events, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :secret, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :url, -> { String }, optional: false, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class JobCreatedResponse < Internal::Types::Model
|
|
6
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :invalid_ur_ls, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "invalidURLs"
|
|
9
|
+
|
|
10
|
+
field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :url, -> { String }, optional: false, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class JobResponse < Internal::Types::Model
|
|
6
|
+
field :data, -> { Berrycrawl::Types::JobResponseData }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class JobResponseData < Internal::Types::Model
|
|
6
|
+
field :completed, -> { Integer }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :completed_at, -> { String }, optional: true, nullable: false, api_name: "completedAt"
|
|
9
|
+
|
|
10
|
+
field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
|
|
11
|
+
|
|
12
|
+
field :credits_used, -> { Integer }, optional: false, nullable: false, api_name: "creditsUsed"
|
|
13
|
+
|
|
14
|
+
field :error, -> { String }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :failed, -> { Integer }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
19
|
+
|
|
20
|
+
field :started_at, -> { String }, optional: true, nullable: false, api_name: "startedAt"
|
|
21
|
+
|
|
22
|
+
field :status, -> { String }, optional: false, nullable: false
|
|
23
|
+
|
|
24
|
+
field :total, -> { Integer }, optional: false, nullable: false
|
|
25
|
+
|
|
26
|
+
field :type, -> { Berrycrawl::Types::JobSummaryType }, optional: false, nullable: false
|
|
27
|
+
|
|
28
|
+
field :errors, -> { Internal::Types::Array[Berrycrawl::Types::JobResponseDataErrorsItem] }, optional: false, nullable: false
|
|
29
|
+
|
|
30
|
+
field :result, -> { Object }, optional: true, nullable: false
|
|
31
|
+
|
|
32
|
+
field :result_pagination, -> { Berrycrawl::Types::Pagination }, optional: false, nullable: false, api_name: "resultPagination"
|
|
33
|
+
|
|
34
|
+
field :results, -> { Internal::Types::Array[Internal::Types::Hash[String, Object]] }, optional: false, nullable: false
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class JobResponseDataErrorsItem < Internal::Types::Model
|
|
6
|
+
field :error, -> { String }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :url, -> { String }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class JobSummary < Internal::Types::Model
|
|
6
|
+
field :completed, -> { Integer }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :completed_at, -> { String }, optional: true, nullable: false, api_name: "completedAt"
|
|
9
|
+
|
|
10
|
+
field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
|
|
11
|
+
|
|
12
|
+
field :credits_used, -> { Integer }, optional: false, nullable: false, api_name: "creditsUsed"
|
|
13
|
+
|
|
14
|
+
field :error, -> { String }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :failed, -> { Integer }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
19
|
+
|
|
20
|
+
field :started_at, -> { String }, optional: true, nullable: false, api_name: "startedAt"
|
|
21
|
+
|
|
22
|
+
field :status, -> { String }, optional: false, nullable: false
|
|
23
|
+
|
|
24
|
+
field :total, -> { Integer }, optional: false, nullable: false
|
|
25
|
+
|
|
26
|
+
field :type, -> { Berrycrawl::Types::JobSummaryType }, optional: false, nullable: false
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class JSONFormatDto < Internal::Types::Model
|
|
6
|
+
field :prompt, -> { String }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :schema, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :type, -> { Berrycrawl::Types::JSONFormatDtoType }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class ListJobsResponse < Internal::Types::Model
|
|
6
|
+
field :data, -> { Berrycrawl::Types::ListJobsResponseData }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Berrycrawl
|
|
4
|
+
module Types
|
|
5
|
+
class ListJobsResponseData < Internal::Types::Model
|
|
6
|
+
field :jobs, -> { Internal::Types::Array[Berrycrawl::Types::JobSummary] }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :pagination, -> { Berrycrawl::Types::Pagination }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|