context.dev 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 +244 -0
- data/SECURITY.md +27 -0
- data/lib/context_dev/client.rb +74 -0
- data/lib/context_dev/errors.rb +228 -0
- data/lib/context_dev/file_part.rb +58 -0
- data/lib/context_dev/internal/transport/base_client.rb +573 -0
- data/lib/context_dev/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/context_dev/internal/type/array_of.rb +168 -0
- data/lib/context_dev/internal/type/base_model.rb +531 -0
- data/lib/context_dev/internal/type/base_page.rb +55 -0
- data/lib/context_dev/internal/type/boolean.rb +77 -0
- data/lib/context_dev/internal/type/converter.rb +327 -0
- data/lib/context_dev/internal/type/enum.rb +131 -0
- data/lib/context_dev/internal/type/file_input.rb +111 -0
- data/lib/context_dev/internal/type/hash_of.rb +188 -0
- data/lib/context_dev/internal/type/request_parameters.rb +42 -0
- data/lib/context_dev/internal/type/union.rb +237 -0
- data/lib/context_dev/internal/type/unknown.rb +81 -0
- data/lib/context_dev/internal/util.rb +951 -0
- data/lib/context_dev/internal.rb +20 -0
- data/lib/context_dev/models/brand_ai_product_params.rb +34 -0
- data/lib/context_dev/models/brand_ai_product_response.rb +193 -0
- data/lib/context_dev/models/brand_ai_products_params.rb +94 -0
- data/lib/context_dev/models/brand_ai_products_response.rb +160 -0
- data/lib/context_dev/models/brand_ai_query_params.rb +236 -0
- data/lib/context_dev/models/brand_ai_query_response.rb +98 -0
- data/lib/context_dev/models/brand_fonts_params.rb +36 -0
- data/lib/context_dev/models/brand_fonts_response.rb +100 -0
- data/lib/context_dev/models/brand_identify_from_transaction_params.rb +407 -0
- data/lib/context_dev/models/brand_identify_from_transaction_response.rb +854 -0
- data/lib/context_dev/models/brand_prefetch_by_email_params.rb +37 -0
- data/lib/context_dev/models/brand_prefetch_by_email_response.rb +33 -0
- data/lib/context_dev/models/brand_prefetch_params.rb +35 -0
- data/lib/context_dev/models/brand_prefetch_response.rb +33 -0
- data/lib/context_dev/models/brand_retrieve_by_email_params.rb +116 -0
- data/lib/context_dev/models/brand_retrieve_by_email_response.rb +851 -0
- data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +116 -0
- data/lib/context_dev/models/brand_retrieve_by_isin_response.rb +850 -0
- data/lib/context_dev/models/brand_retrieve_by_name_params.rb +115 -0
- data/lib/context_dev/models/brand_retrieve_by_name_response.rb +850 -0
- data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +204 -0
- data/lib/context_dev/models/brand_retrieve_by_ticker_response.rb +852 -0
- data/lib/context_dev/models/brand_retrieve_naics_params.rb +54 -0
- data/lib/context_dev/models/brand_retrieve_naics_response.rb +83 -0
- data/lib/context_dev/models/brand_retrieve_params.rb +117 -0
- data/lib/context_dev/models/brand_retrieve_response.rb +850 -0
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +35 -0
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +307 -0
- data/lib/context_dev/models/brand_screenshot_params.rb +103 -0
- data/lib/context_dev/models/brand_screenshot_response.rb +64 -0
- data/lib/context_dev/models/brand_styleguide_params.rb +70 -0
- data/lib/context_dev/models/brand_styleguide_response.rb +790 -0
- data/lib/context_dev/models/brand_web_scrape_html_params.rb +22 -0
- data/lib/context_dev/models/brand_web_scrape_html_response.rb +45 -0
- data/lib/context_dev/models/brand_web_scrape_images_params.rb +22 -0
- data/lib/context_dev/models/brand_web_scrape_images_response.rb +111 -0
- data/lib/context_dev/models/brand_web_scrape_md_params.rb +50 -0
- data/lib/context_dev/models/brand_web_scrape_md_response.rb +45 -0
- data/lib/context_dev/models/brand_web_scrape_sitemap_params.rb +26 -0
- data/lib/context_dev/models/brand_web_scrape_sitemap_response.rb +91 -0
- data/lib/context_dev/models.rb +81 -0
- data/lib/context_dev/request_options.rb +77 -0
- data/lib/context_dev/resources/brand.rb +654 -0
- data/lib/context_dev/version.rb +5 -0
- data/lib/context_dev.rb +96 -0
- data/manifest.yaml +17 -0
- data/rbi/context_dev/client.rbi +49 -0
- data/rbi/context_dev/errors.rbi +205 -0
- data/rbi/context_dev/file_part.rbi +37 -0
- data/rbi/context_dev/internal/transport/base_client.rbi +300 -0
- data/rbi/context_dev/internal/transport/pooled_net_requester.rbi +84 -0
- data/rbi/context_dev/internal/type/array_of.rbi +104 -0
- data/rbi/context_dev/internal/type/base_model.rbi +308 -0
- data/rbi/context_dev/internal/type/base_page.rbi +42 -0
- data/rbi/context_dev/internal/type/boolean.rbi +58 -0
- data/rbi/context_dev/internal/type/converter.rbi +216 -0
- data/rbi/context_dev/internal/type/enum.rbi +82 -0
- data/rbi/context_dev/internal/type/file_input.rbi +59 -0
- data/rbi/context_dev/internal/type/hash_of.rbi +104 -0
- data/rbi/context_dev/internal/type/request_parameters.rbi +29 -0
- data/rbi/context_dev/internal/type/union.rbi +128 -0
- data/rbi/context_dev/internal/type/unknown.rbi +58 -0
- data/rbi/context_dev/internal/util.rbi +507 -0
- data/rbi/context_dev/internal.rbi +18 -0
- data/rbi/context_dev/models/brand_ai_product_params.rbi +56 -0
- data/rbi/context_dev/models/brand_ai_product_response.rbi +380 -0
- data/rbi/context_dev/models/brand_ai_products_params.rbi +188 -0
- data/rbi/context_dev/models/brand_ai_products_response.rbi +310 -0
- data/rbi/context_dev/models/brand_ai_query_params.rbi +504 -0
- data/rbi/context_dev/models/brand_ai_query_response.rbi +205 -0
- data/rbi/context_dev/models/brand_fonts_params.rbi +60 -0
- data/rbi/context_dev/models/brand_fonts_response.rbi +147 -0
- data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +1682 -0
- data/rbi/context_dev/models/brand_identify_from_transaction_response.rbi +2595 -0
- data/rbi/context_dev/models/brand_prefetch_by_email_params.rbi +65 -0
- data/rbi/context_dev/models/brand_prefetch_by_email_response.rbi +57 -0
- data/rbi/context_dev/models/brand_prefetch_params.rbi +58 -0
- data/rbi/context_dev/models/brand_prefetch_response.rbi +57 -0
- data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +386 -0
- data/rbi/context_dev/models/brand_retrieve_by_email_response.rbi +2591 -0
- data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +386 -0
- data/rbi/context_dev/models/brand_retrieve_by_isin_response.rbi +2590 -0
- data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +384 -0
- data/rbi/context_dev/models/brand_retrieve_by_name_response.rbi +2590 -0
- data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +796 -0
- data/rbi/context_dev/models/brand_retrieve_by_ticker_response.rbi +2592 -0
- data/rbi/context_dev/models/brand_retrieve_naics_params.rbi +89 -0
- data/rbi/context_dev/models/brand_retrieve_naics_response.rbi +190 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +382 -0
- data/rbi/context_dev/models/brand_retrieve_response.rbi +2574 -0
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +61 -0
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +763 -0
- data/rbi/context_dev/models/brand_screenshot_params.rbi +225 -0
- data/rbi/context_dev/models/brand_screenshot_response.rbi +135 -0
- data/rbi/context_dev/models/brand_styleguide_params.rbi +139 -0
- data/rbi/context_dev/models/brand_styleguide_response.rbi +1707 -0
- data/rbi/context_dev/models/brand_web_scrape_html_params.rbi +43 -0
- data/rbi/context_dev/models/brand_web_scrape_html_response.rbi +92 -0
- data/rbi/context_dev/models/brand_web_scrape_images_params.rbi +43 -0
- data/rbi/context_dev/models/brand_web_scrape_images_response.rbi +261 -0
- data/rbi/context_dev/models/brand_web_scrape_md_params.rbi +81 -0
- data/rbi/context_dev/models/brand_web_scrape_md_response.rbi +92 -0
- data/rbi/context_dev/models/brand_web_scrape_sitemap_params.rbi +45 -0
- data/rbi/context_dev/models/brand_web_scrape_sitemap_response.rbi +167 -0
- data/rbi/context_dev/models.rbi +45 -0
- data/rbi/context_dev/request_options.rbi +59 -0
- data/rbi/context_dev/resources/brand.rbi +545 -0
- data/rbi/context_dev/version.rbi +5 -0
- data/sig/context_dev/client.rbs +26 -0
- data/sig/context_dev/errors.rbs +117 -0
- data/sig/context_dev/file_part.rbs +21 -0
- data/sig/context_dev/internal/transport/base_client.rbs +133 -0
- data/sig/context_dev/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/context_dev/internal/type/array_of.rbs +48 -0
- data/sig/context_dev/internal/type/base_model.rbs +102 -0
- data/sig/context_dev/internal/type/base_page.rbs +24 -0
- data/sig/context_dev/internal/type/boolean.rbs +26 -0
- data/sig/context_dev/internal/type/converter.rbs +79 -0
- data/sig/context_dev/internal/type/enum.rbs +32 -0
- data/sig/context_dev/internal/type/file_input.rbs +25 -0
- data/sig/context_dev/internal/type/hash_of.rbs +48 -0
- data/sig/context_dev/internal/type/request_parameters.rbs +19 -0
- data/sig/context_dev/internal/type/union.rbs +52 -0
- data/sig/context_dev/internal/type/unknown.rbs +26 -0
- data/sig/context_dev/internal/util.rbs +195 -0
- data/sig/context_dev/internal.rbs +9 -0
- data/sig/context_dev/models/brand_ai_product_params.rbs +30 -0
- data/sig/context_dev/models/brand_ai_product_response.rbs +149 -0
- data/sig/context_dev/models/brand_ai_products_params.rbs +88 -0
- data/sig/context_dev/models/brand_ai_products_response.rbs +128 -0
- data/sig/context_dev/models/brand_ai_query_params.rbs +218 -0
- data/sig/context_dev/models/brand_ai_query_response.rbs +93 -0
- data/sig/context_dev/models/brand_fonts_params.rbs +30 -0
- data/sig/context_dev/models/brand_fonts_response.rbs +82 -0
- data/sig/context_dev/models/brand_identify_from_transaction_params.rbs +686 -0
- data/sig/context_dev/models/brand_identify_from_transaction_response.rbs +1076 -0
- data/sig/context_dev/models/brand_prefetch_by_email_params.rbs +30 -0
- data/sig/context_dev/models/brand_prefetch_by_email_response.rbs +28 -0
- data/sig/context_dev/models/brand_prefetch_params.rbs +30 -0
- data/sig/context_dev/models/brand_prefetch_response.rbs +28 -0
- data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +162 -0
- data/sig/context_dev/models/brand_retrieve_by_email_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +162 -0
- data/sig/context_dev/models/brand_retrieve_by_isin_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +162 -0
- data/sig/context_dev/models/brand_retrieve_by_name_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +324 -0
- data/sig/context_dev/models/brand_retrieve_by_ticker_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_naics_params.rbs +47 -0
- data/sig/context_dev/models/brand_retrieve_naics_response.rbs +84 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +162 -0
- data/sig/context_dev/models/brand_retrieve_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +30 -0
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +312 -0
- data/sig/context_dev/models/brand_screenshot_params.rbs +100 -0
- data/sig/context_dev/models/brand_screenshot_response.rbs +63 -0
- data/sig/context_dev/models/brand_styleguide_params.rbs +62 -0
- data/sig/context_dev/models/brand_styleguide_response.rbs +945 -0
- data/sig/context_dev/models/brand_web_scrape_html_params.rbs +23 -0
- data/sig/context_dev/models/brand_web_scrape_html_response.rbs +40 -0
- data/sig/context_dev/models/brand_web_scrape_images_params.rbs +23 -0
- data/sig/context_dev/models/brand_web_scrape_images_response.rbs +98 -0
- data/sig/context_dev/models/brand_web_scrape_md_params.rbs +47 -0
- data/sig/context_dev/models/brand_web_scrape_md_response.rbs +40 -0
- data/sig/context_dev/models/brand_web_scrape_sitemap_params.rbs +23 -0
- data/sig/context_dev/models/brand_web_scrape_sitemap_response.rbs +77 -0
- data/sig/context_dev/models.rbs +41 -0
- data/sig/context_dev/request_options.rbs +36 -0
- data/sig/context_dev/resources/brand.rbs +151 -0
- data/sig/context_dev/version.rbs +3 -0
- metadata +265 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Brand#ai_query
|
|
6
|
+
class BrandAIQueryParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute data_to_extract
|
|
11
|
+
# Array of data points to extract from the website
|
|
12
|
+
#
|
|
13
|
+
# @return [Array<ContextDev::Models::BrandAIQueryParams::DataToExtract>]
|
|
14
|
+
required :data_to_extract,
|
|
15
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::BrandAIQueryParams::DataToExtract] }
|
|
16
|
+
|
|
17
|
+
# @!attribute domain
|
|
18
|
+
# The domain name to analyze
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :domain, String
|
|
22
|
+
|
|
23
|
+
# @!attribute specific_pages
|
|
24
|
+
# Optional object specifying which pages to analyze
|
|
25
|
+
#
|
|
26
|
+
# @return [ContextDev::Models::BrandAIQueryParams::SpecificPages, nil]
|
|
27
|
+
optional :specific_pages, -> { ContextDev::BrandAIQueryParams::SpecificPages }
|
|
28
|
+
|
|
29
|
+
# @!attribute timeout_ms
|
|
30
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
31
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
32
|
+
# value is 300000ms (5 minutes).
|
|
33
|
+
#
|
|
34
|
+
# @return [Integer, nil]
|
|
35
|
+
optional :timeout_ms, Integer, api_name: :timeoutMS
|
|
36
|
+
|
|
37
|
+
# @!method initialize(data_to_extract:, domain:, specific_pages: nil, timeout_ms: nil, request_options: {})
|
|
38
|
+
# Some parameter documentations has been truncated, see
|
|
39
|
+
# {ContextDev::Models::BrandAIQueryParams} for more details.
|
|
40
|
+
#
|
|
41
|
+
# @param data_to_extract [Array<ContextDev::Models::BrandAIQueryParams::DataToExtract>] Array of data points to extract from the website
|
|
42
|
+
#
|
|
43
|
+
# @param domain [String] The domain name to analyze
|
|
44
|
+
#
|
|
45
|
+
# @param specific_pages [ContextDev::Models::BrandAIQueryParams::SpecificPages] Optional object specifying which pages to analyze
|
|
46
|
+
#
|
|
47
|
+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
48
|
+
#
|
|
49
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
50
|
+
|
|
51
|
+
class DataToExtract < ContextDev::Internal::Type::BaseModel
|
|
52
|
+
# @!attribute datapoint_description
|
|
53
|
+
# Description of what to extract
|
|
54
|
+
#
|
|
55
|
+
# @return [String]
|
|
56
|
+
required :datapoint_description, String
|
|
57
|
+
|
|
58
|
+
# @!attribute datapoint_example
|
|
59
|
+
# Example of the expected value
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
required :datapoint_example, String
|
|
63
|
+
|
|
64
|
+
# @!attribute datapoint_name
|
|
65
|
+
# Name of the data point to extract
|
|
66
|
+
#
|
|
67
|
+
# @return [String]
|
|
68
|
+
required :datapoint_name, String
|
|
69
|
+
|
|
70
|
+
# @!attribute datapoint_type
|
|
71
|
+
# Type of the data point
|
|
72
|
+
#
|
|
73
|
+
# @return [Symbol, ContextDev::Models::BrandAIQueryParams::DataToExtract::DatapointType]
|
|
74
|
+
required :datapoint_type, enum: -> { ContextDev::BrandAIQueryParams::DataToExtract::DatapointType }
|
|
75
|
+
|
|
76
|
+
# @!attribute datapoint_list_type
|
|
77
|
+
# Type of items in the list when datapoint_type is 'list'. Defaults to 'string'.
|
|
78
|
+
# Use 'object' to extract an array of objects matching a schema.
|
|
79
|
+
#
|
|
80
|
+
# @return [Symbol, ContextDev::Models::BrandAIQueryParams::DataToExtract::DatapointListType, nil]
|
|
81
|
+
optional :datapoint_list_type,
|
|
82
|
+
enum: -> { ContextDev::BrandAIQueryParams::DataToExtract::DatapointListType }
|
|
83
|
+
|
|
84
|
+
# @!attribute datapoint_object_schema
|
|
85
|
+
# Schema definition for objects when datapoint_list_type is 'object'. Provide a
|
|
86
|
+
# map of field names to their scalar types.
|
|
87
|
+
#
|
|
88
|
+
# @return [Hash{Symbol=>Symbol, ContextDev::Models::BrandAIQueryParams::DataToExtract::DatapointObjectSchema}, nil]
|
|
89
|
+
optional :datapoint_object_schema,
|
|
90
|
+
-> { ContextDev::Internal::Type::HashOf[enum: ContextDev::BrandAIQueryParams::DataToExtract::DatapointObjectSchema] }
|
|
91
|
+
|
|
92
|
+
# @!method initialize(datapoint_description:, datapoint_example:, datapoint_name:, datapoint_type:, datapoint_list_type: nil, datapoint_object_schema: nil)
|
|
93
|
+
# Some parameter documentations has been truncated, see
|
|
94
|
+
# {ContextDev::Models::BrandAIQueryParams::DataToExtract} for more details.
|
|
95
|
+
#
|
|
96
|
+
# @param datapoint_description [String] Description of what to extract
|
|
97
|
+
#
|
|
98
|
+
# @param datapoint_example [String] Example of the expected value
|
|
99
|
+
#
|
|
100
|
+
# @param datapoint_name [String] Name of the data point to extract
|
|
101
|
+
#
|
|
102
|
+
# @param datapoint_type [Symbol, ContextDev::Models::BrandAIQueryParams::DataToExtract::DatapointType] Type of the data point
|
|
103
|
+
#
|
|
104
|
+
# @param datapoint_list_type [Symbol, ContextDev::Models::BrandAIQueryParams::DataToExtract::DatapointListType] Type of items in the list when datapoint_type is 'list'. Defaults to 'string'. U
|
|
105
|
+
#
|
|
106
|
+
# @param datapoint_object_schema [Hash{Symbol=>Symbol, ContextDev::Models::BrandAIQueryParams::DataToExtract::DatapointObjectSchema}] Schema definition for objects when datapoint_list_type is 'object'. Provide a ma
|
|
107
|
+
|
|
108
|
+
# Type of the data point
|
|
109
|
+
#
|
|
110
|
+
# @see ContextDev::Models::BrandAIQueryParams::DataToExtract#datapoint_type
|
|
111
|
+
module DatapointType
|
|
112
|
+
extend ContextDev::Internal::Type::Enum
|
|
113
|
+
|
|
114
|
+
TEXT = :text
|
|
115
|
+
NUMBER = :number
|
|
116
|
+
DATE = :date
|
|
117
|
+
BOOLEAN = :boolean
|
|
118
|
+
LIST = :list
|
|
119
|
+
URL = :url
|
|
120
|
+
|
|
121
|
+
# @!method self.values
|
|
122
|
+
# @return [Array<Symbol>]
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Type of items in the list when datapoint_type is 'list'. Defaults to 'string'.
|
|
126
|
+
# Use 'object' to extract an array of objects matching a schema.
|
|
127
|
+
#
|
|
128
|
+
# @see ContextDev::Models::BrandAIQueryParams::DataToExtract#datapoint_list_type
|
|
129
|
+
module DatapointListType
|
|
130
|
+
extend ContextDev::Internal::Type::Enum
|
|
131
|
+
|
|
132
|
+
STRING = :string
|
|
133
|
+
TEXT = :text
|
|
134
|
+
NUMBER = :number
|
|
135
|
+
DATE = :date
|
|
136
|
+
BOOLEAN = :boolean
|
|
137
|
+
LIST = :list
|
|
138
|
+
URL = :url
|
|
139
|
+
OBJECT = :object
|
|
140
|
+
|
|
141
|
+
# @!method self.values
|
|
142
|
+
# @return [Array<Symbol>]
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
module DatapointObjectSchema
|
|
146
|
+
extend ContextDev::Internal::Type::Enum
|
|
147
|
+
|
|
148
|
+
STRING = :string
|
|
149
|
+
NUMBER = :number
|
|
150
|
+
DATE = :date
|
|
151
|
+
BOOLEAN = :boolean
|
|
152
|
+
|
|
153
|
+
# @!method self.values
|
|
154
|
+
# @return [Array<Symbol>]
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
class SpecificPages < ContextDev::Internal::Type::BaseModel
|
|
159
|
+
# @!attribute about_us
|
|
160
|
+
# Whether to analyze the about us page
|
|
161
|
+
#
|
|
162
|
+
# @return [Boolean, nil]
|
|
163
|
+
optional :about_us, ContextDev::Internal::Type::Boolean
|
|
164
|
+
|
|
165
|
+
# @!attribute blog
|
|
166
|
+
# Whether to analyze the blog
|
|
167
|
+
#
|
|
168
|
+
# @return [Boolean, nil]
|
|
169
|
+
optional :blog, ContextDev::Internal::Type::Boolean
|
|
170
|
+
|
|
171
|
+
# @!attribute careers
|
|
172
|
+
# Whether to analyze the careers page
|
|
173
|
+
#
|
|
174
|
+
# @return [Boolean, nil]
|
|
175
|
+
optional :careers, ContextDev::Internal::Type::Boolean
|
|
176
|
+
|
|
177
|
+
# @!attribute contact_us
|
|
178
|
+
# Whether to analyze the contact us page
|
|
179
|
+
#
|
|
180
|
+
# @return [Boolean, nil]
|
|
181
|
+
optional :contact_us, ContextDev::Internal::Type::Boolean
|
|
182
|
+
|
|
183
|
+
# @!attribute faq
|
|
184
|
+
# Whether to analyze the FAQ page
|
|
185
|
+
#
|
|
186
|
+
# @return [Boolean, nil]
|
|
187
|
+
optional :faq, ContextDev::Internal::Type::Boolean
|
|
188
|
+
|
|
189
|
+
# @!attribute home_page
|
|
190
|
+
# Whether to analyze the home page
|
|
191
|
+
#
|
|
192
|
+
# @return [Boolean, nil]
|
|
193
|
+
optional :home_page, ContextDev::Internal::Type::Boolean
|
|
194
|
+
|
|
195
|
+
# @!attribute pricing
|
|
196
|
+
# Whether to analyze the pricing page
|
|
197
|
+
#
|
|
198
|
+
# @return [Boolean, nil]
|
|
199
|
+
optional :pricing, ContextDev::Internal::Type::Boolean
|
|
200
|
+
|
|
201
|
+
# @!attribute privacy_policy
|
|
202
|
+
# Whether to analyze the privacy policy page
|
|
203
|
+
#
|
|
204
|
+
# @return [Boolean, nil]
|
|
205
|
+
optional :privacy_policy, ContextDev::Internal::Type::Boolean
|
|
206
|
+
|
|
207
|
+
# @!attribute terms_and_conditions
|
|
208
|
+
# Whether to analyze the terms and conditions page
|
|
209
|
+
#
|
|
210
|
+
# @return [Boolean, nil]
|
|
211
|
+
optional :terms_and_conditions, ContextDev::Internal::Type::Boolean
|
|
212
|
+
|
|
213
|
+
# @!method initialize(about_us: nil, blog: nil, careers: nil, contact_us: nil, faq: nil, home_page: nil, pricing: nil, privacy_policy: nil, terms_and_conditions: nil)
|
|
214
|
+
# Optional object specifying which pages to analyze
|
|
215
|
+
#
|
|
216
|
+
# @param about_us [Boolean] Whether to analyze the about us page
|
|
217
|
+
#
|
|
218
|
+
# @param blog [Boolean] Whether to analyze the blog
|
|
219
|
+
#
|
|
220
|
+
# @param careers [Boolean] Whether to analyze the careers page
|
|
221
|
+
#
|
|
222
|
+
# @param contact_us [Boolean] Whether to analyze the contact us page
|
|
223
|
+
#
|
|
224
|
+
# @param faq [Boolean] Whether to analyze the FAQ page
|
|
225
|
+
#
|
|
226
|
+
# @param home_page [Boolean] Whether to analyze the home page
|
|
227
|
+
#
|
|
228
|
+
# @param pricing [Boolean] Whether to analyze the pricing page
|
|
229
|
+
#
|
|
230
|
+
# @param privacy_policy [Boolean] Whether to analyze the privacy policy page
|
|
231
|
+
#
|
|
232
|
+
# @param terms_and_conditions [Boolean] Whether to analyze the terms and conditions page
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Brand#ai_query
|
|
6
|
+
class BrandAIQueryResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data_extracted
|
|
8
|
+
# Array of extracted data points
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<ContextDev::Models::BrandAIQueryResponse::DataExtracted>, nil]
|
|
11
|
+
optional :data_extracted,
|
|
12
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandAIQueryResponse::DataExtracted] }
|
|
13
|
+
|
|
14
|
+
# @!attribute domain
|
|
15
|
+
# The domain that was analyzed
|
|
16
|
+
#
|
|
17
|
+
# @return [String, nil]
|
|
18
|
+
optional :domain, String
|
|
19
|
+
|
|
20
|
+
# @!attribute status
|
|
21
|
+
# Status of the response, e.g., 'ok'
|
|
22
|
+
#
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
optional :status, String
|
|
25
|
+
|
|
26
|
+
# @!attribute urls_analyzed
|
|
27
|
+
# List of URLs that were analyzed
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<String>, nil]
|
|
30
|
+
optional :urls_analyzed, ContextDev::Internal::Type::ArrayOf[String]
|
|
31
|
+
|
|
32
|
+
# @!method initialize(data_extracted: nil, domain: nil, status: nil, urls_analyzed: nil)
|
|
33
|
+
# @param data_extracted [Array<ContextDev::Models::BrandAIQueryResponse::DataExtracted>] Array of extracted data points
|
|
34
|
+
#
|
|
35
|
+
# @param domain [String] The domain that was analyzed
|
|
36
|
+
#
|
|
37
|
+
# @param status [String] Status of the response, e.g., 'ok'
|
|
38
|
+
#
|
|
39
|
+
# @param urls_analyzed [Array<String>] List of URLs that were analyzed
|
|
40
|
+
|
|
41
|
+
class DataExtracted < ContextDev::Internal::Type::BaseModel
|
|
42
|
+
# @!attribute datapoint_name
|
|
43
|
+
# Name of the extracted data point
|
|
44
|
+
#
|
|
45
|
+
# @return [String, nil]
|
|
46
|
+
optional :datapoint_name, String
|
|
47
|
+
|
|
48
|
+
# @!attribute datapoint_value
|
|
49
|
+
# Value of the extracted data point. Can be a primitive type, an array of
|
|
50
|
+
# primitives, or an array of objects when datapoint_list_type is 'object'.
|
|
51
|
+
#
|
|
52
|
+
# @return [String, Float, Boolean, Array<String>, Array<Float>, Array<Object>, nil]
|
|
53
|
+
optional :datapoint_value,
|
|
54
|
+
union: -> { ContextDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue }
|
|
55
|
+
|
|
56
|
+
# @!method initialize(datapoint_name: nil, datapoint_value: nil)
|
|
57
|
+
# Some parameter documentations has been truncated, see
|
|
58
|
+
# {ContextDev::Models::BrandAIQueryResponse::DataExtracted} for more details.
|
|
59
|
+
#
|
|
60
|
+
# @param datapoint_name [String] Name of the extracted data point
|
|
61
|
+
#
|
|
62
|
+
# @param datapoint_value [String, Float, Boolean, Array<String>, Array<Float>, Array<Object>] Value of the extracted data point. Can be a primitive type, an array of primitiv
|
|
63
|
+
|
|
64
|
+
# Value of the extracted data point. Can be a primitive type, an array of
|
|
65
|
+
# primitives, or an array of objects when datapoint_list_type is 'object'.
|
|
66
|
+
#
|
|
67
|
+
# @see ContextDev::Models::BrandAIQueryResponse::DataExtracted#datapoint_value
|
|
68
|
+
module DatapointValue
|
|
69
|
+
extend ContextDev::Internal::Type::Union
|
|
70
|
+
|
|
71
|
+
variant String
|
|
72
|
+
|
|
73
|
+
variant Float
|
|
74
|
+
|
|
75
|
+
variant ContextDev::Internal::Type::Boolean
|
|
76
|
+
|
|
77
|
+
variant -> { ContextDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::StringArray }
|
|
78
|
+
|
|
79
|
+
variant -> { ContextDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::FloatArray }
|
|
80
|
+
|
|
81
|
+
variant -> { ContextDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::UnionMember5Array }
|
|
82
|
+
|
|
83
|
+
# @!method self.variants
|
|
84
|
+
# @return [Array(String, Float, Boolean, Array<String>, Array<Float>, Array<Object>)]
|
|
85
|
+
|
|
86
|
+
# @type [ContextDev::Internal::Type::Converter]
|
|
87
|
+
StringArray = ContextDev::Internal::Type::ArrayOf[String]
|
|
88
|
+
|
|
89
|
+
# @type [ContextDev::Internal::Type::Converter]
|
|
90
|
+
FloatArray = ContextDev::Internal::Type::ArrayOf[Float]
|
|
91
|
+
|
|
92
|
+
# @type [ContextDev::Internal::Type::Converter]
|
|
93
|
+
UnionMember5Array = ContextDev::Internal::Type::ArrayOf[ContextDev::Internal::Type::Unknown]
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Brand#fonts
|
|
6
|
+
class BrandFontsParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute domain
|
|
11
|
+
# Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
|
|
12
|
+
# domain will be automatically normalized and validated.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :domain, String
|
|
16
|
+
|
|
17
|
+
# @!attribute timeout_ms
|
|
18
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
19
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
20
|
+
# value is 300000ms (5 minutes).
|
|
21
|
+
#
|
|
22
|
+
# @return [Integer, nil]
|
|
23
|
+
optional :timeout_ms, Integer
|
|
24
|
+
|
|
25
|
+
# @!method initialize(domain:, timeout_ms: nil, request_options: {})
|
|
26
|
+
# Some parameter documentations has been truncated, see
|
|
27
|
+
# {ContextDev::Models::BrandFontsParams} for more details.
|
|
28
|
+
#
|
|
29
|
+
# @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
|
|
30
|
+
#
|
|
31
|
+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
32
|
+
#
|
|
33
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Brand#fonts
|
|
6
|
+
class BrandFontsResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute code
|
|
8
|
+
# HTTP status code, e.g., 200
|
|
9
|
+
#
|
|
10
|
+
# @return [Integer]
|
|
11
|
+
required :code, Integer
|
|
12
|
+
|
|
13
|
+
# @!attribute domain
|
|
14
|
+
# The normalized domain that was processed
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :domain, String
|
|
18
|
+
|
|
19
|
+
# @!attribute fonts
|
|
20
|
+
# Array of font usage information
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<ContextDev::Models::BrandFontsResponse::Font>]
|
|
23
|
+
required :fonts, -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandFontsResponse::Font] }
|
|
24
|
+
|
|
25
|
+
# @!attribute status
|
|
26
|
+
# Status of the response, e.g., 'ok'
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :status, String
|
|
30
|
+
|
|
31
|
+
# @!method initialize(code:, domain:, fonts:, status:)
|
|
32
|
+
# @param code [Integer] HTTP status code, e.g., 200
|
|
33
|
+
#
|
|
34
|
+
# @param domain [String] The normalized domain that was processed
|
|
35
|
+
#
|
|
36
|
+
# @param fonts [Array<ContextDev::Models::BrandFontsResponse::Font>] Array of font usage information
|
|
37
|
+
#
|
|
38
|
+
# @param status [String] Status of the response, e.g., 'ok'
|
|
39
|
+
|
|
40
|
+
class Font < ContextDev::Internal::Type::BaseModel
|
|
41
|
+
# @!attribute fallbacks
|
|
42
|
+
# Array of fallback font families
|
|
43
|
+
#
|
|
44
|
+
# @return [Array<String>]
|
|
45
|
+
required :fallbacks, ContextDev::Internal::Type::ArrayOf[String]
|
|
46
|
+
|
|
47
|
+
# @!attribute font
|
|
48
|
+
# Font family name
|
|
49
|
+
#
|
|
50
|
+
# @return [String]
|
|
51
|
+
required :font, String
|
|
52
|
+
|
|
53
|
+
# @!attribute num_elements
|
|
54
|
+
# Number of elements using this font
|
|
55
|
+
#
|
|
56
|
+
# @return [Float]
|
|
57
|
+
required :num_elements, Float
|
|
58
|
+
|
|
59
|
+
# @!attribute num_words
|
|
60
|
+
# Number of words using this font
|
|
61
|
+
#
|
|
62
|
+
# @return [Float]
|
|
63
|
+
required :num_words, Float
|
|
64
|
+
|
|
65
|
+
# @!attribute percent_elements
|
|
66
|
+
# Percentage of elements using this font
|
|
67
|
+
#
|
|
68
|
+
# @return [Float]
|
|
69
|
+
required :percent_elements, Float
|
|
70
|
+
|
|
71
|
+
# @!attribute percent_words
|
|
72
|
+
# Percentage of words using this font
|
|
73
|
+
#
|
|
74
|
+
# @return [Float]
|
|
75
|
+
required :percent_words, Float
|
|
76
|
+
|
|
77
|
+
# @!attribute uses
|
|
78
|
+
# Array of CSS selectors or element types where this font is used
|
|
79
|
+
#
|
|
80
|
+
# @return [Array<String>]
|
|
81
|
+
required :uses, ContextDev::Internal::Type::ArrayOf[String]
|
|
82
|
+
|
|
83
|
+
# @!method initialize(fallbacks:, font:, num_elements:, num_words:, percent_elements:, percent_words:, uses:)
|
|
84
|
+
# @param fallbacks [Array<String>] Array of fallback font families
|
|
85
|
+
#
|
|
86
|
+
# @param font [String] Font family name
|
|
87
|
+
#
|
|
88
|
+
# @param num_elements [Float] Number of elements using this font
|
|
89
|
+
#
|
|
90
|
+
# @param num_words [Float] Number of words using this font
|
|
91
|
+
#
|
|
92
|
+
# @param percent_elements [Float] Percentage of elements using this font
|
|
93
|
+
#
|
|
94
|
+
# @param percent_words [Float] Percentage of words using this font
|
|
95
|
+
#
|
|
96
|
+
# @param uses [Array<String>] Array of CSS selectors or element types where this font is used
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|