Skip to content

Commit dcb86fa

Browse files
feat(api): api update
1 parent 558bf61 commit dcb86fa

File tree

7 files changed

+352
-20
lines changed

7 files changed

+352
-20
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 13
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-f69782c2c4296df9db6b41a3a7359a9e4910f59e34901b9f0e8045cec3f9ca69.yml
3-
openapi_spec_hash: f06c3956a6fc7e57614b120910339747
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-e685328e362a28f152bcadfd1ca49680a80bfb7a3834fd422f2e459507305405.yml
3+
openapi_spec_hash: 475543f86e39715f76588de6ccf70beb
44
config_hash: 6aaf0fe6f8877c9c5d9af95597123cb4

lib/brand_dev/models/brand_ai_query_params.rb

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,36 @@ class DataToExtract < BrandDev::Internal::Type::BaseModel
7373
# @return [Symbol, BrandDev::Models::BrandAIQueryParams::DataToExtract::DatapointType]
7474
required :datapoint_type, enum: -> { BrandDev::BrandAIQueryParams::DataToExtract::DatapointType }
7575

76-
# @!method initialize(datapoint_description:, datapoint_example:, datapoint_name:, datapoint_type:)
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, BrandDev::Models::BrandAIQueryParams::DataToExtract::DatapointListType, nil]
81+
optional :datapoint_list_type, enum: -> { BrandDev::BrandAIQueryParams::DataToExtract::DatapointListType }
82+
83+
# @!attribute datapoint_object_schema
84+
# Schema definition for objects when datapoint_list_type is 'object'. Provide a
85+
# map of field names to their scalar types.
86+
#
87+
# @return [Hash{Symbol=>Symbol, BrandDev::Models::BrandAIQueryParams::DataToExtract::DatapointObjectSchema}, nil]
88+
optional :datapoint_object_schema,
89+
-> { BrandDev::Internal::Type::HashOf[enum: BrandDev::BrandAIQueryParams::DataToExtract::DatapointObjectSchema] }
90+
91+
# @!method initialize(datapoint_description:, datapoint_example:, datapoint_name:, datapoint_type:, datapoint_list_type: nil, datapoint_object_schema: nil)
92+
# Some parameter documentations has been truncated, see
93+
# {BrandDev::Models::BrandAIQueryParams::DataToExtract} for more details.
94+
#
7795
# @param datapoint_description [String] Description of what to extract
7896
#
7997
# @param datapoint_example [String] Example of the expected value
8098
#
8199
# @param datapoint_name [String] Name of the data point to extract
82100
#
83101
# @param datapoint_type [Symbol, BrandDev::Models::BrandAIQueryParams::DataToExtract::DatapointType] Type of the data point
102+
#
103+
# @param datapoint_list_type [Symbol, BrandDev::Models::BrandAIQueryParams::DataToExtract::DatapointListType] Type of items in the list when datapoint_type is 'list'. Defaults to 'string'. U
104+
#
105+
# @param datapoint_object_schema [Hash{Symbol=>Symbol, BrandDev::Models::BrandAIQueryParams::DataToExtract::DatapointObjectSchema}] Schema definition for objects when datapoint_list_type is 'object'. Provide a ma
84106

85107
# Type of the data point
86108
#
@@ -98,6 +120,38 @@ module DatapointType
98120
# @!method self.values
99121
# @return [Array<Symbol>]
100122
end
123+
124+
# Type of items in the list when datapoint_type is 'list'. Defaults to 'string'.
125+
# Use 'object' to extract an array of objects matching a schema.
126+
#
127+
# @see BrandDev::Models::BrandAIQueryParams::DataToExtract#datapoint_list_type
128+
module DatapointListType
129+
extend BrandDev::Internal::Type::Enum
130+
131+
STRING = :string
132+
TEXT = :text
133+
NUMBER = :number
134+
DATE = :date
135+
BOOLEAN = :boolean
136+
LIST = :list
137+
URL = :url
138+
OBJECT = :object
139+
140+
# @!method self.values
141+
# @return [Array<Symbol>]
142+
end
143+
144+
module DatapointObjectSchema
145+
extend BrandDev::Internal::Type::Enum
146+
147+
STRING = :string
148+
NUMBER = :number
149+
DATE = :date
150+
BOOLEAN = :boolean
151+
152+
# @!method self.values
153+
# @return [Array<Symbol>]
154+
end
101155
end
102156

103157
class SpecificPages < BrandDev::Internal::Type::BaseModel
@@ -137,6 +191,12 @@ class SpecificPages < BrandDev::Internal::Type::BaseModel
137191
# @return [Boolean, nil]
138192
optional :home_page, BrandDev::Internal::Type::Boolean
139193

194+
# @!attribute pricing
195+
# Whether to analyze the pricing page
196+
#
197+
# @return [Boolean, nil]
198+
optional :pricing, BrandDev::Internal::Type::Boolean
199+
140200
# @!attribute privacy_policy
141201
# Whether to analyze the privacy policy page
142202
#
@@ -149,7 +209,7 @@ class SpecificPages < BrandDev::Internal::Type::BaseModel
149209
# @return [Boolean, nil]
150210
optional :terms_and_conditions, BrandDev::Internal::Type::Boolean
151211

152-
# @!method initialize(about_us: nil, blog: nil, careers: nil, contact_us: nil, faq: nil, home_page: nil, privacy_policy: nil, terms_and_conditions: nil)
212+
# @!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)
153213
# Optional object specifying which pages to analyze
154214
#
155215
# @param about_us [Boolean] Whether to analyze the about us page
@@ -164,6 +224,8 @@ class SpecificPages < BrandDev::Internal::Type::BaseModel
164224
#
165225
# @param home_page [Boolean] Whether to analyze the home page
166226
#
227+
# @param pricing [Boolean] Whether to analyze the pricing page
228+
#
167229
# @param privacy_policy [Boolean] Whether to analyze the privacy policy page
168230
#
169231
# @param terms_and_conditions [Boolean] Whether to analyze the terms and conditions page

lib/brand_dev/models/brand_ai_query_response.rb

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,23 @@ class DataExtracted < BrandDev::Internal::Type::BaseModel
4646
optional :datapoint_name, String
4747

4848
# @!attribute datapoint_value
49-
# Value of the extracted data point
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'.
5051
#
51-
# @return [String, Float, Boolean, Array<String>, Array<Float>, nil]
52+
# @return [String, Float, Boolean, Array<String>, Array<Float>, Array<Object>, nil]
5253
optional :datapoint_value,
5354
union: -> { BrandDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue }
5455

5556
# @!method initialize(datapoint_name: nil, datapoint_value: nil)
57+
# Some parameter documentations has been truncated, see
58+
# {BrandDev::Models::BrandAIQueryResponse::DataExtracted} for more details.
59+
#
5660
# @param datapoint_name [String] Name of the extracted data point
5761
#
58-
# @param datapoint_value [String, Float, Boolean, Array<String>, Array<Float>] Value of the extracted data point
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
5963

60-
# Value of the extracted data point
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'.
6166
#
6267
# @see BrandDev::Models::BrandAIQueryResponse::DataExtracted#datapoint_value
6368
module DatapointValue
@@ -73,14 +78,19 @@ module DatapointValue
7378

7479
variant -> { BrandDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::FloatArray }
7580

81+
variant -> { BrandDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::UnionMember5Array }
82+
7683
# @!method self.variants
77-
# @return [Array(String, Float, Boolean, Array<String>, Array<Float>)]
84+
# @return [Array(String, Float, Boolean, Array<String>, Array<Float>, Array<Object>)]
7885

7986
# @type [BrandDev::Internal::Type::Converter]
8087
StringArray = BrandDev::Internal::Type::ArrayOf[String]
8188

8289
# @type [BrandDev::Internal::Type::Converter]
8390
FloatArray = BrandDev::Internal::Type::ArrayOf[Float]
91+
92+
# @type [BrandDev::Internal::Type::Converter]
93+
UnionMember5Array = BrandDev::Internal::Type::ArrayOf[BrandDev::Internal::Type::Unknown]
8494
end
8595
end
8696
end

0 commit comments

Comments
 (0)