diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f2d985b..2f2b257d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,14 +21,14 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: |- github.repository == 'stainless-sdks/brand.dev-ruby' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -39,7 +39,7 @@ jobs: github.repository == 'stainless-sdks/brand.dev-ruby' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: core.setOutput('github_token', await core.getIDToken()); @@ -56,13 +56,13 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -73,12 +73,12 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index 05489ff8..68e2b95d 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 54e2e26f..7e642cc8 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'context-dot-dev/deprecated-brand-ruby-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d0ab6645..2a8f4ffd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.2.0" + ".": "1.3.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index bee881e8..05f6055f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 20 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-05a30711e18b0023520a660352d75595a050d1299bf0e3ee4a8cf55ded36aea2.yml -openapi_spec_hash: 8d0e1115a7d864f27c55cec3255d1e77 -config_hash: 91cf2dcefb99c39eb9cd3e98e15d6011 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev/brand.dev-5fdf050e92ce4d151a4a7a860bb287d57c995e548dd4854090162e4c66d3512c.yml +openapi_spec_hash: 65175e248e1c667d5ed134606a4648f5 +config_hash: cc61476116eb93980a98694cef45386a diff --git a/CHANGELOG.md b/CHANGELOG.md index 38b8462d..1f21c2ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,79 @@ # Changelog +## 1.3.0 (2026-08-03) + +Full Changelog: [v1.2.0...v1.3.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v1.2.0...v1.3.0) + +### Features + +* **api:** api update ([5804b92](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/5804b92b1a593611b1afd576bb5964ebd54bb119)) +* **api:** api update ([66436fd](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/66436fd3d9d4df353aaa7295c6a1db15feb06553)) +* **api:** api update ([1c75517](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/1c75517a2ebeb815b28987a7fc2603b2723bcda8)) +* **api:** api update ([1363035](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/136303506e8c842a7401013f9c43b1dbad99cf77)) +* **api:** api update ([ac00aff](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/ac00aff05100df878500ff35fb9c734791357422)) +* **api:** api update ([0e921c3](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/0e921c302012f66c717b0b841c68aa0c1424174a)) +* **api:** api update ([ba512a0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/ba512a02e7c9af76a1a9287b86d1109cc14a84d6)) +* **api:** api update ([d3136f3](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/d3136f3a419462c8b72bb38c6a703967d1570823)) +* **api:** api update ([d127def](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/d127def2db9510732eb59c10e1f5c08a66fbb681)) +* **api:** api update ([e6cc2aa](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/e6cc2aa47f21994e575a5aee6a366e3bdba452ab)) +* **api:** api update ([97d7276](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/97d72767b7d6f28e3054eeaf70866ccec990c2a7)) +* **api:** api update ([9c48cac](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/9c48cacb48a9f1a2bfad43ecebfb609184a3291e)) +* **api:** api update ([3052865](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/3052865e0a4bc9108b74412313361f43c644b87b)) +* **api:** api update ([06cbd17](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/06cbd1778d937429ee3a4cb55abe9880ff819979)) +* **api:** api update ([69ab298](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/69ab2984f6c293a9b95d8b5108ccf4602579a297)) +* **api:** api update ([b6961db](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/b6961dbaf7dc0676a42e9092919c047b82f976a7)) +* **api:** api update ([a185833](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/a185833b9ff913dce987791570b3c333af304682)) +* **api:** api update ([2526999](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/2526999e7740ba36537515bd79144769904b75a6)) +* **api:** api update ([613e56f](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/613e56f3d40c12e6e2eca7916affd837a13fb756)) +* **api:** api update ([8236a3b](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/8236a3b78bb77ebee6e2451f788d56d2028673b3)) +* **api:** api update ([fa4b67d](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/fa4b67da957d248a49a46faa58f07be5039aa3d7)) +* **api:** api update ([29df8d6](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/29df8d63546e19deb48cd4e6f5c54b535beb85d8)) +* **api:** api update ([71269a9](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/71269a9843e8a7d01f19f17889bc553c266d5a69)) +* **api:** api update ([20d96f3](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/20d96f34c4016b3739a41020ad1e7cb00736c6a4)) +* **api:** api update ([54ad2b8](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/54ad2b8833f19a4b11c23b1e3a6dad2bc7b194e4)) +* **api:** api update ([bab38c3](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/bab38c3ae6ca2e10722028a4b85c980d1a8c4573)) +* **api:** api update ([f6a3cd4](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/f6a3cd492f1f7e6d412fb34172809db980126423)) +* **api:** api update ([c7844bf](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/c7844bf1d3c8b454fb0bee944920a15b0cb2b06c)) +* **api:** api update ([ab2ccb1](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/ab2ccb17a6ba8b61840a59b1f3a7f3ccc5aa7ad6)) +* **api:** api update ([c1bebc5](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/c1bebc54ac22374b4c12c074ff438fd14d05b0f9)) +* **api:** api update ([cd834b4](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/cd834b4821c2107f10f92b8ee717daa63622ac42)) +* **api:** api update ([2a47d73](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/2a47d733b2de2acd65d6bc262833f4474f76a48f)) +* **api:** api update ([d4ee671](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/d4ee671db627d6d979533c4502acd93b86b74b7c)) +* **api:** api update ([2e93c17](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/2e93c177a7e818df9de785ac89363cba814eaad8)) +* **api:** api update ([80e2d8b](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/80e2d8b61925cb7a062423ea70613953d349201b)) +* **api:** api update ([3c1db2e](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/3c1db2ecd33a5f92eaf9c37dab6ee7956a38f379)) +* **api:** api update ([283f267](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/283f2676e5ef02cccf00ce078b38e63ccd9d3387)) +* **api:** api update ([ac2bf07](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/ac2bf07be9f7b5a636016c3f2ec55ca48b5ae971)) +* **api:** api update ([82f99f7](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/82f99f70cb3753d51c8d7befa710962a96b52f34)) +* **api:** api update ([53929a4](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/53929a404ec27e40072dab7db319060ce9356fdf)) +* **api:** api update ([26aa262](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/26aa262ffcd0e82c130a73f5bf4258a02d5d687d)) +* **api:** api update ([8f82145](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/8f82145769a2d825ab755cf3a4a2e2f3db64c0ad)) +* **api:** api update ([93dcfee](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/93dcfee9c2635974a204ae85d237c83845f5eb0d)) +* **api:** api update ([5129523](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/5129523063458daca62963d01ff1837b54c9babf)) +* **api:** api update ([de2601f](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/de2601f83745aa577c0c7629b4621e78218dbc1b)) +* **api:** api update ([7e9e3f5](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/7e9e3f5012f1d11daef7795087699d3d8914ec0a)) +* **api:** api update ([51cf238](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/51cf238020c1726eed5601387902175c0a911963)) +* **api:** api update ([d7243b6](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/d7243b67c34ed41991ffbfd05c20c3fe91bf6b7a)) +* **api:** api update ([7dbc953](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/7dbc953284d17ffdab94cc0cce1c1577bb5bb37d)) +* **api:** api update ([fdc7418](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/fdc741818cf6202016e5b94278590f8d1aa44079)) +* **api:** api update ([3613e92](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/3613e92029d5702a7b86753162c3dddda5ef88d2)) +* **api:** api update ([c523c67](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/c523c67ab269e7b2c2d6f6f50d93960d1a14da09)) +* **api:** api update ([22d1e77](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/22d1e77b4b4cfd0df257f1e8018187de16ea93a0)) +* **api:** api update ([f07badc](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/f07badc8bf3ef80fe032793339c05cb1f74fe2c2)) +* **api:** manual updates ([1d484c2](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/1d484c272a86710ec3c5d205ac6f72efec324dd3)) +* support setting headers via env ([c5921ab](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/c5921ab5e04c5a0cf08ca6673662f31fc4dcde80)) + + +### Bug Fixes + +* **client:** elide content type header on requests without body ([1b864c8](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/1b864c845999011a26c433ddd801c050aed7a197)) +* multipart encoding for file arrays ([a4d91a7](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/a4d91a72d7bb1a80f9d24c9914e744437eaecbb3)) + + +### Chores + +* **internal:** more robust bootstrap script ([67421f2](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/67421f29c40507b6b9499d80e788914dcf3526b4)) + ## 1.2.0 (2026-04-03) Full Changelog: [v1.1.0...v1.2.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v1.1.0...v1.2.0) diff --git a/Gemfile.lock b/Gemfile.lock index da284c10..afeaf850 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - brand.dev (1.2.0) + brand.dev (1.3.0) cgi connection_pool diff --git a/README.md b/README.md index 6ac788c2..ba5fa6b0 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "brand.dev", "~> 1.2.0" +gem "brand.dev", "~> 1.3.0" ``` @@ -206,11 +206,11 @@ brand_dev.brand.retrieve(**params) Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime: ```ruby -# :albanian -puts(BrandDev::BrandRetrieveParams::ForceLanguage::ALBANIAN) +# :afrikaans +puts(BrandDev::BrandRetrieveParams::ForceLanguage::AFRIKAANS) # Revealed type: `T.all(BrandDev::BrandRetrieveParams::ForceLanguage, Symbol)` -T.reveal_type(BrandDev::BrandRetrieveParams::ForceLanguage::ALBANIAN) +T.reveal_type(BrandDev::BrandRetrieveParams::ForceLanguage::AFRIKAANS) ``` Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value: @@ -218,13 +218,13 @@ Enum parameters have a "relaxed" type, so you can either pass in enum constants ```ruby # Using the enum constants preserves the tagged type information: brand_dev.brand.retrieve( - force_language: BrandDev::BrandRetrieveParams::ForceLanguage::ALBANIAN, + force_language: BrandDev::BrandRetrieveParams::ForceLanguage::AFRIKAANS, # … ) # Literal values are also permissible: brand_dev.brand.retrieve( - force_language: :albanian, + force_language: :afrikaans, # … ) ``` diff --git a/Rakefile b/Rakefile index ab08a92b..a5a8eb4c 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,6 @@ # frozen_string_literal: true +require "etc" require "pathname" require "securerandom" require "shellwords" @@ -37,7 +38,11 @@ multitask(:test) do ruby(*%w[-w -e], rb, verbose: false) { fail unless _1 } end -xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --] +# Cap parallelism at the CPU count. `--max-procs=0` spawns one process per +# 300-file batch with no upper bound; on large SDKs (thousands of files) that +# oversubscribes CPUs and stacks up rubocop processes, exhausting memory and +# slowing CI to the point of timing out. +xargs = %W[xargs --no-run-if-empty --null --max-procs=#{Etc.nprocessors} --max-args=300 --] ruby_opt = {"RUBYOPT" => [ENV["RUBYOPT"], "--encoding=UTF-8"].compact.join(" ")} filtered = ->(ext, dirs) do diff --git a/lib/brand_dev.rb b/lib/brand_dev.rb index 391d3ad5..b5038e59 100644 --- a/lib/brand_dev.rb +++ b/lib/brand_dev.rb @@ -92,5 +92,12 @@ require_relative "brand_dev/models/brand_web_scrape_md_response" require_relative "brand_dev/models/brand_web_scrape_sitemap_params" require_relative "brand_dev/models/brand_web_scrape_sitemap_response" +require_relative "brand_dev/models/crawl_controls" +require_relative "brand_dev/models/failure" +require_relative "brand_dev/models/intake" +require_relative "brand_dev/models/page_error_count" +require_relative "brand_dev/models/webhook_delivery" require_relative "brand_dev/models" +require_relative "brand_dev/resources/batch" require_relative "brand_dev/resources/brand" +require_relative "brand_dev/resources/monitors" diff --git a/lib/brand_dev/client.rb b/lib/brand_dev/client.rb index b62f44f2..d105dcca 100644 --- a/lib/brand_dev/client.rb +++ b/lib/brand_dev/client.rb @@ -21,6 +21,12 @@ class Client < BrandDev::Internal::Transport::BaseClient # @return [BrandDev::Resources::Brand] attr_reader :brand + # @return [BrandDev::Resources::Monitors] + attr_reader :monitors + + # @return [BrandDev::Resources::Batch] + attr_reader :batch + # @api private # # @return [Hash{String=>String}] @@ -58,6 +64,19 @@ def initialize( raise ArgumentError.new("api_key is required, and can be set via environ: \"BRAND_DEV_API_KEY\"") end + headers = {} + custom_headers_env = ENV["BRAND_DEV_CUSTOM_HEADERS"] + unless custom_headers_env.nil? + parsed = {} + custom_headers_env.split("\n").each do |line| + colon = line.index(":") + unless colon.nil? + parsed[line[0...colon].strip] = line[(colon + 1)..].strip + end + end + headers = parsed.merge(headers) + end + @api_key = api_key.to_s super( @@ -65,10 +84,13 @@ def initialize( timeout: timeout, max_retries: max_retries, initial_retry_delay: initial_retry_delay, - max_retry_delay: max_retry_delay + max_retry_delay: max_retry_delay, + headers: headers ) @brand = BrandDev::Resources::Brand.new(client: self) + @monitors = BrandDev::Resources::Monitors.new(client: self) + @batch = BrandDev::Resources::Batch.new(client: self) end end end diff --git a/lib/brand_dev/internal/transport/base_client.rb b/lib/brand_dev/internal/transport/base_client.rb index 74ae2ef7..111dc4a7 100644 --- a/lib/brand_dev/internal/transport/base_client.rb +++ b/lib/brand_dev/internal/transport/base_client.rb @@ -306,6 +306,11 @@ def initialize( BrandDev::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact) end + # Generated methods always pass `req[:body]` for operations that define a + # request body, so only elide the content-type header when the operation + # has no body at all, not when an optional body param was omitted. + headers.delete("content-type") if body.nil? && !req.key?(:body) + url = BrandDev::Internal::Util.join_parsed_uri( @base_url_components, {**req, path: path, query: query} diff --git a/lib/brand_dev/internal/type/base_model.rb b/lib/brand_dev/internal/type/base_model.rb index f6f1397b..102ee4e6 100644 --- a/lib/brand_dev/internal/type/base_model.rb +++ b/lib/brand_dev/internal/type/base_model.rb @@ -442,7 +442,7 @@ def deep_to_h = self.class.recursively_to_h(@data, convert: false) # brand_retrieve_response => { # brand: brand, # code: code, - # status: status + # key_metadata: key_metadata # } def deconstruct_keys(keys) (keys || self.class.known_fields.keys) diff --git a/lib/brand_dev/internal/util.rb b/lib/brand_dev/internal/util.rb index 0b8022c4..4b1d42c9 100644 --- a/lib/brand_dev/internal/util.rb +++ b/lib/brand_dev/internal/util.rb @@ -610,6 +610,7 @@ def encode_query_params(query) # # @return [Array(String, Enumerable)] private def encode_multipart_streaming(body) + # rubocop:disable Style/CaseEquality # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length boundary = SecureRandom.urlsafe_base64(46) @@ -619,7 +620,7 @@ def encode_query_params(query) in Hash body.each do |key, val| case val - in Array if val.all? { primitive?(_1) } + in Array if val.all? { primitive?(_1) || BrandDev::Internal::Type::FileInput === _1 } val.each do |v| write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing) end @@ -635,6 +636,7 @@ def encode_query_params(query) fused_io = fused_enum(strio) { closing.each(&:call) } [boundary, fused_io] + # rubocop:enable Style/CaseEquality end # @api private diff --git a/lib/brand_dev/models.rb b/lib/brand_dev/models.rb index 61ba9415..915aaa89 100644 --- a/lib/brand_dev/models.rb +++ b/lib/brand_dev/models.rb @@ -78,4 +78,14 @@ module BrandDev BrandWebScrapeMdParams = BrandDev::Models::BrandWebScrapeMdParams BrandWebScrapeSitemapParams = BrandDev::Models::BrandWebScrapeSitemapParams + + CrawlControls = BrandDev::Models::CrawlControls + + Failure = BrandDev::Models::Failure + + Intake = BrandDev::Models::Intake + + PageErrorCount = BrandDev::Models::PageErrorCount + + WebhookDelivery = BrandDev::Models::WebhookDelivery end diff --git a/lib/brand_dev/models/brand_ai_product_params.rb b/lib/brand_dev/models/brand_ai_product_params.rb index bf0806d5..31e1afe5 100644 --- a/lib/brand_dev/models/brand_ai_product_params.rb +++ b/lib/brand_dev/models/brand_ai_product_params.rb @@ -13,20 +13,39 @@ class BrandAIProductParams < BrandDev::Internal::Type::BaseModel # @return [String] required :url, String + # @!attribute max_age_ms + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, api_name: :maxAgeMs + + # @!attribute tags + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + # @!attribute timeout_ms - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). # # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS - # @!method initialize(url:, timeout_ms: nil, request_options: {}) + # @!method initialize(url:, max_age_ms: nil, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandAIProductParams} for more details. # # @param url [String] The product page URL to extract product data from. # - # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 + # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y + # + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/brand_dev/models/brand_ai_product_response.rb b/lib/brand_dev/models/brand_ai_product_response.rb index b55be6dc..89c082f9 100644 --- a/lib/brand_dev/models/brand_ai_product_response.rb +++ b/lib/brand_dev/models/brand_ai_product_response.rb @@ -10,6 +10,13 @@ class BrandAIProductResponse < BrandDev::Internal::Type::BaseModel # @return [Boolean, nil] optional :is_product_page, BrandDev::Internal::Type::Boolean + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandAIProductResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandAIProductResponse::KeyMetadata } + # @!attribute platform # The detected ecommerce platform, or null if not a product page # @@ -22,13 +29,41 @@ class BrandAIProductResponse < BrandDev::Internal::Type::BaseModel # @return [BrandDev::Models::BrandAIProductResponse::Product, nil] optional :product, -> { BrandDev::Models::BrandAIProductResponse::Product }, nil?: true - # @!method initialize(is_product_page: nil, platform: nil, product: nil) + # @!method initialize(is_product_page: nil, key_metadata: nil, platform: nil, product: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandAIProductResponse} for more details. + # # @param is_product_page [Boolean] Whether the given URL is a product detail page # + # @param key_metadata [BrandDev::Models::BrandAIProductResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param platform [Symbol, BrandDev::Models::BrandAIProductResponse::Platform, nil] The detected ecommerce platform, or null if not a product page # # @param product [BrandDev::Models::BrandAIProductResponse::Product, nil] The extracted product data, or null if not a product page + # @see BrandDev::Models::BrandAIProductResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end + # The detected ecommerce platform, or null if not a product page # # @see BrandDev::Models::BrandAIProductResponse#platform @@ -70,6 +105,12 @@ class Product < BrandDev::Internal::Type::BaseModel # @return [String] required :name, String + # @!attribute sku + # Stock Keeping Unit (product identifier). Null if no identifier is found. + # + # @return [String, nil] + required :sku, String, nil?: true + # @!attribute tags # Tags associated with the product # @@ -128,7 +169,7 @@ class Product < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :url, String, nil?: true - # @!method initialize(description:, features:, images:, name:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil) + # @!method initialize(description:, features:, images:, name:, sku:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil) # The extracted product data, or null if not a product page # # @param description [String] Description of the product @@ -139,6 +180,8 @@ class Product < BrandDev::Internal::Type::BaseModel # # @param name [String] Name of the product # + # @param sku [String, nil] Stock Keeping Unit (product identifier). Null if no identifier is found. + # # @param tags [Array] Tags associated with the product # # @param target_audience [Array] Target audience for the product (array of strings) diff --git a/lib/brand_dev/models/brand_ai_products_params.rb b/lib/brand_dev/models/brand_ai_products_params.rb index 534bbead..53607a50 100644 --- a/lib/brand_dev/models/brand_ai_products_params.rb +++ b/lib/brand_dev/models/brand_ai_products_params.rb @@ -30,28 +30,47 @@ class ByDomain < BrandDev::Internal::Type::BaseModel # @return [String] required :domain, String + # @!attribute max_age_ms + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, api_name: :maxAgeMs + # @!attribute max_products # Maximum number of products to extract. # # @return [Integer, nil] optional :max_products, Integer, api_name: :maxProducts + # @!attribute tags + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + # @!attribute timeout_ms - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). # # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS - # @!method initialize(domain:, max_products: nil, timeout_ms: nil) + # @!method initialize(domain:, max_age_ms: nil, max_products: nil, tags: nil, timeout_ms: nil) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandAIProductsParams::Body::ByDomain} for more details. # # @param domain [String] The domain name to analyze. # + # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y + # # @param max_products [Integer] Maximum number of products to extract. # - # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th end class ByDirectURL < BrandDev::Internal::Type::BaseModel @@ -62,28 +81,47 @@ class ByDirectURL < BrandDev::Internal::Type::BaseModel # @return [String] required :direct_url, String, api_name: :directUrl + # @!attribute max_age_ms + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, api_name: :maxAgeMs + # @!attribute max_products # Maximum number of products to extract. # # @return [Integer, nil] optional :max_products, Integer, api_name: :maxProducts + # @!attribute tags + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + # @!attribute timeout_ms - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). # # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS - # @!method initialize(direct_url:, max_products: nil, timeout_ms: nil) + # @!method initialize(direct_url:, max_age_ms: nil, max_products: nil, tags: nil, timeout_ms: nil) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandAIProductsParams::Body::ByDirectURL} for more details. # # @param direct_url [String] A specific URL to use directly as the starting point for extraction without doma # + # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y + # # @param max_products [Integer] Maximum number of products to extract. # - # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th end # @!method self.variants diff --git a/lib/brand_dev/models/brand_ai_products_response.rb b/lib/brand_dev/models/brand_ai_products_response.rb index 217e1b51..0832c47a 100644 --- a/lib/brand_dev/models/brand_ai_products_response.rb +++ b/lib/brand_dev/models/brand_ai_products_response.rb @@ -4,6 +4,13 @@ module BrandDev module Models # @see BrandDev::Resources::Brand#ai_products class BrandAIProductsResponse < BrandDev::Internal::Type::BaseModel + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandAIProductsResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandAIProductsResponse::KeyMetadata } + # @!attribute products # Array of products extracted from the website # @@ -11,9 +18,37 @@ class BrandAIProductsResponse < BrandDev::Internal::Type::BaseModel optional :products, -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandAIProductsResponse::Product] } - # @!method initialize(products: nil) + # @!method initialize(key_metadata: nil, products: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandAIProductsResponse} for more details. + # + # @param key_metadata [BrandDev::Models::BrandAIProductsResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param products [Array] Array of products extracted from the website + # @see BrandDev::Models::BrandAIProductsResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end + class Product < BrandDev::Internal::Type::BaseModel # @!attribute description # Description of the product @@ -39,6 +74,12 @@ class Product < BrandDev::Internal::Type::BaseModel # @return [String] required :name, String + # @!attribute sku + # Stock Keeping Unit (product identifier). Null if no identifier is found. + # + # @return [String, nil] + required :sku, String, nil?: true + # @!attribute tags # Tags associated with the product # @@ -97,7 +138,7 @@ class Product < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :url, String, nil?: true - # @!method initialize(description:, features:, images:, name:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil) + # @!method initialize(description:, features:, images:, name:, sku:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil) # @param description [String] Description of the product # # @param features [Array] List of product features @@ -106,6 +147,8 @@ class Product < BrandDev::Internal::Type::BaseModel # # @param name [String] Name of the product # + # @param sku [String, nil] Stock Keeping Unit (product identifier). Null if no identifier is found. + # # @param tags [Array] Tags associated with the product # # @param target_audience [Array] Target audience for the product (array of strings) diff --git a/lib/brand_dev/models/brand_ai_query_params.rb b/lib/brand_dev/models/brand_ai_query_params.rb index 6e2d2852..ba4ff745 100644 --- a/lib/brand_dev/models/brand_ai_query_params.rb +++ b/lib/brand_dev/models/brand_ai_query_params.rb @@ -26,6 +26,12 @@ class BrandAIQueryParams < BrandDev::Internal::Type::BaseModel # @return [BrandDev::Models::BrandAIQueryParams::SpecificPages, nil] optional :specific_pages, -> { BrandDev::BrandAIQueryParams::SpecificPages } + # @!attribute tags + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -34,7 +40,7 @@ class BrandAIQueryParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS - # @!method initialize(data_to_extract:, domain:, specific_pages: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(data_to_extract:, domain:, specific_pages: nil, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandAIQueryParams} for more details. # @@ -44,6 +50,8 @@ class BrandAIQueryParams < BrandDev::Internal::Type::BaseModel # # @param specific_pages [BrandDev::Models::BrandAIQueryParams::SpecificPages] Optional object specifying which pages to analyze # + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/brand_dev/models/brand_ai_query_response.rb b/lib/brand_dev/models/brand_ai_query_response.rb index b18da001..eed94653 100644 --- a/lib/brand_dev/models/brand_ai_query_response.rb +++ b/lib/brand_dev/models/brand_ai_query_response.rb @@ -17,6 +17,13 @@ class BrandAIQueryResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :domain, String + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandAIQueryResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandAIQueryResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # @@ -29,11 +36,16 @@ class BrandAIQueryResponse < BrandDev::Internal::Type::BaseModel # @return [Array, nil] optional :urls_analyzed, BrandDev::Internal::Type::ArrayOf[String] - # @!method initialize(data_extracted: nil, domain: nil, status: nil, urls_analyzed: nil) + # @!method initialize(data_extracted: nil, domain: nil, key_metadata: nil, status: nil, urls_analyzed: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandAIQueryResponse} for more details. + # # @param data_extracted [Array] Array of extracted data points # # @param domain [String] The domain that was analyzed # + # @param key_metadata [BrandDev::Models::BrandAIQueryResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # # @param urls_analyzed [Array] List of URLs that were analyzed @@ -93,6 +105,29 @@ module DatapointValue UnionMember5Array = BrandDev::Internal::Type::ArrayOf[BrandDev::Internal::Type::Unknown] end end + + # @see BrandDev::Models::BrandAIQueryResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_fonts_params.rb b/lib/brand_dev/models/brand_fonts_params.rb index 9ddb95bd..5b57f847 100644 --- a/lib/brand_dev/models/brand_fonts_params.rb +++ b/lib/brand_dev/models/brand_fonts_params.rb @@ -7,12 +7,38 @@ class BrandFontsParams < BrandDev::Internal::Type::BaseModel extend BrandDev::Internal::Type::RequestParameters::Converter include BrandDev::Internal::Type::RequestParameters + # @!attribute direct_url + # A specific URL to fetch fonts from directly, bypassing domain resolution (e.g., + # 'https://example.com/design-system'). When provided, fonts are extracted from + # this exact URL. You must provide either 'domain' or 'directUrl', but not both. + # + # @return [String, nil] + optional :direct_url, String + # @!attribute domain # Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. + # + # @return [String, nil] + optional :domain, String + + # @!attribute max_age_ms + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. # - # @return [String] - required :domain, String + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer @@ -22,12 +48,18 @@ class BrandFontsParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(domain:, timeout_ms: nil, request_options: {}) + # @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandFontsParams} for more details. # + # @param direct_url [String] A specific URL to fetch fonts from directly, bypassing domain resolution (e.g., + # # @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai # + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/brand_dev/models/brand_fonts_response.rb b/lib/brand_dev/models/brand_fonts_response.rb index 9d6d4c4b..612b3f08 100644 --- a/lib/brand_dev/models/brand_fonts_response.rb +++ b/lib/brand_dev/models/brand_fonts_response.rb @@ -28,7 +28,27 @@ class BrandFontsResponse < BrandDev::Internal::Type::BaseModel # @return [String] required :status, String - # @!method initialize(code:, domain:, fonts:, status:) + # @!attribute font_links + # Font assets keyed by family name as it appears in the fonts array (non-generic + # names only). Clients match entries in fonts to pick a file URL from files. + # Omitted when no families resolve to Google or custom @font-face URLs. + # + # @return [Hash{Symbol=>BrandDev::Models::BrandFontsResponse::FontLink}, nil] + optional :font_links, + -> { BrandDev::Internal::Type::HashOf[BrandDev::Models::BrandFontsResponse::FontLink] }, + api_name: :fontLinks + + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandFontsResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandFontsResponse::KeyMetadata } + + # @!method initialize(code:, domain:, fonts:, status:, font_links: nil, key_metadata: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandFontsResponse} for more details. + # # @param code [Integer] HTTP status code, e.g., 200 # # @param domain [String] The normalized domain that was processed @@ -36,6 +56,10 @@ class BrandFontsResponse < BrandDev::Internal::Type::BaseModel # @param fonts [Array] Array of font usage information # # @param status [String] Status of the response, e.g., 'ok' + # + # @param font_links [Hash{Symbol=>BrandDev::Models::BrandFontsResponse::FontLink}] Font assets keyed by family name as it appears in the fonts array (non-generic n + # + # @param key_metadata [BrandDev::Models::BrandFontsResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when class Font < BrandDev::Internal::Type::BaseModel # @!attribute fallbacks @@ -95,6 +119,81 @@ class Font < BrandDev::Internal::Type::BaseModel # # @param uses [Array] Array of CSS selectors or element types where this font is used end + + class FontLink < BrandDev::Internal::Type::BaseModel + # @!attribute files + # Upright font files keyed by weight string (e.g. "400" for regular, "500", + # "700"). Values are absolute URLs. + # + # @return [Hash{Symbol=>String}] + required :files, BrandDev::Internal::Type::HashOf[String] + + # @!attribute type + # + # @return [Symbol, BrandDev::Models::BrandFontsResponse::FontLink::Type] + required :type, enum: -> { BrandDev::Models::BrandFontsResponse::FontLink::Type } + + # @!attribute category + # Google Fonts category when type is google (e.g. sans-serif, serif, monospace, + # display, handwriting). Omitted for custom fonts when unknown. + # + # @return [String, nil] + optional :category, String + + # @!attribute display_name + # Present when type is custom: human-readable name derived from the fontLinks key + # (strip build/hash suffixes, split camelCase / PascalCase, normalize separators). + # Google entries omit this. + # + # @return [String, nil] + optional :display_name, String, api_name: :displayName + + # @!method initialize(files:, type:, category: nil, display_name: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandFontsResponse::FontLink} for more details. + # + # @param files [Hash{Symbol=>String}] Upright font files keyed by weight string (e.g. "400" for regular, "500", "700") + # + # @param type [Symbol, BrandDev::Models::BrandFontsResponse::FontLink::Type] + # + # @param category [String] Google Fonts category when type is google (e.g. sans-serif, serif, monospace, di + # + # @param display_name [String] Present when type is custom: human-readable name derived from the fontLinks key + + # @see BrandDev::Models::BrandFontsResponse::FontLink#type + module Type + extend BrandDev::Internal::Type::Enum + + GOOGLE = :google + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + end + + # @see BrandDev::Models::BrandFontsResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_identify_from_transaction_params.rb b/lib/brand_dev/models/brand_identify_from_transaction_params.rb index 4b2fa453..67c8ddc4 100644 --- a/lib/brand_dev/models/brand_identify_from_transaction_params.rb +++ b/lib/brand_dev/models/brand_identify_from_transaction_params.rb @@ -20,46 +20,56 @@ class BrandIdentifyFromTransactionParams < BrandDev::Internal::Type::BaseModel optional :city, String # @!attribute country_gl - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. # # @return [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::CountryGl, nil] optional :country_gl, enum: -> { BrandDev::BrandIdentifyFromTransactionParams::CountryGl } # @!attribute force_language - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. # # @return [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::ForceLanguage, nil] - optional :force_language, enum: -> { BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage } + optional :force_language, + enum: -> { BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage }, + nil?: true # @!attribute high_confidence_only # When set to true, the API will perform an additional verification steps to # ensure the identified brand matches the transaction with high confidence. - # Defaults to false. # - # @return [Boolean, nil] - optional :high_confidence_only, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::HighConfidenceOnly, nil] + optional :high_confidence_only, + union: -> { BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly } # @!attribute max_speed # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. # - # @return [Boolean, nil] - optional :max_speed, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::MaxSpeed, nil] + optional :max_speed, union: -> { BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed } # @!attribute mcc # Optional Merchant Category Code (MCC) to help identify the business # category/industry. # - # @return [String, nil] - optional :mcc, String + # @return [String, Float, nil] + optional :mcc, union: -> { BrandDev::BrandIdentifyFromTransactionParams::Mcc } # @!attribute phone # Optional phone number from the transaction to help verify brand match. # - # @return [Float, nil] - optional :phone, Float + # @return [String, Float, nil] + optional :phone, union: -> { BrandDev::BrandIdentifyFromTransactionParams::Phone } + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer @@ -69,7 +79,7 @@ class BrandIdentifyFromTransactionParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(transaction_info:, city: nil, country_gl: nil, force_language: nil, high_confidence_only: nil, max_speed: nil, mcc: nil, phone: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(transaction_info:, city: nil, country_gl: nil, force_language: nil, high_confidence_only: nil, max_speed: nil, mcc: nil, phone: nil, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandIdentifyFromTransactionParams} for more details. # @@ -77,264 +87,266 @@ class BrandIdentifyFromTransactionParams < BrandDev::Internal::Type::BaseModel # # @param city [String] Optional city name to prioritize when searching for the brand. # - # @param country_gl [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::CountryGl] Optional country code (GL parameter) to specify the country. This affects the ge + # @param country_gl [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::CountryGl] Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize searc # - # @param force_language [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::ForceLanguage, nil] Language to force for the retrieved brand data. # - # @param high_confidence_only [Boolean] When set to true, the API will perform an additional verification steps to ensur + # @param high_confidence_only [Boolean, Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::HighConfidenceOnly] When set to true, the API will perform an additional verification steps to ensur # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, # - # @param mcc [String] Optional Merchant Category Code (MCC) to help identify the business category/ind + # @param mcc [String, Float] Optional Merchant Category Code (MCC) to help identify the business category/ind # - # @param phone [Float] Optional phone number from the transaction to help verify brand match. + # @param phone [String, Float] Optional phone number from the transaction to help verify brand match. + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. module CountryGl extend BrandDev::Internal::Type::Enum - AD = :ad - AE = :ae AF = :af - AG = :ag - AI = :ai AL = :al - AM = :am - AN = :an + DZ = :dz + AS = :as + AD = :ad AO = :ao + AI = :ai AQ = :aq + AG = :ag AR = :ar - AS = :as - AT = :at - AU = :au + AM = :am AW = :aw + AU = :au + AT = :at AZ = :az - BA = :ba - BB = :bb + BS = :bs + BH = :bh BD = :bd + BB = :bb + BY = :by BE = :be - BF = :bf - BG = :bg - BH = :bh - BI = :bi + BZ = :bz BJ = :bj BM = :bm - BN = :bn - BO = :bo - BR = :br - BS = :bs BT = :bt - BV = :bv + BO = :bo + BA = :ba BW = :bw - BY = :by - BZ = :bz + BV = :bv + BR = :br + IO = :io + BN = :bn + BG = :bg + BF = :bf + BI = :bi + KH = :kh + CM = :cm CA = :ca - CC = :cc - CD = :cd + CV = :cv + KY = :ky CF = :cf - CG = :cg - CH = :ch - CI = :ci - CK = :ck + TD = :td CL = :cl - CM = :cm CN = :cn + CX = :cx + CC = :cc CO = :co + KM = :km + CG = :cg + CD = :cd + CK = :ck CR = :cr + CI = :ci + HR = :hr CU = :cu - CV = :cv - CX = :cx CY = :cy CZ = :cz - DE = :de - DJ = :dj DK = :dk + DJ = :dj DM = :dm DO = :do - DZ = :dz EC = :ec - EE = :ee EG = :eg - EH = :eh + SV = :sv + GQ = :gq ER = :er - ES = :es + EE = :ee ET = :et - FI = :fi - FJ = :fj FK = :fk - FM = :fm FO = :fo + FJ = :fj + FI = :fi FR = :fr + GF = :gf + PF = :pf + TF = :tf GA = :ga - GB = :gb - GD = :gd + GM = :gm GE = :ge - GF = :gf + DE = :de GH = :gh GI = :gi + GR = :gr GL = :gl - GM = :gm - GN = :gn + GD = :gd GP = :gp - GQ = :gq - GR = :gr - GS = :gs - GT = :gt GU = :gu + GT = :gt + GN = :gn GW = :gw GY = :gy - HK = :hk + HT = :ht HM = :hm + VA = :va HN = :hn - HR = :hr - HT = :ht + HK = :hk HU = :hu + IS = :is + IN = :in ID = :id + IR = :ir + IQ = :iq IE = :ie IL = :il - IN = :in - IO = :io - IQ = :iq - IR = :ir - IS = :is IT = :it JM = :jm - JO = :jo JP = :jp + JO = :jo + KZ = :kz KE = :ke - KG = :kg - KH = :kh KI = :ki - KM = :km - KN = :kn KP = :kp KR = :kr KW = :kw - KY = :ky - KZ = :kz + KG = :kg LA = :la + LV = :lv LB = :lb - LC = :lc - LI = :li - LK = :lk - LR = :lr LS = :ls + LR = :lr + LY = :ly + LI = :li LT = :lt LU = :lu - LV = :lv - LY = :ly - MA = :ma - MC = :mc - MD = :md - MG = :mg - MH = :mh + MO = :mo MK = :mk + MG = :mg + MW = :mw + MY = :my + MV = :mv ML = :ml - MM = :mm - MN = :mn - MO = :mo - MP = :mp + MT = :mt + MH = :mh MQ = :mq MR = :mr - MS = :ms - MT = :mt MU = :mu - MV = :mv - MW = :mw + YT = :yt MX = :mx - MY = :my + FM = :fm + MD = :md + MC = :mc + MN = :mn + MS = :ms + MA = :ma MZ = :mz + MM = :mm NA = :na + NR = :nr + NP = :np + NL = :nl + AN = :an NC = :nc + NZ = :nz + NI = :ni NE = :ne - NF = :nf NG = :ng - NI = :ni - NL = :nl - NO = :no - NP = :np - NR = :nr NU = :nu - NZ = :nz + NF = :nf + MP = :mp + NO = :no OM = :om + PK = :pk + PW = :pw + PS = :ps PA = :pa - PE = :pe - PF = :pf PG = :pg + PY = :py + PE = :pe PH = :ph - PK = :pk - PL = :pl - PM = :pm PN = :pn - PR = :pr - PS = :ps + PL = :pl PT = :pt - PW = :pw - PY = :py + PR = :pr QA = :qa RE = :re RO = :ro - RS = :rs RU = :ru RW = :rw + SH = :sh + KN = :kn + LC = :lc + PM = :pm + VC = :vc + WS = :ws + SM = :sm + ST = :st SA = :sa - SB = :sb + SN = :sn + RS = :rs SC = :sc - SD = :sd - SE = :se + SL = :sl SG = :sg - SH = :sh - SI = :si - SJ = :sj SK = :sk - SL = :sl - SM = :sm - SN = :sn + SI = :si + SB = :sb SO = :so + ZA = :za + GS = :gs + ES = :es + LK = :lk + SD = :sd SR = :sr - ST = :st - SV = :sv - SY = :sy + SJ = :sj SZ = :sz - TC = :tc - TD = :td - TF = :tf - TG = :tg - TH = :th + SE = :se + CH = :ch + SY = :sy + TW = :tw TJ = :tj - TK = :tk + TZ = :tz + TH = :th TL = :tl - TM = :tm - TN = :tn + TG = :tg + TK = :tk TO = :to - TR = :tr TT = :tt + TN = :tn + TR = :tr + TM = :tm + TC = :tc TV = :tv - TW = :tw - TZ = :tz - UA = :ua UG = :ug - UM = :um + UA = :ua + AE = :ae + GB = :gb US = :us + UM = :um UY = :uy UZ = :uz - VA = :va - VC = :vc + VU = :vu VE = :ve + VN = :vn VG = :vg VI = :vi - VN = :vn - VU = :vu WF = :wf - WS = :ws + EH = :eh YE = :ye - YT = :yt - ZA = :za ZM = :zm ZW = :zw @@ -342,69 +354,212 @@ module CountryGl # @return [Array] end - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS = :afrikaans ALBANIAN = :albanian + AMHARIC = :amharic ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian BENGALI = :bengali + BOSNIAN = :bosnian BULGARIAN = :bulgarian + BURMESE = :burmese CANTONESE = :cantonese + CATALAN = :catalan CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican CROATIAN = :croatian CZECH = :czech DANISH = :danish DUTCH = :dutch ENGLISH = :english + ESPERANTO = :esperanto ESTONIAN = :estonian FARSI = :farsi + FIJIAN = :fijian FINNISH = :finnish FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" HAUSA = :hausa HAWAIIAN = :hawaiian + HEBREW = :hebrew HINDI = :hindi + HMONG = :hmong HUNGARIAN = :hungarian ICELANDIC = :icelandic + IGBO = :igbo INDONESIAN = :indonesian + IRISH = :irish ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda KOREAN = :korean + KURDISH = :kurdish KYRGYZ = :kyrgyz + LAO = :lao LATIN = :latin LATVIAN = :latvian + LINGALA = :lingala LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi MONGOLIAN = :mongolian NEPALI = :nepali NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo PASHTO = :pashto PIDGIN = :pidgin POLISH = :polish PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua ROMANIAN = :romanian RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala SLOVAK = :slovak SLOVENE = :slovene SOMALI = :somali SPANISH = :spanish + SUNDANESE = :sundanese SWAHILI = :swahili SWEDISH = :swedish TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana TURKISH = :turkish + TURKMEN = :turkmen UKRAINIAN = :ukrainian URDU = :urdu + UYGHUR = :uyghur UZBEK = :uzbek VIETNAMESE = :vietnamese WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu # @!method self.values # @return [Array] end + + # When set to true, the API will perform an additional verification steps to + # ensure the identified brand matches the transaction with high confidence. + module HighConfidenceOnly + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandIdentifyFromTransactionParams::HighConfidenceOnly::TRUE } + + variant const: -> { BrandDev::Models::BrandIdentifyFromTransactionParams::HighConfidenceOnly::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandIdentifyFromTransactionParams::MaxSpeed::TRUE } + + variant const: -> { BrandDev::Models::BrandIdentifyFromTransactionParams::MaxSpeed::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Optional Merchant Category Code (MCC) to help identify the business + # category/industry. + module Mcc + extend BrandDev::Internal::Type::Union + + variant String + + variant Float + + # @!method self.variants + # @return [Array(String, Float)] + end + + # Optional phone number from the transaction to help verify brand match. + module Phone + extend BrandDev::Internal::Type::Union + + variant String + + variant Float + + # @!method self.variants + # @return [Array(String, Float)] + end end end end diff --git a/lib/brand_dev/models/brand_identify_from_transaction_response.rb b/lib/brand_dev/models/brand_identify_from_transaction_response.rb index bee60ee7..004960b0 100644 --- a/lib/brand_dev/models/brand_identify_from_transaction_response.rb +++ b/lib/brand_dev/models/brand_identify_from_transaction_response.rb @@ -16,17 +16,29 @@ class BrandIdentifyFromTransactionResponse < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :code, Integer + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # # @return [String, nil] optional :status, String - # @!method initialize(brand: nil, code: nil, status: nil) + # @!method initialize(brand: nil, code: nil, key_metadata: nil, status: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandIdentifyFromTransactionResponse} for more details. + # # @param brand [BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand] Detailed brand information # # @param code [Integer] HTTP status code # + # @param key_metadata [BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # @see BrandDev::Models::BrandIdentifyFromTransactionResponse#brand @@ -100,6 +112,14 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :phone, String + # @!attribute primary_language + # Language to force for the retrieved brand data. + # + # @return [Symbol, BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage, nil] + optional :primary_language, + enum: -> { BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage }, + nil?: true + # @!attribute slogan # The brand's slogan # @@ -126,7 +146,7 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :title, String - # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, slogan: nil, socials: nil, stock: nil, title: nil) + # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, primary_language: nil, slogan: nil, socials: nil, stock: nil, title: nil) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand} for more # details. @@ -155,6 +175,8 @@ class Brand < BrandDev::Internal::Type::BaseModel # # @param phone [String] Company phone number # + # @param primary_language [Symbol, BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage, nil] Language to force for the retrieved brand data. + # # @param slogan [String] The brand's slogan # # @param socials [Array] An array of social media links for the brand @@ -447,7 +469,6 @@ module Subindustry STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO = :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT = :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS = :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS = :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT = :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES = :"Virtual Worlds & Metaverse Experiences" @@ -508,6 +529,7 @@ module Subindustry STREETWEAR_EMERGING_LUXURY = :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE = :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM = :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS = :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO = :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA = :"Podcasting & Audio Media" @@ -807,12 +829,143 @@ module Type end end + # Language to force for the retrieved brand data. + # + # @see BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand#primary_language + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS = :afrikaans + ALBANIAN = :albanian + AMHARIC = :amharic + ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara + AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian + BENGALI = :bengali + BOSNIAN = :bosnian + BULGARIAN = :bulgarian + BURMESE = :burmese + CANTONESE = :cantonese + CATALAN = :catalan + CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican + CROATIAN = :croatian + CZECH = :czech + DANISH = :danish + DUTCH = :dutch + ENGLISH = :english + ESPERANTO = :esperanto + ESTONIAN = :estonian + FARSI = :farsi + FIJIAN = :fijian + FINNISH = :finnish + FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian + GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" + HAUSA = :hausa + HAWAIIAN = :hawaiian + HEBREW = :hebrew + HINDI = :hindi + HMONG = :hmong + HUNGARIAN = :hungarian + ICELANDIC = :icelandic + IGBO = :igbo + INDONESIAN = :indonesian + IRISH = :irish + ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada + KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda + KOREAN = :korean + KURDISH = :kurdish + KYRGYZ = :kyrgyz + LAO = :lao + LATIN = :latin + LATVIAN = :latvian + LINGALA = :lingala + LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish + MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi + MONGOLIAN = :mongolian + NEPALI = :nepali + NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo + PASHTO = :pashto + PIDGIN = :pidgin + POLISH = :polish + PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua + ROMANIAN = :romanian + RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" + SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala + SLOVAK = :slovak + SLOVENE = :slovene + SOMALI = :somali + SPANISH = :spanish + SUNDANESE = :sundanese + SWAHILI = :swahili + SWEDISH = :swedish + TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu + THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana + TURKISH = :turkish + TURKMEN = :turkmen + UKRAINIAN = :ukrainian + URDU = :urdu + UYGHUR = :uyghur + UZBEK = :uzbek + VIETNAMESE = :vietnamese + WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu + + # @!method self.values + # @return [Array] + end + class Social < BrandDev::Internal::Type::BaseModel # @!attribute type - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform # - # @return [String, nil] - optional :type, String + # @return [Symbol, BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type, nil] + optional :type, enum: -> { BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type } # @!attribute url # URL of the social media page @@ -821,9 +974,51 @@ class Social < BrandDev::Internal::Type::BaseModel optional :url, String # @!method initialize(type: nil, url: nil) - # @param type [String] Type of social media, e.g., 'facebook', 'twitter' + # @param type [Symbol, BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type] Type of social media platform # # @param url [String] URL of the social media page + + # Type of social media platform + # + # @see BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social#type + module Type + extend BrandDev::Internal::Type::Enum + + X = :x + FACEBOOK = :facebook + INSTAGRAM = :instagram + LINKEDIN = :linkedin + YOUTUBE = :youtube + PINTEREST = :pinterest + TIKTOK = :tiktok + DRIBBBLE = :dribbble + GITHUB = :github + BEHANCE = :behance + SNAPCHAT = :snapchat + WHATSAPP = :whatsapp + TELEGRAM = :telegram + LINE = :line + DISCORD = :discord + TWITCH = :twitch + VIMEO = :vimeo + IMDB = :imdb + TUMBLR = :tumblr + FLICKR = :flickr + GIPHY = :giphy + MEDIUM = :medium + SPOTIFY = :spotify + SOUNDCLOUD = :soundcloud + TRIPADVISOR = :tripadvisor + YELP = :yelp + PRODUCTHUNT = :producthunt + REDDIT = :reddit + CRUNCHBASE = :crunchbase + APPSTORE = :appstore + PLAYSTORE = :playstore + + # @!method self.values + # @return [Array] + end end # @see BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand#stock @@ -849,6 +1044,29 @@ class Stock < BrandDev::Internal::Type::BaseModel # @param ticker [String] Stock ticker symbol end end + + # @see BrandDev::Models::BrandIdentifyFromTransactionResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_prefetch_by_email_params.rb b/lib/brand_dev/models/brand_prefetch_by_email_params.rb index f7a15384..eaceab20 100644 --- a/lib/brand_dev/models/brand_prefetch_by_email_params.rb +++ b/lib/brand_dev/models/brand_prefetch_by_email_params.rb @@ -15,6 +15,12 @@ class BrandPrefetchByEmailParams < BrandDev::Internal::Type::BaseModel # @return [String] required :email, String + # @!attribute tags + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -23,12 +29,14 @@ class BrandPrefetchByEmailParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS - # @!method initialize(email:, timeout_ms: nil, request_options: {}) + # @!method initialize(email:, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandPrefetchByEmailParams} for more details. # # @param email [String] Email address to prefetch brand data for. The domain will be extracted from the # + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/brand_dev/models/brand_prefetch_by_email_response.rb b/lib/brand_dev/models/brand_prefetch_by_email_response.rb index cf93c18d..74897607 100644 --- a/lib/brand_dev/models/brand_prefetch_by_email_response.rb +++ b/lib/brand_dev/models/brand_prefetch_by_email_response.rb @@ -10,6 +10,13 @@ class BrandPrefetchByEmailResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :domain, String + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata } + # @!attribute message # Success message # @@ -22,12 +29,40 @@ class BrandPrefetchByEmailResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :status, String - # @!method initialize(domain: nil, message: nil, status: nil) + # @!method initialize(domain: nil, key_metadata: nil, message: nil, status: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandPrefetchByEmailResponse} for more details. + # # @param domain [String] The domain that was queued for prefetching # + # @param key_metadata [BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param message [String] Success message # # @param status [String] Status of the response, e.g., 'ok' + + # @see BrandDev::Models::BrandPrefetchByEmailResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_prefetch_params.rb b/lib/brand_dev/models/brand_prefetch_params.rb index 038a8fd9..14495f1a 100644 --- a/lib/brand_dev/models/brand_prefetch_params.rb +++ b/lib/brand_dev/models/brand_prefetch_params.rb @@ -13,6 +13,12 @@ class BrandPrefetchParams < BrandDev::Internal::Type::BaseModel # @return [String] required :domain, String + # @!attribute tags + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -21,12 +27,14 @@ class BrandPrefetchParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS - # @!method initialize(domain:, timeout_ms: nil, request_options: {}) + # @!method initialize(domain:, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandPrefetchParams} for more details. # # @param domain [String] Domain name to prefetch brand data for # + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/brand_dev/models/brand_prefetch_response.rb b/lib/brand_dev/models/brand_prefetch_response.rb index 20186df7..4246b110 100644 --- a/lib/brand_dev/models/brand_prefetch_response.rb +++ b/lib/brand_dev/models/brand_prefetch_response.rb @@ -10,6 +10,13 @@ class BrandPrefetchResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :domain, String + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandPrefetchResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandPrefetchResponse::KeyMetadata } + # @!attribute message # Success message # @@ -22,12 +29,40 @@ class BrandPrefetchResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :status, String - # @!method initialize(domain: nil, message: nil, status: nil) + # @!method initialize(domain: nil, key_metadata: nil, message: nil, status: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandPrefetchResponse} for more details. + # # @param domain [String] The domain that was queued for prefetching # + # @param key_metadata [BrandDev::Models::BrandPrefetchResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param message [String] Success message # # @param status [String] Status of the response, e.g., 'ok' + + # @see BrandDev::Models::BrandPrefetchResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_by_email_params.rb b/lib/brand_dev/models/brand_retrieve_by_email_params.rb index 645024aa..8d48eaad 100644 --- a/lib/brand_dev/models/brand_retrieve_by_email_params.rb +++ b/lib/brand_dev/models/brand_retrieve_by_email_params.rb @@ -16,18 +16,35 @@ class BrandRetrieveByEmailParams < BrandDev::Internal::Type::BaseModel required :email, String # @!attribute force_language - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. # # @return [Symbol, BrandDev::Models::BrandRetrieveByEmailParams::ForceLanguage, nil] - optional :force_language, enum: -> { BrandDev::BrandRetrieveByEmailParams::ForceLanguage } + optional :force_language, enum: -> { BrandDev::BrandRetrieveByEmailParams::ForceLanguage }, nil?: true + + # @!attribute max_age_ms + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true # @!attribute max_speed # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. # - # @return [Boolean, nil] - optional :max_speed, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandRetrieveByEmailParams::MaxSpeed, nil] + optional :max_speed, union: -> { BrandDev::BrandRetrieveByEmailParams::MaxSpeed } + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer @@ -37,83 +54,179 @@ class BrandRetrieveByEmailParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(email:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(email:, force_language: nil, max_age_ms: nil, max_speed: nil, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByEmailParams} for more details. # # @param email [String] Email address to retrieve brand data for (e.g., 'contact@example.com'). The doma # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByEmailParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByEmailParams::ForceLanguage, nil] Language to force for the retrieved brand data. # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveByEmailParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS = :afrikaans ALBANIAN = :albanian + AMHARIC = :amharic ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian BENGALI = :bengali + BOSNIAN = :bosnian BULGARIAN = :bulgarian + BURMESE = :burmese CANTONESE = :cantonese + CATALAN = :catalan CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican CROATIAN = :croatian CZECH = :czech DANISH = :danish DUTCH = :dutch ENGLISH = :english + ESPERANTO = :esperanto ESTONIAN = :estonian FARSI = :farsi + FIJIAN = :fijian FINNISH = :finnish FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" HAUSA = :hausa HAWAIIAN = :hawaiian + HEBREW = :hebrew HINDI = :hindi + HMONG = :hmong HUNGARIAN = :hungarian ICELANDIC = :icelandic + IGBO = :igbo INDONESIAN = :indonesian + IRISH = :irish ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda KOREAN = :korean + KURDISH = :kurdish KYRGYZ = :kyrgyz + LAO = :lao LATIN = :latin LATVIAN = :latvian + LINGALA = :lingala LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi MONGOLIAN = :mongolian NEPALI = :nepali NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo PASHTO = :pashto PIDGIN = :pidgin POLISH = :polish PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua ROMANIAN = :romanian RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala SLOVAK = :slovak SLOVENE = :slovene SOMALI = :somali SPANISH = :spanish + SUNDANESE = :sundanese SWAHILI = :swahili SWEDISH = :swedish TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana TURKISH = :turkish + TURKMEN = :turkmen UKRAINIAN = :ukrainian URDU = :urdu + UYGHUR = :uyghur UZBEK = :uzbek VIETNAMESE = :vietnamese WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu # @!method self.values # @return [Array] end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandRetrieveByEmailParams::MaxSpeed::TRUE } + + variant const: -> { BrandDev::Models::BrandRetrieveByEmailParams::MaxSpeed::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandRetrieveByEmailParams::MaxSpeed::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_by_email_response.rb b/lib/brand_dev/models/brand_retrieve_by_email_response.rb index 5971498a..0e2979ff 100644 --- a/lib/brand_dev/models/brand_retrieve_by_email_response.rb +++ b/lib/brand_dev/models/brand_retrieve_by_email_response.rb @@ -16,17 +16,29 @@ class BrandRetrieveByEmailResponse < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :code, Integer + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # # @return [String, nil] optional :status, String - # @!method initialize(brand: nil, code: nil, status: nil) + # @!method initialize(brand: nil, code: nil, key_metadata: nil, status: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandRetrieveByEmailResponse} for more details. + # # @param brand [BrandDev::Models::BrandRetrieveByEmailResponse::Brand] Detailed brand information # # @param code [Integer] HTTP status code # + # @param key_metadata [BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # @see BrandDev::Models::BrandRetrieveByEmailResponse#brand @@ -100,6 +112,14 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :phone, String + # @!attribute primary_language + # Language to force for the retrieved brand data. + # + # @return [Symbol, BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage, nil] + optional :primary_language, + enum: -> { BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage }, + nil?: true + # @!attribute slogan # The brand's slogan # @@ -126,7 +146,7 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :title, String - # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, slogan: nil, socials: nil, stock: nil, title: nil) + # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, primary_language: nil, slogan: nil, socials: nil, stock: nil, title: nil) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByEmailResponse::Brand} for more details. # @@ -154,6 +174,8 @@ class Brand < BrandDev::Internal::Type::BaseModel # # @param phone [String] Company phone number # + # @param primary_language [Symbol, BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage, nil] Language to force for the retrieved brand data. + # # @param slogan [String] The brand's slogan # # @param socials [Array] An array of social media links for the brand @@ -445,7 +467,6 @@ module Subindustry STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO = :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT = :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS = :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS = :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT = :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES = :"Virtual Worlds & Metaverse Experiences" @@ -506,6 +527,7 @@ module Subindustry STREETWEAR_EMERGING_LUXURY = :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE = :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM = :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS = :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO = :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA = :"Podcasting & Audio Media" @@ -803,12 +825,143 @@ module Type end end + # Language to force for the retrieved brand data. + # + # @see BrandDev::Models::BrandRetrieveByEmailResponse::Brand#primary_language + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS = :afrikaans + ALBANIAN = :albanian + AMHARIC = :amharic + ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara + AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian + BENGALI = :bengali + BOSNIAN = :bosnian + BULGARIAN = :bulgarian + BURMESE = :burmese + CANTONESE = :cantonese + CATALAN = :catalan + CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican + CROATIAN = :croatian + CZECH = :czech + DANISH = :danish + DUTCH = :dutch + ENGLISH = :english + ESPERANTO = :esperanto + ESTONIAN = :estonian + FARSI = :farsi + FIJIAN = :fijian + FINNISH = :finnish + FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian + GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" + HAUSA = :hausa + HAWAIIAN = :hawaiian + HEBREW = :hebrew + HINDI = :hindi + HMONG = :hmong + HUNGARIAN = :hungarian + ICELANDIC = :icelandic + IGBO = :igbo + INDONESIAN = :indonesian + IRISH = :irish + ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada + KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda + KOREAN = :korean + KURDISH = :kurdish + KYRGYZ = :kyrgyz + LAO = :lao + LATIN = :latin + LATVIAN = :latvian + LINGALA = :lingala + LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish + MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi + MONGOLIAN = :mongolian + NEPALI = :nepali + NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo + PASHTO = :pashto + PIDGIN = :pidgin + POLISH = :polish + PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua + ROMANIAN = :romanian + RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" + SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala + SLOVAK = :slovak + SLOVENE = :slovene + SOMALI = :somali + SPANISH = :spanish + SUNDANESE = :sundanese + SWAHILI = :swahili + SWEDISH = :swedish + TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu + THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana + TURKISH = :turkish + TURKMEN = :turkmen + UKRAINIAN = :ukrainian + URDU = :urdu + UYGHUR = :uyghur + UZBEK = :uzbek + VIETNAMESE = :vietnamese + WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu + + # @!method self.values + # @return [Array] + end + class Social < BrandDev::Internal::Type::BaseModel # @!attribute type - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform # - # @return [String, nil] - optional :type, String + # @return [Symbol, BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type, nil] + optional :type, enum: -> { BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type } # @!attribute url # URL of the social media page @@ -817,9 +970,51 @@ class Social < BrandDev::Internal::Type::BaseModel optional :url, String # @!method initialize(type: nil, url: nil) - # @param type [String] Type of social media, e.g., 'facebook', 'twitter' + # @param type [Symbol, BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type] Type of social media platform # # @param url [String] URL of the social media page + + # Type of social media platform + # + # @see BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social#type + module Type + extend BrandDev::Internal::Type::Enum + + X = :x + FACEBOOK = :facebook + INSTAGRAM = :instagram + LINKEDIN = :linkedin + YOUTUBE = :youtube + PINTEREST = :pinterest + TIKTOK = :tiktok + DRIBBBLE = :dribbble + GITHUB = :github + BEHANCE = :behance + SNAPCHAT = :snapchat + WHATSAPP = :whatsapp + TELEGRAM = :telegram + LINE = :line + DISCORD = :discord + TWITCH = :twitch + VIMEO = :vimeo + IMDB = :imdb + TUMBLR = :tumblr + FLICKR = :flickr + GIPHY = :giphy + MEDIUM = :medium + SPOTIFY = :spotify + SOUNDCLOUD = :soundcloud + TRIPADVISOR = :tripadvisor + YELP = :yelp + PRODUCTHUNT = :producthunt + REDDIT = :reddit + CRUNCHBASE = :crunchbase + APPSTORE = :appstore + PLAYSTORE = :playstore + + # @!method self.values + # @return [Array] + end end # @see BrandDev::Models::BrandRetrieveByEmailResponse::Brand#stock @@ -845,6 +1040,29 @@ class Stock < BrandDev::Internal::Type::BaseModel # @param ticker [String] Stock ticker symbol end end + + # @see BrandDev::Models::BrandRetrieveByEmailResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_by_isin_params.rb b/lib/brand_dev/models/brand_retrieve_by_isin_params.rb index 563edf88..5f884382 100644 --- a/lib/brand_dev/models/brand_retrieve_by_isin_params.rb +++ b/lib/brand_dev/models/brand_retrieve_by_isin_params.rb @@ -16,18 +16,35 @@ class BrandRetrieveByIsinParams < BrandDev::Internal::Type::BaseModel required :isin, String # @!attribute force_language - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. # # @return [Symbol, BrandDev::Models::BrandRetrieveByIsinParams::ForceLanguage, nil] - optional :force_language, enum: -> { BrandDev::BrandRetrieveByIsinParams::ForceLanguage } + optional :force_language, enum: -> { BrandDev::BrandRetrieveByIsinParams::ForceLanguage }, nil?: true + + # @!attribute max_age_ms + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true # @!attribute max_speed # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. # - # @return [Boolean, nil] - optional :max_speed, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandRetrieveByIsinParams::MaxSpeed, nil] + optional :max_speed, union: -> { BrandDev::BrandRetrieveByIsinParams::MaxSpeed } + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer @@ -37,83 +54,179 @@ class BrandRetrieveByIsinParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(isin:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(isin:, force_language: nil, max_age_ms: nil, max_speed: nil, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByIsinParams} for more details. # # @param isin [String] ISIN (International Securities Identification Number) to retrieve brand data for # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByIsinParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByIsinParams::ForceLanguage, nil] Language to force for the retrieved brand data. # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveByIsinParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS = :afrikaans ALBANIAN = :albanian + AMHARIC = :amharic ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian BENGALI = :bengali + BOSNIAN = :bosnian BULGARIAN = :bulgarian + BURMESE = :burmese CANTONESE = :cantonese + CATALAN = :catalan CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican CROATIAN = :croatian CZECH = :czech DANISH = :danish DUTCH = :dutch ENGLISH = :english + ESPERANTO = :esperanto ESTONIAN = :estonian FARSI = :farsi + FIJIAN = :fijian FINNISH = :finnish FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" HAUSA = :hausa HAWAIIAN = :hawaiian + HEBREW = :hebrew HINDI = :hindi + HMONG = :hmong HUNGARIAN = :hungarian ICELANDIC = :icelandic + IGBO = :igbo INDONESIAN = :indonesian + IRISH = :irish ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda KOREAN = :korean + KURDISH = :kurdish KYRGYZ = :kyrgyz + LAO = :lao LATIN = :latin LATVIAN = :latvian + LINGALA = :lingala LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi MONGOLIAN = :mongolian NEPALI = :nepali NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo PASHTO = :pashto PIDGIN = :pidgin POLISH = :polish PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua ROMANIAN = :romanian RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala SLOVAK = :slovak SLOVENE = :slovene SOMALI = :somali SPANISH = :spanish + SUNDANESE = :sundanese SWAHILI = :swahili SWEDISH = :swedish TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana TURKISH = :turkish + TURKMEN = :turkmen UKRAINIAN = :ukrainian URDU = :urdu + UYGHUR = :uyghur UZBEK = :uzbek VIETNAMESE = :vietnamese WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu # @!method self.values # @return [Array] end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandRetrieveByIsinParams::MaxSpeed::TRUE } + + variant const: -> { BrandDev::Models::BrandRetrieveByIsinParams::MaxSpeed::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandRetrieveByIsinParams::MaxSpeed::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_by_isin_response.rb b/lib/brand_dev/models/brand_retrieve_by_isin_response.rb index 986b1c83..95ea80d1 100644 --- a/lib/brand_dev/models/brand_retrieve_by_isin_response.rb +++ b/lib/brand_dev/models/brand_retrieve_by_isin_response.rb @@ -16,17 +16,29 @@ class BrandRetrieveByIsinResponse < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :code, Integer + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # # @return [String, nil] optional :status, String - # @!method initialize(brand: nil, code: nil, status: nil) + # @!method initialize(brand: nil, code: nil, key_metadata: nil, status: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandRetrieveByIsinResponse} for more details. + # # @param brand [BrandDev::Models::BrandRetrieveByIsinResponse::Brand] Detailed brand information # # @param code [Integer] HTTP status code # + # @param key_metadata [BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # @see BrandDev::Models::BrandRetrieveByIsinResponse#brand @@ -100,6 +112,14 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :phone, String + # @!attribute primary_language + # Language to force for the retrieved brand data. + # + # @return [Symbol, BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage, nil] + optional :primary_language, + enum: -> { BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage }, + nil?: true + # @!attribute slogan # The brand's slogan # @@ -126,7 +146,7 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :title, String - # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, slogan: nil, socials: nil, stock: nil, title: nil) + # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, primary_language: nil, slogan: nil, socials: nil, stock: nil, title: nil) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByIsinResponse::Brand} for more details. # @@ -154,6 +174,8 @@ class Brand < BrandDev::Internal::Type::BaseModel # # @param phone [String] Company phone number # + # @param primary_language [Symbol, BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage, nil] Language to force for the retrieved brand data. + # # @param slogan [String] The brand's slogan # # @param socials [Array] An array of social media links for the brand @@ -445,7 +467,6 @@ module Subindustry STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO = :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT = :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS = :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS = :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT = :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES = :"Virtual Worlds & Metaverse Experiences" @@ -506,6 +527,7 @@ module Subindustry STREETWEAR_EMERGING_LUXURY = :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE = :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM = :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS = :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO = :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA = :"Podcasting & Audio Media" @@ -803,12 +825,143 @@ module Type end end + # Language to force for the retrieved brand data. + # + # @see BrandDev::Models::BrandRetrieveByIsinResponse::Brand#primary_language + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS = :afrikaans + ALBANIAN = :albanian + AMHARIC = :amharic + ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara + AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian + BENGALI = :bengali + BOSNIAN = :bosnian + BULGARIAN = :bulgarian + BURMESE = :burmese + CANTONESE = :cantonese + CATALAN = :catalan + CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican + CROATIAN = :croatian + CZECH = :czech + DANISH = :danish + DUTCH = :dutch + ENGLISH = :english + ESPERANTO = :esperanto + ESTONIAN = :estonian + FARSI = :farsi + FIJIAN = :fijian + FINNISH = :finnish + FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian + GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" + HAUSA = :hausa + HAWAIIAN = :hawaiian + HEBREW = :hebrew + HINDI = :hindi + HMONG = :hmong + HUNGARIAN = :hungarian + ICELANDIC = :icelandic + IGBO = :igbo + INDONESIAN = :indonesian + IRISH = :irish + ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada + KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda + KOREAN = :korean + KURDISH = :kurdish + KYRGYZ = :kyrgyz + LAO = :lao + LATIN = :latin + LATVIAN = :latvian + LINGALA = :lingala + LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish + MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi + MONGOLIAN = :mongolian + NEPALI = :nepali + NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo + PASHTO = :pashto + PIDGIN = :pidgin + POLISH = :polish + PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua + ROMANIAN = :romanian + RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" + SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala + SLOVAK = :slovak + SLOVENE = :slovene + SOMALI = :somali + SPANISH = :spanish + SUNDANESE = :sundanese + SWAHILI = :swahili + SWEDISH = :swedish + TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu + THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana + TURKISH = :turkish + TURKMEN = :turkmen + UKRAINIAN = :ukrainian + URDU = :urdu + UYGHUR = :uyghur + UZBEK = :uzbek + VIETNAMESE = :vietnamese + WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu + + # @!method self.values + # @return [Array] + end + class Social < BrandDev::Internal::Type::BaseModel # @!attribute type - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform # - # @return [String, nil] - optional :type, String + # @return [Symbol, BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type, nil] + optional :type, enum: -> { BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type } # @!attribute url # URL of the social media page @@ -817,9 +970,51 @@ class Social < BrandDev::Internal::Type::BaseModel optional :url, String # @!method initialize(type: nil, url: nil) - # @param type [String] Type of social media, e.g., 'facebook', 'twitter' + # @param type [Symbol, BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type] Type of social media platform # # @param url [String] URL of the social media page + + # Type of social media platform + # + # @see BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social#type + module Type + extend BrandDev::Internal::Type::Enum + + X = :x + FACEBOOK = :facebook + INSTAGRAM = :instagram + LINKEDIN = :linkedin + YOUTUBE = :youtube + PINTEREST = :pinterest + TIKTOK = :tiktok + DRIBBBLE = :dribbble + GITHUB = :github + BEHANCE = :behance + SNAPCHAT = :snapchat + WHATSAPP = :whatsapp + TELEGRAM = :telegram + LINE = :line + DISCORD = :discord + TWITCH = :twitch + VIMEO = :vimeo + IMDB = :imdb + TUMBLR = :tumblr + FLICKR = :flickr + GIPHY = :giphy + MEDIUM = :medium + SPOTIFY = :spotify + SOUNDCLOUD = :soundcloud + TRIPADVISOR = :tripadvisor + YELP = :yelp + PRODUCTHUNT = :producthunt + REDDIT = :reddit + CRUNCHBASE = :crunchbase + APPSTORE = :appstore + PLAYSTORE = :playstore + + # @!method self.values + # @return [Array] + end end # @see BrandDev::Models::BrandRetrieveByIsinResponse::Brand#stock @@ -845,6 +1040,29 @@ class Stock < BrandDev::Internal::Type::BaseModel # @param ticker [String] Stock ticker symbol end end + + # @see BrandDev::Models::BrandRetrieveByIsinResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_by_name_params.rb b/lib/brand_dev/models/brand_retrieve_by_name_params.rb index 7502dcb4..35e4635c 100644 --- a/lib/brand_dev/models/brand_retrieve_by_name_params.rb +++ b/lib/brand_dev/models/brand_retrieve_by_name_params.rb @@ -15,25 +15,42 @@ class BrandRetrieveByNameParams < BrandDev::Internal::Type::BaseModel required :name, String # @!attribute country_gl - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. # # @return [Symbol, BrandDev::Models::BrandRetrieveByNameParams::CountryGl, nil] optional :country_gl, enum: -> { BrandDev::BrandRetrieveByNameParams::CountryGl } # @!attribute force_language - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. # # @return [Symbol, BrandDev::Models::BrandRetrieveByNameParams::ForceLanguage, nil] - optional :force_language, enum: -> { BrandDev::BrandRetrieveByNameParams::ForceLanguage } + optional :force_language, enum: -> { BrandDev::BrandRetrieveByNameParams::ForceLanguage }, nil?: true + + # @!attribute max_age_ms + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true # @!attribute max_speed # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. # - # @return [Boolean, nil] - optional :max_speed, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandRetrieveByNameParams::MaxSpeed, nil] + optional :max_speed, union: -> { BrandDev::BrandRetrieveByNameParams::MaxSpeed } + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer @@ -43,264 +60,268 @@ class BrandRetrieveByNameParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(name:, country_gl: nil, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(name:, country_gl: nil, force_language: nil, max_age_ms: nil, max_speed: nil, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByNameParams} for more details. # # @param name [String] Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft Corporati # - # @param country_gl [Symbol, BrandDev::Models::BrandRetrieveByNameParams::CountryGl] Optional country code (GL parameter) to specify the country. This affects the ge + # @param country_gl [Symbol, BrandDev::Models::BrandRetrieveByNameParams::CountryGl] Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize searc # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByNameParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByNameParams::ForceLanguage, nil] Language to force for the retrieved brand data. # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveByNameParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. module CountryGl extend BrandDev::Internal::Type::Enum - AD = :ad - AE = :ae AF = :af - AG = :ag - AI = :ai AL = :al - AM = :am - AN = :an + DZ = :dz + AS = :as + AD = :ad AO = :ao + AI = :ai AQ = :aq + AG = :ag AR = :ar - AS = :as - AT = :at - AU = :au + AM = :am AW = :aw + AU = :au + AT = :at AZ = :az - BA = :ba - BB = :bb + BS = :bs + BH = :bh BD = :bd + BB = :bb + BY = :by BE = :be - BF = :bf - BG = :bg - BH = :bh - BI = :bi + BZ = :bz BJ = :bj BM = :bm - BN = :bn - BO = :bo - BR = :br - BS = :bs BT = :bt - BV = :bv + BO = :bo + BA = :ba BW = :bw - BY = :by - BZ = :bz + BV = :bv + BR = :br + IO = :io + BN = :bn + BG = :bg + BF = :bf + BI = :bi + KH = :kh + CM = :cm CA = :ca - CC = :cc - CD = :cd + CV = :cv + KY = :ky CF = :cf - CG = :cg - CH = :ch - CI = :ci - CK = :ck + TD = :td CL = :cl - CM = :cm CN = :cn + CX = :cx + CC = :cc CO = :co + KM = :km + CG = :cg + CD = :cd + CK = :ck CR = :cr + CI = :ci + HR = :hr CU = :cu - CV = :cv - CX = :cx CY = :cy CZ = :cz - DE = :de - DJ = :dj DK = :dk + DJ = :dj DM = :dm DO = :do - DZ = :dz EC = :ec - EE = :ee EG = :eg - EH = :eh + SV = :sv + GQ = :gq ER = :er - ES = :es + EE = :ee ET = :et - FI = :fi - FJ = :fj FK = :fk - FM = :fm FO = :fo + FJ = :fj + FI = :fi FR = :fr + GF = :gf + PF = :pf + TF = :tf GA = :ga - GB = :gb - GD = :gd + GM = :gm GE = :ge - GF = :gf + DE = :de GH = :gh GI = :gi + GR = :gr GL = :gl - GM = :gm - GN = :gn + GD = :gd GP = :gp - GQ = :gq - GR = :gr - GS = :gs - GT = :gt GU = :gu + GT = :gt + GN = :gn GW = :gw GY = :gy - HK = :hk + HT = :ht HM = :hm + VA = :va HN = :hn - HR = :hr - HT = :ht + HK = :hk HU = :hu + IS = :is + IN = :in ID = :id + IR = :ir + IQ = :iq IE = :ie IL = :il - IN = :in - IO = :io - IQ = :iq - IR = :ir - IS = :is IT = :it JM = :jm - JO = :jo JP = :jp + JO = :jo + KZ = :kz KE = :ke - KG = :kg - KH = :kh KI = :ki - KM = :km - KN = :kn KP = :kp KR = :kr KW = :kw - KY = :ky - KZ = :kz + KG = :kg LA = :la + LV = :lv LB = :lb - LC = :lc - LI = :li - LK = :lk - LR = :lr LS = :ls + LR = :lr + LY = :ly + LI = :li LT = :lt LU = :lu - LV = :lv - LY = :ly - MA = :ma - MC = :mc - MD = :md - MG = :mg - MH = :mh + MO = :mo MK = :mk + MG = :mg + MW = :mw + MY = :my + MV = :mv ML = :ml - MM = :mm - MN = :mn - MO = :mo - MP = :mp + MT = :mt + MH = :mh MQ = :mq MR = :mr - MS = :ms - MT = :mt MU = :mu - MV = :mv - MW = :mw + YT = :yt MX = :mx - MY = :my + FM = :fm + MD = :md + MC = :mc + MN = :mn + MS = :ms + MA = :ma MZ = :mz + MM = :mm NA = :na + NR = :nr + NP = :np + NL = :nl + AN = :an NC = :nc + NZ = :nz + NI = :ni NE = :ne - NF = :nf NG = :ng - NI = :ni - NL = :nl - NO = :no - NP = :np - NR = :nr NU = :nu - NZ = :nz + NF = :nf + MP = :mp + NO = :no OM = :om + PK = :pk + PW = :pw + PS = :ps PA = :pa - PE = :pe - PF = :pf PG = :pg + PY = :py + PE = :pe PH = :ph - PK = :pk - PL = :pl - PM = :pm PN = :pn - PR = :pr - PS = :ps + PL = :pl PT = :pt - PW = :pw - PY = :py + PR = :pr QA = :qa RE = :re RO = :ro - RS = :rs RU = :ru RW = :rw + SH = :sh + KN = :kn + LC = :lc + PM = :pm + VC = :vc + WS = :ws + SM = :sm + ST = :st SA = :sa - SB = :sb + SN = :sn + RS = :rs SC = :sc - SD = :sd - SE = :se + SL = :sl SG = :sg - SH = :sh - SI = :si - SJ = :sj SK = :sk - SL = :sl - SM = :sm - SN = :sn + SI = :si + SB = :sb SO = :so + ZA = :za + GS = :gs + ES = :es + LK = :lk + SD = :sd SR = :sr - ST = :st - SV = :sv - SY = :sy + SJ = :sj SZ = :sz - TC = :tc - TD = :td - TF = :tf - TG = :tg - TH = :th + SE = :se + CH = :ch + SY = :sy + TW = :tw TJ = :tj - TK = :tk + TZ = :tz + TH = :th TL = :tl - TM = :tm - TN = :tn + TG = :tg + TK = :tk TO = :to - TR = :tr TT = :tt + TN = :tn + TR = :tr + TM = :tm + TC = :tc TV = :tv - TW = :tw - TZ = :tz - UA = :ua UG = :ug - UM = :um + UA = :ua + AE = :ae + GB = :gb US = :us + UM = :um UY = :uy UZ = :uz - VA = :va - VC = :vc + VU = :vu VE = :ve + VN = :vn VG = :vg VI = :vi - VN = :vn - VU = :vu WF = :wf - WS = :ws + EH = :eh YE = :ye - YT = :yt - ZA = :za ZM = :zm ZW = :zw @@ -308,69 +329,161 @@ module CountryGl # @return [Array] end - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS = :afrikaans ALBANIAN = :albanian + AMHARIC = :amharic ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian BENGALI = :bengali + BOSNIAN = :bosnian BULGARIAN = :bulgarian + BURMESE = :burmese CANTONESE = :cantonese + CATALAN = :catalan CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican CROATIAN = :croatian CZECH = :czech DANISH = :danish DUTCH = :dutch ENGLISH = :english + ESPERANTO = :esperanto ESTONIAN = :estonian FARSI = :farsi + FIJIAN = :fijian FINNISH = :finnish FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" HAUSA = :hausa HAWAIIAN = :hawaiian + HEBREW = :hebrew HINDI = :hindi + HMONG = :hmong HUNGARIAN = :hungarian ICELANDIC = :icelandic + IGBO = :igbo INDONESIAN = :indonesian + IRISH = :irish ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda KOREAN = :korean + KURDISH = :kurdish KYRGYZ = :kyrgyz + LAO = :lao LATIN = :latin LATVIAN = :latvian + LINGALA = :lingala LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi MONGOLIAN = :mongolian NEPALI = :nepali NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo PASHTO = :pashto PIDGIN = :pidgin POLISH = :polish PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua ROMANIAN = :romanian RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala SLOVAK = :slovak SLOVENE = :slovene SOMALI = :somali SPANISH = :spanish + SUNDANESE = :sundanese SWAHILI = :swahili SWEDISH = :swedish TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana TURKISH = :turkish + TURKMEN = :turkmen UKRAINIAN = :ukrainian URDU = :urdu + UYGHUR = :uyghur UZBEK = :uzbek VIETNAMESE = :vietnamese WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu # @!method self.values # @return [Array] end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandRetrieveByNameParams::MaxSpeed::TRUE } + + variant const: -> { BrandDev::Models::BrandRetrieveByNameParams::MaxSpeed::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandRetrieveByNameParams::MaxSpeed::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_by_name_response.rb b/lib/brand_dev/models/brand_retrieve_by_name_response.rb index f53537cf..2419f08d 100644 --- a/lib/brand_dev/models/brand_retrieve_by_name_response.rb +++ b/lib/brand_dev/models/brand_retrieve_by_name_response.rb @@ -16,17 +16,29 @@ class BrandRetrieveByNameResponse < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :code, Integer + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # # @return [String, nil] optional :status, String - # @!method initialize(brand: nil, code: nil, status: nil) + # @!method initialize(brand: nil, code: nil, key_metadata: nil, status: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandRetrieveByNameResponse} for more details. + # # @param brand [BrandDev::Models::BrandRetrieveByNameResponse::Brand] Detailed brand information # # @param code [Integer] HTTP status code # + # @param key_metadata [BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # @see BrandDev::Models::BrandRetrieveByNameResponse#brand @@ -100,6 +112,14 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :phone, String + # @!attribute primary_language + # Language to force for the retrieved brand data. + # + # @return [Symbol, BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage, nil] + optional :primary_language, + enum: -> { BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage }, + nil?: true + # @!attribute slogan # The brand's slogan # @@ -126,7 +146,7 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :title, String - # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, slogan: nil, socials: nil, stock: nil, title: nil) + # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, primary_language: nil, slogan: nil, socials: nil, stock: nil, title: nil) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByNameResponse::Brand} for more details. # @@ -154,6 +174,8 @@ class Brand < BrandDev::Internal::Type::BaseModel # # @param phone [String] Company phone number # + # @param primary_language [Symbol, BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage, nil] Language to force for the retrieved brand data. + # # @param slogan [String] The brand's slogan # # @param socials [Array] An array of social media links for the brand @@ -445,7 +467,6 @@ module Subindustry STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO = :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT = :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS = :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS = :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT = :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES = :"Virtual Worlds & Metaverse Experiences" @@ -506,6 +527,7 @@ module Subindustry STREETWEAR_EMERGING_LUXURY = :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE = :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM = :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS = :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO = :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA = :"Podcasting & Audio Media" @@ -803,12 +825,143 @@ module Type end end + # Language to force for the retrieved brand data. + # + # @see BrandDev::Models::BrandRetrieveByNameResponse::Brand#primary_language + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS = :afrikaans + ALBANIAN = :albanian + AMHARIC = :amharic + ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara + AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian + BENGALI = :bengali + BOSNIAN = :bosnian + BULGARIAN = :bulgarian + BURMESE = :burmese + CANTONESE = :cantonese + CATALAN = :catalan + CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican + CROATIAN = :croatian + CZECH = :czech + DANISH = :danish + DUTCH = :dutch + ENGLISH = :english + ESPERANTO = :esperanto + ESTONIAN = :estonian + FARSI = :farsi + FIJIAN = :fijian + FINNISH = :finnish + FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian + GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" + HAUSA = :hausa + HAWAIIAN = :hawaiian + HEBREW = :hebrew + HINDI = :hindi + HMONG = :hmong + HUNGARIAN = :hungarian + ICELANDIC = :icelandic + IGBO = :igbo + INDONESIAN = :indonesian + IRISH = :irish + ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada + KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda + KOREAN = :korean + KURDISH = :kurdish + KYRGYZ = :kyrgyz + LAO = :lao + LATIN = :latin + LATVIAN = :latvian + LINGALA = :lingala + LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish + MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi + MONGOLIAN = :mongolian + NEPALI = :nepali + NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo + PASHTO = :pashto + PIDGIN = :pidgin + POLISH = :polish + PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua + ROMANIAN = :romanian + RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" + SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala + SLOVAK = :slovak + SLOVENE = :slovene + SOMALI = :somali + SPANISH = :spanish + SUNDANESE = :sundanese + SWAHILI = :swahili + SWEDISH = :swedish + TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu + THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana + TURKISH = :turkish + TURKMEN = :turkmen + UKRAINIAN = :ukrainian + URDU = :urdu + UYGHUR = :uyghur + UZBEK = :uzbek + VIETNAMESE = :vietnamese + WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu + + # @!method self.values + # @return [Array] + end + class Social < BrandDev::Internal::Type::BaseModel # @!attribute type - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform # - # @return [String, nil] - optional :type, String + # @return [Symbol, BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type, nil] + optional :type, enum: -> { BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type } # @!attribute url # URL of the social media page @@ -817,9 +970,51 @@ class Social < BrandDev::Internal::Type::BaseModel optional :url, String # @!method initialize(type: nil, url: nil) - # @param type [String] Type of social media, e.g., 'facebook', 'twitter' + # @param type [Symbol, BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type] Type of social media platform # # @param url [String] URL of the social media page + + # Type of social media platform + # + # @see BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social#type + module Type + extend BrandDev::Internal::Type::Enum + + X = :x + FACEBOOK = :facebook + INSTAGRAM = :instagram + LINKEDIN = :linkedin + YOUTUBE = :youtube + PINTEREST = :pinterest + TIKTOK = :tiktok + DRIBBBLE = :dribbble + GITHUB = :github + BEHANCE = :behance + SNAPCHAT = :snapchat + WHATSAPP = :whatsapp + TELEGRAM = :telegram + LINE = :line + DISCORD = :discord + TWITCH = :twitch + VIMEO = :vimeo + IMDB = :imdb + TUMBLR = :tumblr + FLICKR = :flickr + GIPHY = :giphy + MEDIUM = :medium + SPOTIFY = :spotify + SOUNDCLOUD = :soundcloud + TRIPADVISOR = :tripadvisor + YELP = :yelp + PRODUCTHUNT = :producthunt + REDDIT = :reddit + CRUNCHBASE = :crunchbase + APPSTORE = :appstore + PLAYSTORE = :playstore + + # @!method self.values + # @return [Array] + end end # @see BrandDev::Models::BrandRetrieveByNameResponse::Brand#stock @@ -845,6 +1040,29 @@ class Stock < BrandDev::Internal::Type::BaseModel # @param ticker [String] Stock ticker symbol end end + + # @see BrandDev::Models::BrandRetrieveByNameResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_by_ticker_params.rb b/lib/brand_dev/models/brand_retrieve_by_ticker_params.rb index 72ad6c6d..015998a2 100644 --- a/lib/brand_dev/models/brand_retrieve_by_ticker_params.rb +++ b/lib/brand_dev/models/brand_retrieve_by_ticker_params.rb @@ -15,21 +15,38 @@ class BrandRetrieveByTickerParams < BrandDev::Internal::Type::BaseModel required :ticker, String # @!attribute force_language - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. # # @return [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::ForceLanguage, nil] - optional :force_language, enum: -> { BrandDev::BrandRetrieveByTickerParams::ForceLanguage } + optional :force_language, enum: -> { BrandDev::BrandRetrieveByTickerParams::ForceLanguage }, nil?: true + + # @!attribute max_age_ms + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true # @!attribute max_speed # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. # - # @return [Boolean, nil] - optional :max_speed, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandRetrieveByTickerParams::MaxSpeed, nil] + optional :max_speed, union: -> { BrandDev::BrandRetrieveByTickerParams::MaxSpeed } + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] # @!attribute ticker_exchange - # Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. + # Stock exchange code. # # @return [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::TickerExchange, nil] optional :ticker_exchange, enum: -> { BrandDev::BrandRetrieveByTickerParams::TickerExchange } @@ -42,87 +59,183 @@ class BrandRetrieveByTickerParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(ticker:, force_language: nil, max_speed: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(ticker:, force_language: nil, max_age_ms: nil, max_speed: nil, tags: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByTickerParams} for more details. # # @param ticker [String] Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::ForceLanguage, nil] Language to force for the retrieved brand data. # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard # - # @param ticker_exchange [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::TickerExchange] Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveByTickerParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param ticker_exchange [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::TickerExchange] Stock exchange code. # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS = :afrikaans ALBANIAN = :albanian + AMHARIC = :amharic ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian BENGALI = :bengali + BOSNIAN = :bosnian BULGARIAN = :bulgarian + BURMESE = :burmese CANTONESE = :cantonese + CATALAN = :catalan CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican CROATIAN = :croatian CZECH = :czech DANISH = :danish DUTCH = :dutch ENGLISH = :english + ESPERANTO = :esperanto ESTONIAN = :estonian FARSI = :farsi + FIJIAN = :fijian FINNISH = :finnish FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" HAUSA = :hausa HAWAIIAN = :hawaiian + HEBREW = :hebrew HINDI = :hindi + HMONG = :hmong HUNGARIAN = :hungarian ICELANDIC = :icelandic + IGBO = :igbo INDONESIAN = :indonesian + IRISH = :irish ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda KOREAN = :korean + KURDISH = :kurdish KYRGYZ = :kyrgyz + LAO = :lao LATIN = :latin LATVIAN = :latvian + LINGALA = :lingala LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi MONGOLIAN = :mongolian NEPALI = :nepali NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo PASHTO = :pashto PIDGIN = :pidgin POLISH = :polish PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua ROMANIAN = :romanian RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala SLOVAK = :slovak SLOVENE = :slovene SOMALI = :somali SPANISH = :spanish + SUNDANESE = :sundanese SWAHILI = :swahili SWEDISH = :swedish TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana TURKISH = :turkish + TURKMEN = :turkmen UKRAINIAN = :ukrainian URDU = :urdu + UYGHUR = :uyghur UZBEK = :uzbek VIETNAMESE = :vietnamese WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu # @!method self.values # @return [Array] end - # Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandRetrieveByTickerParams::MaxSpeed::TRUE } + + variant const: -> { BrandDev::Models::BrandRetrieveByTickerParams::MaxSpeed::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandRetrieveByTickerParams::MaxSpeed::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Stock exchange code. module TickerExchange extend BrandDev::Internal::Type::Enum diff --git a/lib/brand_dev/models/brand_retrieve_by_ticker_response.rb b/lib/brand_dev/models/brand_retrieve_by_ticker_response.rb index c5428f27..bfe16b24 100644 --- a/lib/brand_dev/models/brand_retrieve_by_ticker_response.rb +++ b/lib/brand_dev/models/brand_retrieve_by_ticker_response.rb @@ -16,17 +16,29 @@ class BrandRetrieveByTickerResponse < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :code, Integer + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # # @return [String, nil] optional :status, String - # @!method initialize(brand: nil, code: nil, status: nil) + # @!method initialize(brand: nil, code: nil, key_metadata: nil, status: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandRetrieveByTickerResponse} for more details. + # # @param brand [BrandDev::Models::BrandRetrieveByTickerResponse::Brand] Detailed brand information # # @param code [Integer] HTTP status code # + # @param key_metadata [BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # @see BrandDev::Models::BrandRetrieveByTickerResponse#brand @@ -100,6 +112,14 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :phone, String + # @!attribute primary_language + # Language to force for the retrieved brand data. + # + # @return [Symbol, BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage, nil] + optional :primary_language, + enum: -> { BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage }, + nil?: true + # @!attribute slogan # The brand's slogan # @@ -126,7 +146,7 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :title, String - # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, slogan: nil, socials: nil, stock: nil, title: nil) + # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, primary_language: nil, slogan: nil, socials: nil, stock: nil, title: nil) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByTickerResponse::Brand} for more details. # @@ -154,6 +174,8 @@ class Brand < BrandDev::Internal::Type::BaseModel # # @param phone [String] Company phone number # + # @param primary_language [Symbol, BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage, nil] Language to force for the retrieved brand data. + # # @param slogan [String] The brand's slogan # # @param socials [Array] An array of social media links for the brand @@ -445,7 +467,6 @@ module Subindustry STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO = :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT = :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS = :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS = :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT = :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES = :"Virtual Worlds & Metaverse Experiences" @@ -506,6 +527,7 @@ module Subindustry STREETWEAR_EMERGING_LUXURY = :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE = :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM = :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS = :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO = :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA = :"Podcasting & Audio Media" @@ -803,12 +825,143 @@ module Type end end + # Language to force for the retrieved brand data. + # + # @see BrandDev::Models::BrandRetrieveByTickerResponse::Brand#primary_language + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS = :afrikaans + ALBANIAN = :albanian + AMHARIC = :amharic + ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara + AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian + BENGALI = :bengali + BOSNIAN = :bosnian + BULGARIAN = :bulgarian + BURMESE = :burmese + CANTONESE = :cantonese + CATALAN = :catalan + CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican + CROATIAN = :croatian + CZECH = :czech + DANISH = :danish + DUTCH = :dutch + ENGLISH = :english + ESPERANTO = :esperanto + ESTONIAN = :estonian + FARSI = :farsi + FIJIAN = :fijian + FINNISH = :finnish + FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian + GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" + HAUSA = :hausa + HAWAIIAN = :hawaiian + HEBREW = :hebrew + HINDI = :hindi + HMONG = :hmong + HUNGARIAN = :hungarian + ICELANDIC = :icelandic + IGBO = :igbo + INDONESIAN = :indonesian + IRISH = :irish + ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada + KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda + KOREAN = :korean + KURDISH = :kurdish + KYRGYZ = :kyrgyz + LAO = :lao + LATIN = :latin + LATVIAN = :latvian + LINGALA = :lingala + LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish + MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi + MONGOLIAN = :mongolian + NEPALI = :nepali + NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo + PASHTO = :pashto + PIDGIN = :pidgin + POLISH = :polish + PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua + ROMANIAN = :romanian + RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" + SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala + SLOVAK = :slovak + SLOVENE = :slovene + SOMALI = :somali + SPANISH = :spanish + SUNDANESE = :sundanese + SWAHILI = :swahili + SWEDISH = :swedish + TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu + THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana + TURKISH = :turkish + TURKMEN = :turkmen + UKRAINIAN = :ukrainian + URDU = :urdu + UYGHUR = :uyghur + UZBEK = :uzbek + VIETNAMESE = :vietnamese + WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu + + # @!method self.values + # @return [Array] + end + class Social < BrandDev::Internal::Type::BaseModel # @!attribute type - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform # - # @return [String, nil] - optional :type, String + # @return [Symbol, BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type, nil] + optional :type, enum: -> { BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type } # @!attribute url # URL of the social media page @@ -817,9 +970,51 @@ class Social < BrandDev::Internal::Type::BaseModel optional :url, String # @!method initialize(type: nil, url: nil) - # @param type [String] Type of social media, e.g., 'facebook', 'twitter' + # @param type [Symbol, BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type] Type of social media platform # # @param url [String] URL of the social media page + + # Type of social media platform + # + # @see BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social#type + module Type + extend BrandDev::Internal::Type::Enum + + X = :x + FACEBOOK = :facebook + INSTAGRAM = :instagram + LINKEDIN = :linkedin + YOUTUBE = :youtube + PINTEREST = :pinterest + TIKTOK = :tiktok + DRIBBBLE = :dribbble + GITHUB = :github + BEHANCE = :behance + SNAPCHAT = :snapchat + WHATSAPP = :whatsapp + TELEGRAM = :telegram + LINE = :line + DISCORD = :discord + TWITCH = :twitch + VIMEO = :vimeo + IMDB = :imdb + TUMBLR = :tumblr + FLICKR = :flickr + GIPHY = :giphy + MEDIUM = :medium + SPOTIFY = :spotify + SOUNDCLOUD = :soundcloud + TRIPADVISOR = :tripadvisor + YELP = :yelp + PRODUCTHUNT = :producthunt + REDDIT = :reddit + CRUNCHBASE = :crunchbase + APPSTORE = :appstore + PLAYSTORE = :playstore + + # @!method self.values + # @return [Array] + end end # @see BrandDev::Models::BrandRetrieveByTickerResponse::Brand#stock @@ -845,6 +1040,29 @@ class Stock < BrandDev::Internal::Type::BaseModel # @param ticker [String] Stock ticker symbol end end + + # @see BrandDev::Models::BrandRetrieveByTickerResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_naics_params.rb b/lib/brand_dev/models/brand_retrieve_naics_params.rb index 09ca5471..b67d8292 100644 --- a/lib/brand_dev/models/brand_retrieve_naics_params.rb +++ b/lib/brand_dev/models/brand_retrieve_naics_params.rb @@ -8,9 +8,9 @@ class BrandRetrieveNaicsParams < BrandDev::Internal::Type::BaseModel include BrandDev::Internal::Type::RequestParameters # @!attribute input - # Brand domain or title to retrieve NAICS code for. If a valid domain is provided - # in `input`, it will be used for classification, otherwise, we will search for - # the brand using the provided title. + # Brand domain or title to retrieve NAICS code for. If a valid domain is provided, + # it will be used for classification, otherwise, we will search for the brand + # using the provided title. # # @return [String] required :input, String @@ -28,6 +28,14 @@ class BrandRetrieveNaicsParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :min_results, Integer + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -36,16 +44,18 @@ class BrandRetrieveNaicsParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(input:, max_results: nil, min_results: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(input:, max_results: nil, min_results: nil, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveNaicsParams} for more details. # - # @param input [String] Brand domain or title to retrieve NAICS code for. If a valid domain is provided + # @param input [String] Brand domain or title to retrieve NAICS code for. If a valid domain is provided, # # @param max_results [Integer] Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults to 5 # # @param min_results [Integer] Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1. # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/brand_dev/models/brand_retrieve_naics_response.rb b/lib/brand_dev/models/brand_retrieve_naics_response.rb index afe0d7f7..513a2c59 100644 --- a/lib/brand_dev/models/brand_retrieve_naics_response.rb +++ b/lib/brand_dev/models/brand_retrieve_naics_response.rb @@ -17,6 +17,13 @@ class BrandRetrieveNaicsResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :domain, String + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # @@ -29,11 +36,16 @@ class BrandRetrieveNaicsResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :type, String - # @!method initialize(codes: nil, domain: nil, status: nil, type: nil) + # @!method initialize(codes: nil, domain: nil, key_metadata: nil, status: nil, type: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandRetrieveNaicsResponse} for more details. + # # @param codes [Array] Array of NAICS codes and titles. # # @param domain [String] Domain found for the brand # + # @param key_metadata [BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # # @param type [String] Industry classification type, for naics api it will be `naics` @@ -78,6 +90,29 @@ module Confidence # @return [Array] end end + + # @see BrandDev::Models::BrandRetrieveNaicsResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_params.rb b/lib/brand_dev/models/brand_retrieve_params.rb index 0af7caf6..1416d2d5 100644 --- a/lib/brand_dev/models/brand_retrieve_params.rb +++ b/lib/brand_dev/models/brand_retrieve_params.rb @@ -11,23 +11,59 @@ class BrandRetrieveParams < BrandDev::Internal::Type::BaseModel # Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). # Cannot be used with name or ticker parameters. # - # @return [String] - required :domain, String + # @return [String, nil] + optional :domain, String # @!attribute force_language - # Optional parameter to force the language of the retrieved brand data. Works with - # all three lookup methods. + # Language to force for the retrieved brand data. # # @return [Symbol, BrandDev::Models::BrandRetrieveParams::ForceLanguage, nil] - optional :force_language, enum: -> { BrandDev::BrandRetrieveParams::ForceLanguage } + optional :force_language, enum: -> { BrandDev::BrandRetrieveParams::ForceLanguage }, nil?: true + + # @!attribute max_age_ms + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true # @!attribute max_speed # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. Works with all three lookup methods. # - # @return [Boolean, nil] - optional :max_speed, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandRetrieveParams::MaxSpeed, nil] + optional :max_speed, union: -> { BrandDev::BrandRetrieveParams::MaxSpeed } + + # @!attribute name + # Company name to retrieve brand data for (e.g., 'Apple Inc'). Cannot be used with + # domain or ticker parameters. + # + # @return [String, nil] + optional :name, String + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + + # @!attribute ticker + # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL'). Cannot be used + # with domain or name parameters. + # + # @return [String, nil] + optional :ticker, String + + # @!attribute ticker_exchange + # Stock exchange code. + # + # @return [Symbol, BrandDev::Models::BrandRetrieveParams::TickerExchange, nil] + optional :ticker_exchange, enum: -> { BrandDev::BrandRetrieveParams::TickerExchange } # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer @@ -37,80 +73,262 @@ class BrandRetrieveParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(domain:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(domain: nil, force_language: nil, max_age_ms: nil, max_speed: nil, name: nil, tags: nil, ticker: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveParams} for more details. # # @param domain [String] Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). Cann # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. Works with + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveParams::ForceLanguage, nil] Language to force for the retrieved brand data. + # + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param name [String] Company name to retrieve brand data for (e.g., 'Apple Inc'). Cannot be used with + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param ticker [String] Stock ticker symbol to retrieve brand data for (e.g., 'AAPL'). Cannot be used wi + # + # @param ticker_exchange [Symbol, BrandDev::Models::BrandRetrieveParams::TickerExchange] Stock exchange code. # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] - # Optional parameter to force the language of the retrieved brand data. Works with - # all three lookup methods. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS = :afrikaans ALBANIAN = :albanian + AMHARIC = :amharic ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian BENGALI = :bengali + BOSNIAN = :bosnian BULGARIAN = :bulgarian + BURMESE = :burmese CANTONESE = :cantonese + CATALAN = :catalan CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican CROATIAN = :croatian CZECH = :czech DANISH = :danish DUTCH = :dutch ENGLISH = :english + ESPERANTO = :esperanto ESTONIAN = :estonian FARSI = :farsi + FIJIAN = :fijian FINNISH = :finnish FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" HAUSA = :hausa HAWAIIAN = :hawaiian + HEBREW = :hebrew HINDI = :hindi + HMONG = :hmong HUNGARIAN = :hungarian ICELANDIC = :icelandic + IGBO = :igbo INDONESIAN = :indonesian + IRISH = :irish ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda KOREAN = :korean + KURDISH = :kurdish KYRGYZ = :kyrgyz + LAO = :lao LATIN = :latin LATVIAN = :latvian + LINGALA = :lingala LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi MONGOLIAN = :mongolian NEPALI = :nepali NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo PASHTO = :pashto PIDGIN = :pidgin POLISH = :polish PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua ROMANIAN = :romanian RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala SLOVAK = :slovak SLOVENE = :slovene SOMALI = :somali SPANISH = :spanish + SUNDANESE = :sundanese SWAHILI = :swahili SWEDISH = :swedish TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana TURKISH = :turkish + TURKMEN = :turkmen UKRAINIAN = :ukrainian URDU = :urdu + UYGHUR = :uyghur UZBEK = :uzbek VIETNAMESE = :vietnamese WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu + + # @!method self.values + # @return [Array] + end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. Works with all three lookup methods. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandRetrieveParams::MaxSpeed::TRUE } + + variant const: -> { BrandDev::Models::BrandRetrieveParams::MaxSpeed::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandRetrieveParams::MaxSpeed::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Stock exchange code. + module TickerExchange + extend BrandDev::Internal::Type::Enum + + AMEX = :AMEX + AMS = :AMS + AQS = :AQS + ASX = :ASX + ATH = :ATH + BER = :BER + BME = :BME + BRU = :BRU + BSE = :BSE + BUD = :BUD + BUE = :BUE + BVC = :BVC + CBOE = :CBOE + CNQ = :CNQ + CPH = :CPH + DFM = :DFM + DOH = :DOH + DUB = :DUB + DUS = :DUS + DXE = :DXE + EGX = :EGX + FSX = :FSX + HAM = :HAM + HEL = :HEL + HKSE = :HKSE + HOSE = :HOSE + ICE = :ICE + IOB = :IOB + IST = :IST + JKT = :JKT + JNB = :JNB + JPX = :JPX + KLS = :KLS + KOE = :KOE + KSC = :KSC + KUW = :KUW + LIS = :LIS + LSE = :LSE + MCX = :MCX + MEX = :MEX + MIL = :MIL + MUN = :MUN + NASDAQ = :NASDAQ + NEO = :NEO + NSE = :NSE + NYSE = :NYSE + NZE = :NZE + OSL = :OSL + OTC = :OTC + PAR = :PAR + PNK = :PNK + PRA = :PRA + RIS = :RIS + SAO = :SAO + SAU = :SAU + SES = :SES + SET = :SET + SGO = :SGO + SHH = :SHH + SHZ = :SHZ + SIX = :SIX + STO = :STO + STU = :STU + TAI = :TAI + TAL = :TAL + TLV = :TLV + TSX = :TSX + TSXV = :TSXV + TWO = :TWO + VIE = :VIE + WSE = :WSE + XETRA = :XETRA # @!method self.values # @return [Array] diff --git a/lib/brand_dev/models/brand_retrieve_response.rb b/lib/brand_dev/models/brand_retrieve_response.rb index 66da3c9a..e28e2ba0 100644 --- a/lib/brand_dev/models/brand_retrieve_response.rb +++ b/lib/brand_dev/models/brand_retrieve_response.rb @@ -16,17 +16,29 @@ class BrandRetrieveResponse < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :code, Integer + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandRetrieveResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandRetrieveResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # # @return [String, nil] optional :status, String - # @!method initialize(brand: nil, code: nil, status: nil) + # @!method initialize(brand: nil, code: nil, key_metadata: nil, status: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandRetrieveResponse} for more details. + # # @param brand [BrandDev::Models::BrandRetrieveResponse::Brand] Detailed brand information # # @param code [Integer] HTTP status code # + # @param key_metadata [BrandDev::Models::BrandRetrieveResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # @see BrandDev::Models::BrandRetrieveResponse#brand @@ -100,6 +112,14 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :phone, String + # @!attribute primary_language + # Language to force for the retrieved brand data. + # + # @return [Symbol, BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage, nil] + optional :primary_language, + enum: -> { BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage }, + nil?: true + # @!attribute slogan # The brand's slogan # @@ -126,7 +146,7 @@ class Brand < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :title, String - # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, slogan: nil, socials: nil, stock: nil, title: nil) + # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, industries: nil, is_nsfw: nil, links: nil, logos: nil, phone: nil, primary_language: nil, slogan: nil, socials: nil, stock: nil, title: nil) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveResponse::Brand} for more details. # @@ -154,6 +174,8 @@ class Brand < BrandDev::Internal::Type::BaseModel # # @param phone [String] Company phone number # + # @param primary_language [Symbol, BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage, nil] Language to force for the retrieved brand data. + # # @param slogan [String] The brand's slogan # # @param socials [Array] An array of social media links for the brand @@ -444,7 +466,6 @@ module Subindustry STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO = :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT = :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS = :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS = :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT = :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES = :"Virtual Worlds & Metaverse Experiences" @@ -505,6 +526,7 @@ module Subindustry STREETWEAR_EMERGING_LUXURY = :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE = :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM = :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING = :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS = :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO = :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA = :"Podcasting & Audio Media" @@ -802,12 +824,143 @@ module Type end end + # Language to force for the retrieved brand data. + # + # @see BrandDev::Models::BrandRetrieveResponse::Brand#primary_language + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS = :afrikaans + ALBANIAN = :albanian + AMHARIC = :amharic + ARABIC = :arabic + ARMENIAN = :armenian + ASSAMESE = :assamese + AYMARA = :aymara + AZERI = :azeri + BASQUE = :basque + BELARUSIAN = :belarusian + BENGALI = :bengali + BOSNIAN = :bosnian + BULGARIAN = :bulgarian + BURMESE = :burmese + CANTONESE = :cantonese + CATALAN = :catalan + CEBUANO = :cebuano + CHINESE = :chinese + CORSICAN = :corsican + CROATIAN = :croatian + CZECH = :czech + DANISH = :danish + DUTCH = :dutch + ENGLISH = :english + ESPERANTO = :esperanto + ESTONIAN = :estonian + FARSI = :farsi + FIJIAN = :fijian + FINNISH = :finnish + FRENCH = :french + GALICIAN = :galician + GEORGIAN = :georgian + GERMAN = :german + GREEK = :greek + GUARANI = :guarani + GUJARATI = :gujarati + HAITIAN_CREOLE = :"haitian-creole" + HAUSA = :hausa + HAWAIIAN = :hawaiian + HEBREW = :hebrew + HINDI = :hindi + HMONG = :hmong + HUNGARIAN = :hungarian + ICELANDIC = :icelandic + IGBO = :igbo + INDONESIAN = :indonesian + IRISH = :irish + ITALIAN = :italian + JAPANESE = :japanese + JAVANESE = :javanese + KANNADA = :kannada + KAZAKH = :kazakh + KHMER = :khmer + KINYARWANDA = :kinyarwanda + KOREAN = :korean + KURDISH = :kurdish + KYRGYZ = :kyrgyz + LAO = :lao + LATIN = :latin + LATVIAN = :latvian + LINGALA = :lingala + LITHUANIAN = :lithuanian + LUXEMBOURGISH = :luxembourgish + MACEDONIAN = :macedonian + MALAGASY = :malagasy + MALAY = :malay + MALAYALAM = :malayalam + MALTESE = :maltese + MAORI = :maori + MARATHI = :marathi + MONGOLIAN = :mongolian + NEPALI = :nepali + NORWEGIAN = :norwegian + ODIA = :odia + OROMO = :oromo + PASHTO = :pashto + PIDGIN = :pidgin + POLISH = :polish + PORTUGUESE = :portuguese + PUNJABI = :punjabi + QUECHUA = :quechua + ROMANIAN = :romanian + RUSSIAN = :russian + SAMOAN = :samoan + SCOTTISH_GAELIC = :"scottish-gaelic" + SERBIAN = :serbian + SESOTHO = :sesotho + SHONA = :shona + SINDHI = :sindhi + SINHALA = :sinhala + SLOVAK = :slovak + SLOVENE = :slovene + SOMALI = :somali + SPANISH = :spanish + SUNDANESE = :sundanese + SWAHILI = :swahili + SWEDISH = :swedish + TAGALOG = :tagalog + TAJIK = :tajik + TAMIL = :tamil + TATAR = :tatar + TELUGU = :telugu + THAI = :thai + TIBETAN = :tibetan + TIGRINYA = :tigrinya + TONGAN = :tongan + TSWANA = :tswana + TURKISH = :turkish + TURKMEN = :turkmen + UKRAINIAN = :ukrainian + URDU = :urdu + UYGHUR = :uyghur + UZBEK = :uzbek + VIETNAMESE = :vietnamese + WELSH = :welsh + WOLOF = :wolof + XHOSA = :xhosa + YIDDISH = :yiddish + YORUBA = :yoruba + ZULU = :zulu + + # @!method self.values + # @return [Array] + end + class Social < BrandDev::Internal::Type::BaseModel # @!attribute type - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform # - # @return [String, nil] - optional :type, String + # @return [Symbol, BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type, nil] + optional :type, enum: -> { BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type } # @!attribute url # URL of the social media page @@ -816,9 +969,51 @@ class Social < BrandDev::Internal::Type::BaseModel optional :url, String # @!method initialize(type: nil, url: nil) - # @param type [String] Type of social media, e.g., 'facebook', 'twitter' + # @param type [Symbol, BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type] Type of social media platform # # @param url [String] URL of the social media page + + # Type of social media platform + # + # @see BrandDev::Models::BrandRetrieveResponse::Brand::Social#type + module Type + extend BrandDev::Internal::Type::Enum + + X = :x + FACEBOOK = :facebook + INSTAGRAM = :instagram + LINKEDIN = :linkedin + YOUTUBE = :youtube + PINTEREST = :pinterest + TIKTOK = :tiktok + DRIBBBLE = :dribbble + GITHUB = :github + BEHANCE = :behance + SNAPCHAT = :snapchat + WHATSAPP = :whatsapp + TELEGRAM = :telegram + LINE = :line + DISCORD = :discord + TWITCH = :twitch + VIMEO = :vimeo + IMDB = :imdb + TUMBLR = :tumblr + FLICKR = :flickr + GIPHY = :giphy + MEDIUM = :medium + SPOTIFY = :spotify + SOUNDCLOUD = :soundcloud + TRIPADVISOR = :tripadvisor + YELP = :yelp + PRODUCTHUNT = :producthunt + REDDIT = :reddit + CRUNCHBASE = :crunchbase + APPSTORE = :appstore + PLAYSTORE = :playstore + + # @!method self.values + # @return [Array] + end end # @see BrandDev::Models::BrandRetrieveResponse::Brand#stock @@ -844,6 +1039,29 @@ class Stock < BrandDev::Internal::Type::BaseModel # @param ticker [String] Stock ticker symbol end end + + # @see BrandDev::Models::BrandRetrieveResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_simplified_params.rb b/lib/brand_dev/models/brand_retrieve_simplified_params.rb index ce11be60..db82a902 100644 --- a/lib/brand_dev/models/brand_retrieve_simplified_params.rb +++ b/lib/brand_dev/models/brand_retrieve_simplified_params.rb @@ -13,6 +13,29 @@ class BrandRetrieveSimplifiedParams < BrandDev::Internal::Type::BaseModel # @return [String] required :domain, String + # @!attribute max_age_ms + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + + # @!attribute theme + # Optional theme preference used when selecting brand assets. + # + # @return [Symbol, BrandDev::Models::BrandRetrieveSimplifiedParams::Theme, nil] + optional :theme, enum: -> { BrandDev::BrandRetrieveSimplifiedParams::Theme } + # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -21,15 +44,32 @@ class BrandRetrieveSimplifiedParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(domain:, timeout_ms: nil, request_options: {}) + # @!method initialize(domain:, max_age_ms: nil, tags: nil, theme: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveSimplifiedParams} for more details. # # @param domain [String] Domain name to retrieve simplified brand data for # + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param theme [Symbol, BrandDev::Models::BrandRetrieveSimplifiedParams::Theme] Optional theme preference used when selecting brand assets. + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] + + # Optional theme preference used when selecting brand assets. + module Theme + extend BrandDev::Internal::Type::Enum + + LIGHT = :light + DARK = :dark + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/brand_dev/models/brand_retrieve_simplified_response.rb b/lib/brand_dev/models/brand_retrieve_simplified_response.rb index 0a153975..975277ee 100644 --- a/lib/brand_dev/models/brand_retrieve_simplified_response.rb +++ b/lib/brand_dev/models/brand_retrieve_simplified_response.rb @@ -16,17 +16,29 @@ class BrandRetrieveSimplifiedResponse < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :code, Integer + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # # @return [String, nil] optional :status, String - # @!method initialize(brand: nil, code: nil, status: nil) + # @!method initialize(brand: nil, code: nil, key_metadata: nil, status: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandRetrieveSimplifiedResponse} for more details. + # # @param brand [BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand] Simplified brand information # # @param code [Integer] HTTP status code of the response # + # @param key_metadata [BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # @see BrandDev::Models::BrandRetrieveSimplifiedResponse#brand @@ -302,6 +314,29 @@ module Type end end end + + # @see BrandDev::Models::BrandRetrieveSimplifiedResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_screenshot_params.rb b/lib/brand_dev/models/brand_screenshot_params.rb index b2c9e5b1..968d8c37 100644 --- a/lib/brand_dev/models/brand_screenshot_params.rb +++ b/lib/brand_dev/models/brand_screenshot_params.rb @@ -7,12 +7,35 @@ class BrandScreenshotParams < BrandDev::Internal::Type::BaseModel extend BrandDev::Internal::Type::RequestParameters::Converter include BrandDev::Internal::Type::RequestParameters + # @!attribute color_scheme + # Optional parameter to choose the site's visual theme in the screenshot. Use + # 'light' or 'dark' when the site offers both appearances. + # + # @return [Symbol, BrandDev::Models::BrandScreenshotParams::ColorScheme, nil] + optional :color_scheme, enum: -> { BrandDev::BrandScreenshotParams::ColorScheme } + + # @!attribute country + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + # + # @return [Symbol, BrandDev::Models::BrandScreenshotParams::Country, nil] + optional :country, enum: -> { BrandDev::BrandScreenshotParams::Country } + + # @!attribute direct_url + # A specific URL to screenshot directly, bypassing domain resolution (e.g., + # 'https://example.com/pricing'). When provided, the screenshot is taken of this + # exact URL. You must provide either 'domain' or 'directUrl', but not both. + # + # @return [String, nil] + optional :direct_url, String + # @!attribute domain # Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. # - # @return [String] - required :domain, String + # @return [String, nil] + optional :domain, String # @!attribute full_screenshot # Optional parameter to determine screenshot type. If 'true', takes a full page @@ -22,37 +45,342 @@ class BrandScreenshotParams < BrandDev::Internal::Type::BaseModel # @return [Symbol, BrandDev::Models::BrandScreenshotParams::FullScreenshot, nil] optional :full_screenshot, enum: -> { BrandDev::BrandScreenshotParams::FullScreenshot } + # @!attribute handle_cookie_popup + # Optional parameter to control cookie/consent popup handling. If 'true', we + # dismiss cookie banner before capture. If 'false' or not provided, captures the + # page without that step. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandScreenshotParams::HandleCookiePopup, nil] + optional :handle_cookie_popup, union: -> { BrandDev::BrandScreenshotParams::HandleCookiePopup } + + # @!attribute max_age_ms + # Return a cached screenshot if a prior screenshot for the same parameters exists + # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true + # @!attribute page # Optional parameter to specify which page type to screenshot. If provided, the # system will scrape the domain's links and use heuristics to find the most # appropriate URL for the specified page type (30 supported languages). If not - # provided, screenshots the main domain landing page. + # provided, screenshots the main domain landing page. Only applicable when using + # 'domain', not 'directUrl'. # # @return [Symbol, BrandDev::Models::BrandScreenshotParams::Page, nil] optional :page, enum: -> { BrandDev::BrandScreenshotParams::Page } - # @!attribute prioritize - # Optional parameter to prioritize screenshot capture. If 'speed', optimizes for - # faster capture with basic quality. If 'quality', optimizes for higher quality - # with longer wait times. Defaults to 'quality' if not provided. + # @!attribute scroll_offset + # Optional vertical scroll offset in pixels for capturing a long page in + # viewport-sized chunks. When provided, the full page is captured once and the + # returned image is the viewport-sized slice that begins at this Y offset (e.g. + # request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page + # top to bottom). The final slice may be shorter than the viewport height. Takes + # precedence over fullScreenshot. Max: 100000. + # + # @return [Integer, nil] + optional :scroll_offset, Integer, nil?: true + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + + # @!attribute timeout_ms + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + # + # @return [Integer, nil] + optional :timeout_ms, Integer + + # @!attribute viewport + # Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080. + # + # @return [BrandDev::Models::BrandScreenshotParams::Viewport, nil] + optional :viewport, -> { BrandDev::BrandScreenshotParams::Viewport } + + # @!attribute wait_for_ms + # Optional browser wait time in milliseconds after initial page load before taking + # the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when + # omitted. + # + # @return [Integer, nil] + optional :wait_for_ms, Integer, nil?: true + + # @!attribute zdr + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. # - # @return [Symbol, BrandDev::Models::BrandScreenshotParams::Prioritize, nil] - optional :prioritize, enum: -> { BrandDev::BrandScreenshotParams::Prioritize } + # @return [Symbol, BrandDev::Models::BrandScreenshotParams::Zdr, nil] + optional :zdr, enum: -> { BrandDev::BrandScreenshotParams::Zdr } - # @!method initialize(domain:, full_screenshot: nil, page: nil, prioritize: nil, request_options: {}) + # @!method initialize(color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, tags: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, zdr: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandScreenshotParams} for more details. # + # @param color_scheme [Symbol, BrandDev::Models::BrandScreenshotParams::ColorScheme] Optional parameter to choose the site's visual theme in the screenshot. Use 'lig + # + # @param country [Symbol, BrandDev::Models::BrandScreenshotParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al + # + # @param direct_url [String] A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https + # # @param domain [String] Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The domai # # @param full_screenshot [Symbol, BrandDev::Models::BrandScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc # + # @param handle_cookie_popup [Boolean, Symbol, BrandDev::Models::BrandScreenshotParams::HandleCookiePopup] Optional parameter to control cookie/consent popup handling. If 'true', we dismi + # + # @param max_age_ms [Integer, nil] Return a cached screenshot if a prior screenshot for the same parameters exists + # # @param page [Symbol, BrandDev::Models::BrandScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy # - # @param prioritize [Symbol, BrandDev::Models::BrandScreenshotParams::Prioritize] Optional parameter to prioritize screenshot capture. If 'speed', optimizes for f + # @param scroll_offset [Integer, nil] Optional vertical scroll offset in pixels for capturing a long page in viewport- + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th + # + # @param viewport [BrandDev::Models::BrandScreenshotParams::Viewport] Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080. + # + # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load before taking + # + # @param zdr [Symbol, BrandDev::Models::BrandScreenshotParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] + # Optional parameter to choose the site's visual theme in the screenshot. Use + # 'light' or 'dark' when the site offers both appearances. + module ColorScheme + extend BrandDev::Internal::Type::Enum + + LIGHT = :light + DARK = :dark + + # @!method self.values + # @return [Array] + end + + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + module Country + extend BrandDev::Internal::Type::Enum + + AD = :ad + AE = :ae + AF = :af + AG = :ag + AI = :ai + AL = :al + AM = :am + AO = :ao + AR = :ar + AT = :at + AU = :au + AW = :aw + AZ = :az + BA = :ba + BB = :bb + BD = :bd + BE = :be + BF = :bf + BG = :bg + BH = :bh + BI = :bi + BJ = :bj + BM = :bm + BN = :bn + BO = :bo + BQ = :bq + BR = :br + BS = :bs + BW = :bw + BY = :by + BZ = :bz + CA = :ca + CD = :cd + CF = :cf + CG = :cg + CH = :ch + CI = :ci + CL = :cl + CM = :cm + CN = :cn + CO = :co + CR = :cr + CV = :cv + CW = :cw + CY = :cy + CZ = :cz + DE = :de + DJ = :dj + DK = :dk + DM = :dm + DO = :do + DZ = :dz + EC = :ec + EE = :ee + EG = :eg + ES = :es + ET = :et + FI = :fi + FJ = :fj + FR = :fr + GA = :ga + GB = :gb + GD = :gd + GE = :ge + GF = :gf + GG = :gg + GH = :gh + GM = :gm + GN = :gn + GP = :gp + GQ = :gq + GR = :gr + GT = :gt + GU = :gu + GW = :gw + GY = :gy + HK = :hk + HN = :hn + HR = :hr + HT = :ht + HU = :hu + ID = :id + IE = :ie + IL = :il + IM = :im + IN = :in + IQ = :iq + IR = :ir + IS = :is + IT = :it + JE = :je + JM = :jm + JO = :jo + JP = :jp + KE = :ke + KG = :kg + KH = :kh + KN = :kn + KR = :kr + KW = :kw + KY = :ky + KZ = :kz + LA = :la + LB = :lb + LC = :lc + LK = :lk + LR = :lr + LS = :ls + LT = :lt + LU = :lu + LV = :lv + LY = :ly + MA = :ma + MC = :mc + MD = :md + ME = :me + MF = :mf + MG = :mg + MK = :mk + ML = :ml + MM = :mm + MN = :mn + MO = :mo + MQ = :mq + MR = :mr + MT = :mt + MU = :mu + MV = :mv + MW = :mw + MX = :mx + MY = :my + MZ = :mz + NA = :na + NC = :nc + NE = :ne + NG = :ng + NI = :ni + NL = :nl + NO = :no + NP = :np + NZ = :nz + OM = :om + PA = :pa + PE = :pe + PF = :pf + PG = :pg + PH = :ph + PK = :pk + PL = :pl + PR = :pr + PS = :ps + PT = :pt + PY = :py + QA = :qa + RE = :re + RO = :ro + RS = :rs + RU = :ru + RW = :rw + SA = :sa + SC = :sc + SD = :sd + SE = :se + SG = :sg + SI = :si + SK = :sk + SL = :sl + SM = :sm + SN = :sn + SO = :so + SR = :sr + SS = :ss + ST = :st + SV = :sv + SX = :sx + SY = :sy + SZ = :sz + TC = :tc + TD = :td + TG = :tg + TH = :th + TJ = :tj + TL = :tl + TM = :tm + TN = :tn + TR = :tr + TT = :tt + TW = :tw + TZ = :tz + UA = :ua + UG = :ug + US = :us + UY = :uy + UZ = :uz + VC = :vc + VE = :ve + VG = :vg + VI = :vi + VN = :vn + YE = :ye + YT = :yt + ZA = :za + ZM = :zm + ZW = :zw + + # @!method self.values + # @return [Array] + end + # Optional parameter to determine screenshot type. If 'true', takes a full page # screenshot capturing all content. If 'false' or not provided, takes a viewport # screenshot (standard browser view). @@ -66,10 +394,38 @@ module FullScreenshot # @return [Array] end + # Optional parameter to control cookie/consent popup handling. If 'true', we + # dismiss cookie banner before capture. If 'false' or not provided, captures the + # page without that step. + module HandleCookiePopup + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandScreenshotParams::HandleCookiePopup::TRUE } + + variant const: -> { BrandDev::Models::BrandScreenshotParams::HandleCookiePopup::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandScreenshotParams::HandleCookiePopup::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + # Optional parameter to specify which page type to screenshot. If provided, the # system will scrape the domain's links and use heuristics to find the most # appropriate URL for the specified page type (30 supported languages). If not - # provided, screenshots the main domain landing page. + # provided, screenshots the main domain landing page. Only applicable when using + # 'domain', not 'directUrl'. module Page extend BrandDev::Internal::Type::Enum @@ -86,14 +442,36 @@ module Page # @return [Array] end - # Optional parameter to prioritize screenshot capture. If 'speed', optimizes for - # faster capture with basic quality. If 'quality', optimizes for higher quality - # with longer wait times. Defaults to 'quality' if not provided. - module Prioritize + class Viewport < BrandDev::Internal::Type::BaseModel + # @!attribute height + # Viewport height in pixels. + # + # @return [Integer, nil] + optional :height, Integer + + # @!attribute width + # Viewport width in pixels. + # + # @return [Integer, nil] + optional :width, Integer + + # @!method initialize(height: nil, width: nil) + # Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080. + # + # @param height [Integer] Viewport height in pixels. + # + # @param width [Integer] Viewport width in pixels. + end + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + module Zdr extend BrandDev::Internal::Type::Enum - SPEED = :speed - QUALITY = :quality + ENABLED = :enabled + DISABLED = :disabled # @!method self.values # @return [Array] diff --git a/lib/brand_dev/models/brand_screenshot_response.rb b/lib/brand_dev/models/brand_screenshot_response.rb index c42597de..9b5d428d 100644 --- a/lib/brand_dev/models/brand_screenshot_response.rb +++ b/lib/brand_dev/models/brand_screenshot_response.rb @@ -16,8 +16,22 @@ class BrandScreenshotResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :domain, String + # @!attribute height + # Height in pixels of the returned screenshot image + # + # @return [Integer, nil] + optional :height, Integer + + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandScreenshotResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandScreenshotResponse::KeyMetadata } + # @!attribute screenshot - # Public URL of the uploaded screenshot image + # Public image URL for standard requests, or an in-memory data URL when ZDR is + # enabled. # # @return [String, nil] optional :screenshot, String @@ -36,16 +50,54 @@ class BrandScreenshotResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :status, String - # @!method initialize(code: nil, domain: nil, screenshot: nil, screenshot_type: nil, status: nil) + # @!attribute width + # Width in pixels of the returned screenshot image + # + # @return [Integer, nil] + optional :width, Integer + + # @!method initialize(code: nil, domain: nil, height: nil, key_metadata: nil, screenshot: nil, screenshot_type: nil, status: nil, width: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandScreenshotResponse} for more details. + # # @param code [Integer] HTTP status code # # @param domain [String] The normalized domain that was processed # - # @param screenshot [String] Public URL of the uploaded screenshot image + # @param height [Integer] Height in pixels of the returned screenshot image + # + # @param key_metadata [BrandDev::Models::BrandScreenshotResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # + # @param screenshot [String] Public image URL for standard requests, or an in-memory data URL when ZDR is ena # # @param screenshot_type [Symbol, BrandDev::Models::BrandScreenshotResponse::ScreenshotType] Type of screenshot that was captured # # @param status [String] Status of the response, e.g., 'ok' + # + # @param width [Integer] Width in pixels of the returned screenshot image + + # @see BrandDev::Models::BrandScreenshotResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end # Type of screenshot that was captured # diff --git a/lib/brand_dev/models/brand_styleguide_params.rb b/lib/brand_dev/models/brand_styleguide_params.rb index 1bfa8384..ca4323ac 100644 --- a/lib/brand_dev/models/brand_styleguide_params.rb +++ b/lib/brand_dev/models/brand_styleguide_params.rb @@ -7,20 +7,47 @@ class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel extend BrandDev::Internal::Type::RequestParameters::Converter include BrandDev::Internal::Type::RequestParameters + # @!attribute color_scheme + # Optional browser color scheme to emulate for websites that respond to + # prefers-color-scheme. This value is part of the styleguide cache key. + # + # @return [Symbol, BrandDev::Models::BrandStyleguideParams::ColorScheme, nil] + optional :color_scheme, enum: -> { BrandDev::BrandStyleguideParams::ColorScheme } + # @!attribute direct_url # A specific URL to fetch the styleguide from directly, bypassing domain - # resolution (e.g., 'https://example.com/design-system'). + # resolution (e.g., 'https://example.com/design-system'). When provided, the + # styleguide is extracted from this exact URL. You must provide either 'domain' or + # 'directUrl', but not both. # # @return [String, nil] optional :direct_url, String # @!attribute domain # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. # # @return [String, nil] optional :domain, String + # @!attribute max_age_ms + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -29,17 +56,35 @@ class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(color_scheme: nil, direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandStyleguideParams} for more details. # + # @param color_scheme [Symbol, BrandDev::Models::BrandStyleguideParams::ColorScheme] Optional browser color scheme to emulate for websites that respond to prefers-co + # # @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio # # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] + + # Optional browser color scheme to emulate for websites that respond to + # prefers-color-scheme. This value is part of the styleguide cache key. + module ColorScheme + extend BrandDev::Internal::Type::Enum + + LIGHT = :light + DARK = :dark + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/brand_dev/models/brand_styleguide_response.rb b/lib/brand_dev/models/brand_styleguide_response.rb index 3dd6496d..839eb386 100644 --- a/lib/brand_dev/models/brand_styleguide_response.rb +++ b/lib/brand_dev/models/brand_styleguide_response.rb @@ -16,6 +16,13 @@ class BrandStyleguideResponse < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :domain, String + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandStyleguideResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandStyleguideResponse::KeyMetadata } + # @!attribute status # Status of the response, e.g., 'ok' # @@ -28,15 +35,43 @@ class BrandStyleguideResponse < BrandDev::Internal::Type::BaseModel # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide, nil] optional :styleguide, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide } - # @!method initialize(code: nil, domain: nil, status: nil, styleguide: nil) + # @!method initialize(code: nil, domain: nil, key_metadata: nil, status: nil, styleguide: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandStyleguideResponse} for more details. + # # @param code [Integer] HTTP status code # # @param domain [String] The normalized domain that was processed # + # @param key_metadata [BrandDev::Models::BrandStyleguideResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + # # @param status [String] Status of the response, e.g., 'ok' # # @param styleguide [BrandDev::Models::BrandStyleguideResponse::Styleguide] Comprehensive styleguide data extracted from the website + # @see BrandDev::Models::BrandStyleguideResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end + # @see BrandDev::Models::BrandStyleguideResponse#styleguide class Styleguide < BrandDev::Internal::Type::BaseModel # @!attribute colors @@ -59,6 +94,16 @@ class Styleguide < BrandDev::Internal::Type::BaseModel -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing }, api_name: :elementSpacing + # @!attribute font_links + # Font assets keyed by family name as it appears in fontFamily/fontFallbacks + # (non-generic names only). Clients match typography.fontFamily / fontWeight or + # button styles to pick a file URL from files. + # + # @return [Hash{Symbol=>BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink}] + required :font_links, + -> { BrandDev::Internal::Type::HashOf[BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink] }, + api_name: :fontLinks + # @!attribute mode # The primary color mode of the website design # @@ -77,7 +122,10 @@ class Styleguide < BrandDev::Internal::Type::BaseModel # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography] required :typography, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography } - # @!method initialize(colors:, components:, element_spacing:, mode:, shadows:, typography:) + # @!method initialize(colors:, components:, element_spacing:, font_links:, mode:, shadows:, typography:) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandStyleguideResponse::Styleguide} for more details. + # # Comprehensive styleguide data extracted from the website # # @param colors [BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors] Primary colors used on the website @@ -86,6 +134,8 @@ class Styleguide < BrandDev::Internal::Type::BaseModel # # @param element_spacing [BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing] Spacing system used on the website # + # @param font_links [Hash{Symbol=>BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink}] Font assets keyed by family name as it appears in fontFamily/fontFallbacks (non- + # # @param mode [Symbol, BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode] The primary color mode of the website design # # @param shadows [BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows] Shadow styles used on the website @@ -692,6 +742,59 @@ class ElementSpacing < BrandDev::Internal::Type::BaseModel # @param xs [String] end + class FontLink < BrandDev::Internal::Type::BaseModel + # @!attribute files + # Upright font files keyed by weight string (e.g. "400" for regular, "500", + # "700"). Values are absolute URLs. + # + # @return [Hash{Symbol=>String}] + required :files, BrandDev::Internal::Type::HashOf[String] + + # @!attribute type + # + # @return [Symbol, BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type] + required :type, enum: -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type } + + # @!attribute category + # Google Fonts category when type is google (e.g. sans-serif, serif, monospace, + # display, handwriting). Omitted for custom fonts when unknown. + # + # @return [String, nil] + optional :category, String + + # @!attribute display_name + # Present when type is custom: human-readable name derived from the fontLinks key + # (strip build/hash suffixes, split camelCase / PascalCase, normalize separators). + # Google entries omit this. + # + # @return [String, nil] + optional :display_name, String, api_name: :displayName + + # @!method initialize(files:, type:, category: nil, display_name: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink} for more + # details. + # + # @param files [Hash{Symbol=>String}] Upright font files keyed by weight string (e.g. "400" for regular, "500", "700") + # + # @param type [Symbol, BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type] + # + # @param category [String] Google Fonts category when type is google (e.g. sans-serif, serif, monospace, di + # + # @param display_name [String] Present when type is custom: human-readable name derived from the fontLinks key + + # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink#type + module Type + extend BrandDev::Internal::Type::Enum + + GOOGLE = :google + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + end + # The primary color mode of the website design # # @see BrandDev::Models::BrandStyleguideResponse::Styleguide#mode diff --git a/lib/brand_dev/models/brand_web_scrape_html_params.rb b/lib/brand_dev/models/brand_web_scrape_html_params.rb index 764275aa..cfab874d 100644 --- a/lib/brand_dev/models/brand_web_scrape_html_params.rb +++ b/lib/brand_dev/models/brand_web_scrape_html_params.rb @@ -13,10 +13,613 @@ class BrandWebScrapeHTMLParams < BrandDev::Internal::Type::BaseModel # @return [String] required :url, String - # @!method initialize(url:, request_options: {}) + # @!attribute actions + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + # + # @return [Array, nil] + optional :actions, + -> { BrandDev::Internal::Type::ArrayOf[union: BrandDev::BrandWebScrapeHTMLParams::Action] }, + nil?: true + + # @!attribute country + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + # + # @return [Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Country, nil] + optional :country, enum: -> { BrandDev::BrandWebScrapeHTMLParams::Country } + + # @!attribute exclude_selectors + # CSS selectors to remove from the result. Applied after includeSelectors. + # Exclusion takes precedence: an element matching both is removed. Examples: + # "nav", "footer", ".ad-banner", "[aria-hidden=true]". + # + # @return [Array, nil] + optional :exclude_selectors, BrandDev::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute headers + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + # + # @return [Hash{Symbol=>String}, nil] + optional :headers, BrandDev::Internal::Type::HashOf[String] + + # @!attribute include_frames + # When true, iframes are rendered inline into the returned HTML. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::IncludeFrames, nil] + optional :include_frames, union: -> { BrandDev::BrandWebScrapeHTMLParams::IncludeFrames } + + # @!attribute include_selectors + # CSS selectors. When provided, only matching subtrees (and their descendants) are + # kept and everything else is dropped. When omitted, the entire document is kept. + # Examples: "article.main", "#content", "[role=main]". + # + # @return [Array, nil] + optional :include_selectors, BrandDev::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute max_age_ms + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true + + # @!attribute pdf + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + # + # @return [BrandDev::Models::BrandWebScrapeHTMLParams::Pdf, nil] + optional :pdf, -> { BrandDev::BrandWebScrapeHTMLParams::Pdf } + + # @!attribute settle_animations + # When true, waits briefly for CSS and transition animations to settle before + # extracting HTML. Defaults to false. This adds a bit of latency in exchange for + # more stable output on animated pages. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::SettleAnimations, nil] + optional :settle_animations, union: -> { BrandDev::BrandWebScrapeHTMLParams::SettleAnimations } + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + + # @!attribute timeout_ms + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + # + # @return [Integer, nil] + optional :timeout_ms, Integer + + # @!attribute use_main_content_only + # When true, return only the page's main content in the HTML response, excluding + # headers, footers, sidebars, and navigation when detectable. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::UseMainContentOnly, nil] + optional :use_main_content_only, union: -> { BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly } + + # @!attribute wait_for_ms + # Optional browser wait time in milliseconds after initial page load. Min: 0. Max: + # 30000 (30 seconds). + # + # @return [Integer, nil] + optional :wait_for_ms, Integer, nil?: true + + # @!attribute zdr + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + # + # @return [Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Zdr, nil] + optional :zdr, enum: -> { BrandDev::BrandWebScrapeHTMLParams::Zdr } + + # @!method initialize(url:, actions: nil, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, tags: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, zdr: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeHTMLParams} for more details. + # # @param url [String] Full URL to scrape (must include http:// or https:// protocol) # + # @param actions [Array, nil] Optional browser actions executed in array order after the page loads and before + # + # @param country [Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al + # + # @param exclude_selectors [Array, nil] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi + # + # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob + # + # @param include_frames [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::IncludeFrames] When true, iframes are rendered inline into the returned HTML. + # + # @param include_selectors [Array, nil] CSS selectors. When provided, only matching subtrees (and their descendants) are + # + # @param max_age_ms [Integer, nil] Return a cached result if a prior scrape for the same parameters exists and is y + # + # @param pdf [BrandDev::Models::BrandWebScrapeHTMLParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image + # + # @param settle_animations [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::SettleAnimations] When true, waits briefly for CSS and transition animations to settle before extr + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th + # + # @param use_main_content_only [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::UseMainContentOnly] When true, return only the page's main content in the HTML response, excluding h + # + # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load. Min: 0. Max: + # + # @param zdr [Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro + # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] + + # Browser action discriminated by `do`. Each variant exposes only its applicable + # fields. + module Action + extend BrandDev::Internal::Type::Union + + discriminator :do + + # Pause for a fixed number of milliseconds before continuing to the next action. + variant :wait, -> { BrandDev::BrandWebScrapeHTMLParams::Action::Wait } + + # Resolve and perform one natural-language browser action. + variant :perform, -> { BrandDev::BrandWebScrapeHTMLParams::Action::Perform } + + class Wait < BrandDev::Internal::Type::BaseModel + # @!attribute do_ + # + # @return [Symbol, :wait] + required :do_, const: :wait, api_name: :do + + # @!attribute time_ms + # + # @return [Integer] + required :time_ms, Integer, api_name: :timeMs + + # @!method initialize(time_ms:, do_: :wait) + # Pause for a fixed number of milliseconds before continuing to the next action. + # + # @param time_ms [Integer] + # @param do_ [Symbol, :wait] + end + + class Perform < BrandDev::Internal::Type::BaseModel + # @!attribute action + # + # @return [String] + required :action, String + + # @!attribute do_ + # + # @return [Symbol, :perform] + required :do_, const: :perform, api_name: :do + + # @!method initialize(action:, do_: :perform) + # Resolve and perform one natural-language browser action. + # + # @param action [String] + # @param do_ [Symbol, :perform] + end + + # @!method self.variants + # @return [Array(BrandDev::Models::BrandWebScrapeHTMLParams::Action::Wait, BrandDev::Models::BrandWebScrapeHTMLParams::Action::Perform)] + end + + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + module Country + extend BrandDev::Internal::Type::Enum + + AD = :ad + AE = :ae + AF = :af + AG = :ag + AI = :ai + AL = :al + AM = :am + AO = :ao + AR = :ar + AT = :at + AU = :au + AW = :aw + AZ = :az + BA = :ba + BB = :bb + BD = :bd + BE = :be + BF = :bf + BG = :bg + BH = :bh + BI = :bi + BJ = :bj + BM = :bm + BN = :bn + BO = :bo + BQ = :bq + BR = :br + BS = :bs + BW = :bw + BY = :by + BZ = :bz + CA = :ca + CD = :cd + CF = :cf + CG = :cg + CH = :ch + CI = :ci + CL = :cl + CM = :cm + CN = :cn + CO = :co + CR = :cr + CV = :cv + CW = :cw + CY = :cy + CZ = :cz + DE = :de + DJ = :dj + DK = :dk + DM = :dm + DO = :do + DZ = :dz + EC = :ec + EE = :ee + EG = :eg + ES = :es + ET = :et + FI = :fi + FJ = :fj + FR = :fr + GA = :ga + GB = :gb + GD = :gd + GE = :ge + GF = :gf + GG = :gg + GH = :gh + GM = :gm + GN = :gn + GP = :gp + GQ = :gq + GR = :gr + GT = :gt + GU = :gu + GW = :gw + GY = :gy + HK = :hk + HN = :hn + HR = :hr + HT = :ht + HU = :hu + ID = :id + IE = :ie + IL = :il + IM = :im + IN = :in + IQ = :iq + IR = :ir + IS = :is + IT = :it + JE = :je + JM = :jm + JO = :jo + JP = :jp + KE = :ke + KG = :kg + KH = :kh + KN = :kn + KR = :kr + KW = :kw + KY = :ky + KZ = :kz + LA = :la + LB = :lb + LC = :lc + LK = :lk + LR = :lr + LS = :ls + LT = :lt + LU = :lu + LV = :lv + LY = :ly + MA = :ma + MC = :mc + MD = :md + ME = :me + MF = :mf + MG = :mg + MK = :mk + ML = :ml + MM = :mm + MN = :mn + MO = :mo + MQ = :mq + MR = :mr + MT = :mt + MU = :mu + MV = :mv + MW = :mw + MX = :mx + MY = :my + MZ = :mz + NA = :na + NC = :nc + NE = :ne + NG = :ng + NI = :ni + NL = :nl + NO = :no + NP = :np + NZ = :nz + OM = :om + PA = :pa + PE = :pe + PF = :pf + PG = :pg + PH = :ph + PK = :pk + PL = :pl + PR = :pr + PS = :ps + PT = :pt + PY = :py + QA = :qa + RE = :re + RO = :ro + RS = :rs + RU = :ru + RW = :rw + SA = :sa + SC = :sc + SD = :sd + SE = :se + SG = :sg + SI = :si + SK = :sk + SL = :sl + SM = :sm + SN = :sn + SO = :so + SR = :sr + SS = :ss + ST = :st + SV = :sv + SX = :sx + SY = :sy + SZ = :sz + TC = :tc + TD = :td + TG = :tg + TH = :th + TJ = :tj + TL = :tl + TM = :tm + TN = :tn + TR = :tr + TT = :tt + TW = :tw + TZ = :tz + UA = :ua + UG = :ug + US = :us + UY = :uy + UZ = :uz + VC = :vc + VE = :ve + VG = :vg + VI = :vi + VN = :vn + YE = :ye + YT = :yt + ZA = :za + ZM = :zm + ZW = :zw + + # @!method self.values + # @return [Array] + end + + # When true, iframes are rendered inline into the returned HTML. + module IncludeFrames + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::IncludeFrames::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::IncludeFrames::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + class Pdf < BrandDev::Internal::Type::BaseModel + # @!attribute end_ + # Last 1-based PDF page to parse. When omitted, parsing ends at the last page. + # Must be greater than or equal to start when both are provided. + # + # @return [Integer, nil] + optional :end_, Integer, api_name: :end + + # @!attribute ocr + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::Ocr, nil] + optional :ocr, union: -> { BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr } + + # @!attribute should_parse + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ShouldParse, nil] + optional :should_parse, + union: -> { BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse }, + api_name: :shouldParse + + # @!attribute start + # First 1-based PDF page to parse. When omitted, parsing starts at the first page. + # + # @return [Integer, nil] + optional :start, Integer + + # @!method initialize(end_: nil, ocr: nil, should_parse: nil, start: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeHTMLParams::Pdf} for more details. + # + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + # + # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus + # + # @param ocr [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::Ocr] When true, detect and OCR images embedded in the selected PDF pages, inserting r + # + # @param should_parse [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ShouldParse] When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # + # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page. + + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + # + # @see BrandDev::Models::BrandWebScrapeHTMLParams::Pdf#ocr + module Ocr + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::Ocr::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::Ocr::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + # + # @see BrandDev::Models::BrandWebScrapeHTMLParams::Pdf#should_parse + module ShouldParse + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ShouldParse::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ShouldParse::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + end + + # When true, waits briefly for CSS and transition animations to settle before + # extracting HTML. Defaults to false. This adds a bit of latency in exchange for + # more stable output on animated pages. + module SettleAnimations + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::SettleAnimations::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::SettleAnimations::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # When true, return only the page's main content in the HTML response, excluding + # headers, footers, sidebars, and navigation when detectable. + module UseMainContentOnly + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::UseMainContentOnly::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeHTMLParams::UseMainContentOnly::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + module Zdr + extend BrandDev::Internal::Type::Enum + + ENABLED = :enabled + DISABLED = :disabled + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/brand_dev/models/brand_web_scrape_html_response.rb b/lib/brand_dev/models/brand_web_scrape_html_response.rb index 634c23ea..8bbd83a1 100644 --- a/lib/brand_dev/models/brand_web_scrape_html_response.rb +++ b/lib/brand_dev/models/brand_web_scrape_html_response.rb @@ -5,29 +5,328 @@ module Models # @see BrandDev::Resources::Brand#web_scrape_html class BrandWebScrapeHTMLResponse < BrandDev::Internal::Type::BaseModel # @!attribute html - # Raw HTML content of the page + # The scraped content of the page. For normal pages this is the raw HTML. When the + # page is a sitemap or feed served behind an XSL stylesheet (which browsers render + # into HTML), this is the underlying XML instead — see the `type` field. # # @return [String] required :html, String + # @!attribute metadata + # Metadata extracted from the scraped page HTML. + # + # @return [BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata] + required :metadata, -> { BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata } + # @!attribute success # Indicates success # # @return [Boolean, BrandDev::Models::BrandWebScrapeHTMLResponse::Success] required :success, enum: -> { BrandDev::Models::BrandWebScrapeHTMLResponse::Success } + # @!attribute type + # Detected content type of the returned `html` field. Sitemaps and feeds are + # surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as + # `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations + # are surfaced as `pptx`/`ppt` with the extracted slides as HTML. + # + # @return [Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Type] + required :type, enum: -> { BrandDev::Models::BrandWebScrapeHTMLResponse::Type } + # @!attribute url # The URL that was scraped # # @return [String] required :url, String - # @!method initialize(html:, success:, url:) - # @param html [String] Raw HTML content of the page + # @!attribute actions_applied + # One verified outcome per requested browser action, in request order. + # + # @return [Array, nil] + optional :actions_applied, + -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied] }, + api_name: :actionsApplied + + # @!attribute actions_html_stale + # True when an action was applied but the returned content could not be refreshed + # afterward. + # + # @return [Boolean, nil] + optional :actions_html_stale, BrandDev::Internal::Type::Boolean, api_name: :actionsHtmlStale + + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata } + + # @!method initialize(html:, metadata:, success:, type:, url:, actions_applied: nil, actions_html_stale: nil, key_metadata: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeHTMLResponse} for more details. + # + # @param html [String] The scraped content of the page. For normal pages this is the raw HTML. When the + # + # @param metadata [BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata] Metadata extracted from the scraped page HTML. # # @param success [Boolean, BrandDev::Models::BrandWebScrapeHTMLResponse::Success] Indicates success # + # @param type [Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Type] Detected content type of the returned `html` field. Sitemaps and feeds are surfa + # # @param url [String] The URL that was scraped + # + # @param actions_applied [Array] One verified outcome per requested browser action, in request order. + # + # @param actions_html_stale [Boolean] True when an action was applied but the returned content could not be refreshed + # + # @param key_metadata [BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + + # @see BrandDev::Models::BrandWebScrapeHTMLResponse#metadata + class Metadata < BrandDev::Internal::Type::BaseModel + # @!attribute final_url + # Final URL scraped after redirects or scraper fallback, when known. Falls back to + # sourceUrl when unavailable. + # + # @return [String] + required :final_url, String, api_name: :finalUrl + + # @!attribute source_url + # Original URL requested by the caller. + # + # @return [String] + required :source_url, String, api_name: :sourceUrl + + # @!attribute additional_meta + # Additional non-social meta tags not promoted to top-level metadata fields. + # + # @return [Hash{Symbol=>String, Array}, nil] + optional :additional_meta, + -> { BrandDev::Internal::Type::HashOf[union: BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::AdditionalMeta] }, + api_name: :additionalMeta + + # @!attribute alternates + # Resolved alternate links from link rel=alternate tags. + # + # @return [Array, nil] + optional :alternates, + -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate] } + + # @!attribute author + # Author metadata, when present. + # + # @return [String, nil] + optional :author, String + + # @!attribute canonical_url + # Resolved canonical URL, when present. + # + # @return [String, nil] + optional :canonical_url, String, api_name: :canonicalUrl + + # @!attribute description + # Best description extracted from standard, Open Graph, or Twitter metadata. + # + # @return [String, nil] + optional :description, String + + # @!attribute favicon + # Resolved favicon URL, when present. + # + # @return [String, nil] + optional :favicon, String + + # @!attribute image + # Primary resolved preview image from Open Graph, Twitter, or image metadata. + # + # @return [String, nil] + optional :image, String + + # @!attribute json_ld + # JSON-LD structured data blocks parsed from the page. + # + # @return [ArrayObject}>, nil] + optional :json_ld, + BrandDev::Internal::Type::ArrayOf[BrandDev::Internal::Type::HashOf[BrandDev::Internal::Type::Unknown]], + api_name: :jsonLd + + # @!attribute keywords + # Keywords extracted from the page's keywords meta tag. + # + # @return [Array, nil] + optional :keywords, BrandDev::Internal::Type::ArrayOf[String] + + # @!attribute language + # Language extracted from html lang or language meta tags. + # + # @return [String, nil] + optional :language, String + + # @!attribute modified_time + # Modified timestamp/date from page metadata, when present. + # + # @return [String, nil] + optional :modified_time, String, api_name: :modifiedTime + + # @!attribute open_graph + # Open Graph metadata with the og: prefix removed and keys camel-cased. + # + # @return [Hash{Symbol=>String, Array}, nil] + optional :open_graph, + -> { BrandDev::Internal::Type::HashOf[union: BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::OpenGraph] }, + api_name: :openGraph + + # @!attribute published_time + # Published timestamp/date from page metadata, when present. + # + # @return [String, nil] + optional :published_time, String, api_name: :publishedTime + + # @!attribute robots + # Robots meta directive, when present. + # + # @return [String, nil] + optional :robots, String + + # @!attribute site_name + # Site or application name from page metadata. + # + # @return [String, nil] + optional :site_name, String, api_name: :siteName + + # @!attribute title + # Best title extracted from the page. + # + # @return [String, nil] + optional :title, String + + # @!attribute twitter + # Twitter card metadata with the twitter: prefix removed and keys camel-cased. + # + # @return [Hash{Symbol=>String, Array}, nil] + optional :twitter, + -> { BrandDev::Internal::Type::HashOf[union: BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Twitter] } + + # @!method initialize(final_url:, source_url:, additional_meta: nil, alternates: nil, author: nil, canonical_url: nil, description: nil, favicon: nil, image: nil, json_ld: nil, keywords: nil, language: nil, modified_time: nil, open_graph: nil, published_time: nil, robots: nil, site_name: nil, title: nil, twitter: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata} for more details. + # + # Metadata extracted from the scraped page HTML. + # + # @param final_url [String] Final URL scraped after redirects or scraper fallback, when known. Falls back to + # + # @param source_url [String] Original URL requested by the caller. + # + # @param additional_meta [Hash{Symbol=>String, Array}] Additional non-social meta tags not promoted to top-level metadata fields. + # + # @param alternates [Array] Resolved alternate links from link rel=alternate tags. + # + # @param author [String] Author metadata, when present. + # + # @param canonical_url [String] Resolved canonical URL, when present. + # + # @param description [String] Best description extracted from standard, Open Graph, or Twitter metadata. + # + # @param favicon [String] Resolved favicon URL, when present. + # + # @param image [String] Primary resolved preview image from Open Graph, Twitter, or image metadata. + # + # @param json_ld [ArrayObject}>] JSON-LD structured data blocks parsed from the page. + # + # @param keywords [Array] Keywords extracted from the page's keywords meta tag. + # + # @param language [String] Language extracted from html lang or language meta tags. + # + # @param modified_time [String] Modified timestamp/date from page metadata, when present. + # + # @param open_graph [Hash{Symbol=>String, Array}] Open Graph metadata with the og: prefix removed and keys camel-cased. + # + # @param published_time [String] Published timestamp/date from page metadata, when present. + # + # @param robots [String] Robots meta directive, when present. + # + # @param site_name [String] Site or application name from page metadata. + # + # @param title [String] Best title extracted from the page. + # + # @param twitter [Hash{Symbol=>String, Array}] Twitter card metadata with the twitter: prefix removed and keys camel-cased. + + module AdditionalMeta + extend BrandDev::Internal::Type::Union + + variant String + + variant -> { BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::AdditionalMeta::StringArray } + + # @!method self.variants + # @return [Array(String, Array)] + + # @type [BrandDev::Internal::Type::Converter] + StringArray = BrandDev::Internal::Type::ArrayOf[String] + end + + class Alternate < BrandDev::Internal::Type::BaseModel + # @!attribute href + # Resolved alternate URL. + # + # @return [String] + required :href, String + + # @!attribute hreflang + # Language or locale for the alternate URL, when present. + # + # @return [String, nil] + optional :hreflang, String + + # @!attribute title + # Alternate resource title, when present. + # + # @return [String, nil] + optional :title, String + + # @!attribute type + # Alternate resource MIME type, when present. + # + # @return [String, nil] + optional :type, String + + # @!method initialize(href:, hreflang: nil, title: nil, type: nil) + # @param href [String] Resolved alternate URL. + # + # @param hreflang [String] Language or locale for the alternate URL, when present. + # + # @param title [String] Alternate resource title, when present. + # + # @param type [String] Alternate resource MIME type, when present. + end + + module OpenGraph + extend BrandDev::Internal::Type::Union + + variant String + + variant -> { BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::OpenGraph::StringArray } + + # @!method self.variants + # @return [Array(String, Array)] + + # @type [BrandDev::Internal::Type::Converter] + StringArray = BrandDev::Internal::Type::ArrayOf[String] + end + + module Twitter + extend BrandDev::Internal::Type::Union + + variant String + + variant -> { BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Twitter::StringArray } + + # @!method self.variants + # @return [Array(String, Array)] + + # @type [BrandDev::Internal::Type::Converter] + StringArray = BrandDev::Internal::Type::ArrayOf[String] + end + end # Indicates success # @@ -40,6 +339,130 @@ module Success # @!method self.values # @return [Array] end + + # Detected content type of the returned `html` field. Sitemaps and feeds are + # surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as + # `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations + # are surfaced as `pptx`/`ppt` with the extracted slides as HTML. + # + # @see BrandDev::Models::BrandWebScrapeHTMLResponse#type + module Type + extend BrandDev::Internal::Type::Enum + + HTML = :html + XML = :xml + JSON = :json + TEXT = :text + CSV = :csv + MARKDOWN = :markdown + SVG = :svg + PDF = :pdf + DOCX = :docx + DOC = :doc + XLSX = :xlsx + XLS = :xls + PPTX = :pptx + PPT = :ppt + + # @!method self.values + # @return [Array] + end + + class ActionsApplied < BrandDev::Internal::Type::BaseModel + # @!attribute instruction + # + # @return [String] + required :instruction, String + + # @!attribute status + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + # + # @return [Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status] + required :status, enum: -> { BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status } + + # @!attribute completion_evidence + # Visible page evidence used to verify an applied action. + # + # @return [String, nil] + optional :completion_evidence, String, api_name: :completionEvidence + + # @!attribute duration_ms + # + # @return [Float, nil] + optional :duration_ms, Float, api_name: :durationMs + + # @!attribute error + # + # @return [String, nil] + optional :error, String + + # @!attribute method_ + # + # @return [String, nil] + optional :method_, String, api_name: :method + + # @!attribute target_description + # + # @return [String, nil] + optional :target_description, String, api_name: :targetDescription + + # @!method initialize(instruction:, status:, completion_evidence: nil, duration_ms: nil, error: nil, method_: nil, target_description: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied} for more details. + # + # @param instruction [String] + # + # @param status [Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status] Applied means the requested page state was visibly verified. Failed means it was + # + # @param completion_evidence [String] Visible page evidence used to verify an applied action. + # + # @param duration_ms [Float] + # + # @param error [String] + # + # @param method_ [String] + # + # @param target_description [String] + + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + # + # @see BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied#status + module Status + extend BrandDev::Internal::Type::Enum + + APPLIED = :applied + FAILED = :failed + SKIPPED = :skipped + + # @!method self.values + # @return [Array] + end + end + + # @see BrandDev::Models::BrandWebScrapeHTMLResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_web_scrape_images_params.rb b/lib/brand_dev/models/brand_web_scrape_images_params.rb index 7cc7159c..6c0f829f 100644 --- a/lib/brand_dev/models/brand_web_scrape_images_params.rb +++ b/lib/brand_dev/models/brand_web_scrape_images_params.rb @@ -8,15 +8,305 @@ class BrandWebScrapeImagesParams < BrandDev::Internal::Type::BaseModel include BrandDev::Internal::Type::RequestParameters # @!attribute url - # Full URL to scrape images from (must include http:// or https:// protocol) + # Page URL to inspect. Must include http:// or https://. # # @return [String] required :url, String - # @!method initialize(url:, request_options: {}) - # @param url [String] Full URL to scrape images from (must include http:// or https:// protocol) + # @!attribute actions + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + # + # @return [Array, nil] + optional :actions, + -> { BrandDev::Internal::Type::ArrayOf[union: BrandDev::BrandWebScrapeImagesParams::Action] }, + nil?: true + + # @!attribute dedupe + # When true, visually duplicate images are removed: every image is loaded and + # perceptually hashed, and only the highest-resolution copy of each duplicate + # group is kept. Images that cannot be downloaded or hashed are kept. Default: + # false. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeImagesParams::Dedupe, nil] + optional :dedupe, union: -> { BrandDev::BrandWebScrapeImagesParams::Dedupe } + + # @!attribute enrichment + # Optional per-image processing, sent as deep-object query params such as + # enrichment[resolution]=true. + # + # @return [BrandDev::Models::BrandWebScrapeImagesParams::Enrichment, nil] + optional :enrichment, -> { BrandDev::BrandWebScrapeImagesParams::Enrichment }, nil?: true + + # @!attribute headers + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + # + # @return [Hash{Symbol=>String}, nil] + optional :headers, BrandDev::Internal::Type::HashOf[String] + + # @!attribute max_age_ms + # Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 + # day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days). + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + + # @!attribute timeout_ms + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + # + # @return [Integer, nil] + optional :timeout_ms, Integer + + # @!attribute wait_for_ms + # Optional browser wait time in milliseconds after initial page load before + # collecting images. Min: 0. Max: 30000 (30 seconds). + # + # @return [Integer, nil] + optional :wait_for_ms, Integer, nil?: true + + # @!method initialize(url:, actions: nil, dedupe: nil, enrichment: nil, headers: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeImagesParams} for more details. + # + # @param url [String] Page URL to inspect. Must include http:// or https://. + # + # @param actions [Array, nil] Optional browser actions executed in array order after the page loads and before + # + # @param dedupe [Boolean, Symbol, BrandDev::Models::BrandWebScrapeImagesParams::Dedupe] When true, visually duplicate images are removed: every image is loaded and perc + # + # @param enrichment [BrandDev::Models::BrandWebScrapeImagesParams::Enrichment, nil] Optional per-image processing, sent as deep-object query params such as enrichme + # + # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob + # + # @param max_age_ms [Integer, nil] Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th + # + # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load before collec # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] + + # Browser action discriminated by `do`. Each variant exposes only its applicable + # fields. + module Action + extend BrandDev::Internal::Type::Union + + discriminator :do + + # Pause for a fixed number of milliseconds before continuing to the next action. + variant :wait, -> { BrandDev::BrandWebScrapeImagesParams::Action::Wait } + + # Resolve and perform one natural-language browser action. + variant :perform, -> { BrandDev::BrandWebScrapeImagesParams::Action::Perform } + + class Wait < BrandDev::Internal::Type::BaseModel + # @!attribute do_ + # + # @return [Symbol, :wait] + required :do_, const: :wait, api_name: :do + + # @!attribute time_ms + # + # @return [Integer] + required :time_ms, Integer, api_name: :timeMs + + # @!method initialize(time_ms:, do_: :wait) + # Pause for a fixed number of milliseconds before continuing to the next action. + # + # @param time_ms [Integer] + # @param do_ [Symbol, :wait] + end + + class Perform < BrandDev::Internal::Type::BaseModel + # @!attribute action + # + # @return [String] + required :action, String + + # @!attribute do_ + # + # @return [Symbol, :perform] + required :do_, const: :perform, api_name: :do + + # @!method initialize(action:, do_: :perform) + # Resolve and perform one natural-language browser action. + # + # @param action [String] + # @param do_ [Symbol, :perform] + end + + # @!method self.variants + # @return [Array(BrandDev::Models::BrandWebScrapeImagesParams::Action::Wait, BrandDev::Models::BrandWebScrapeImagesParams::Action::Perform)] + end + + # When true, visually duplicate images are removed: every image is loaded and + # perceptually hashed, and only the highest-resolution copy of each duplicate + # group is kept. Images that cannot be downloaded or hashed are kept. Default: + # false. + module Dedupe + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeImagesParams::Dedupe::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeImagesParams::Dedupe::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeImagesParams::Dedupe::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + class Enrichment < BrandDev::Internal::Type::BaseModel + # @!attribute classification + # Classify each image by visual asset type. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::Classification, nil] + optional :classification, union: -> { BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification } + + # @!attribute hosted_url + # Host materializable images on the Brand.dev CDN and return their URL and MIME + # type. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::HostedURL, nil] + optional :hosted_url, + union: -> { BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL }, + api_name: :hostedUrl + + # @!attribute max_time_per_ms + # Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000. + # + # @return [Integer, nil] + optional :max_time_per_ms, Integer, api_name: :maxTimePerMs + + # @!attribute resolution + # Measure image width and height when possible. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::Resolution, nil] + optional :resolution, union: -> { BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution } + + # @!method initialize(classification: nil, hosted_url: nil, max_time_per_ms: nil, resolution: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeImagesParams::Enrichment} for more details. + # + # Optional per-image processing, sent as deep-object query params such as + # enrichment[resolution]=true. + # + # @param classification [Boolean, Symbol, BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::Classification] Classify each image by visual asset type. + # + # @param hosted_url [Boolean, Symbol, BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::HostedURL] Host materializable images on the Brand.dev CDN and return their URL and MIME ty + # + # @param max_time_per_ms [Integer] Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000. + # + # @param resolution [Boolean, Symbol, BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::Resolution] Measure image width and height when possible. + + # Classify each image by visual asset type. + # + # @see BrandDev::Models::BrandWebScrapeImagesParams::Enrichment#classification + module Classification + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::Classification::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::Classification::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Host materializable images on the Brand.dev CDN and return their URL and MIME + # type. + # + # @see BrandDev::Models::BrandWebScrapeImagesParams::Enrichment#hosted_url + module HostedURL + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::HostedURL::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::HostedURL::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Measure image width and height when possible. + # + # @see BrandDev::Models::BrandWebScrapeImagesParams::Enrichment#resolution + module Resolution + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::Resolution::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::Resolution::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + end end end end diff --git a/lib/brand_dev/models/brand_web_scrape_images_response.rb b/lib/brand_dev/models/brand_web_scrape_images_response.rb index 01852b57..5a31fbef 100644 --- a/lib/brand_dev/models/brand_web_scrape_images_response.rb +++ b/lib/brand_dev/models/brand_web_scrape_images_response.rb @@ -5,66 +5,86 @@ module Models # @see BrandDev::Resources::Brand#web_scrape_images class BrandWebScrapeImagesResponse < BrandDev::Internal::Type::BaseModel # @!attribute images - # Array of scraped images + # Images found on the page. # # @return [Array] required :images, -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandWebScrapeImagesResponse::Image] } # @!attribute success - # Indicates success + # Always true on success. # # @return [Boolean, BrandDev::Models::BrandWebScrapeImagesResponse::Success] required :success, enum: -> { BrandDev::Models::BrandWebScrapeImagesResponse::Success } # @!attribute url - # The URL that was scraped + # Page URL that was scraped. # # @return [String] required :url, String - # @!method initialize(images:, success:, url:) - # @param images [Array] Array of scraped images + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. # - # @param success [Boolean, BrandDev::Models::BrandWebScrapeImagesResponse::Success] Indicates success + # @return [BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata } + + # @!method initialize(images:, success:, url:, key_metadata: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeImagesResponse} for more details. + # + # @param images [Array] Images found on the page. + # + # @param success [Boolean, BrandDev::Models::BrandWebScrapeImagesResponse::Success] Always true on success. # - # @param url [String] The URL that was scraped + # @param url [String] Page URL that was scraped. + # + # @param key_metadata [BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when class Image < BrandDev::Internal::Type::BaseModel # @!attribute alt - # Alt text of the image, or null if not present + # Image alt text, or null when unavailable. # # @return [String, nil] required :alt, String, nil?: true # @!attribute element - # The HTML element the image was found in + # Where the image was found. # # @return [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element] required :element, enum: -> { BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element } # @!attribute src - # The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI + # Original image value: URL, inline SVG or HTML, or base64 data URI. # # @return [String] required :src, String # @!attribute type - # The type/format of the src value + # Format of src. # # @return [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type] required :type, enum: -> { BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type } - # @!method initialize(alt:, element:, src:, type:) - # @param alt [String, nil] Alt text of the image, or null if not present + # @!attribute enrichment + # Requested metadata for images that could be processed. # - # @param element [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element] The HTML element the image was found in + # @return [BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment, nil] + optional :enrichment, -> { BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment } + + # @!method initialize(alt:, element:, src:, type:, enrichment: nil) + # @param alt [String, nil] Image alt text, or null when unavailable. # - # @param src [String] The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI + # @param element [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element] Where the image was found. # - # @param type [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type] The type/format of the src value + # @param src [String] Original image value: URL, inline SVG or HTML, or base64 data URI. + # + # @param type [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type] Format of src. + # + # @param enrichment [BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment] Requested metadata for images that could be processed. - # The HTML element the image was found in + # Where the image was found. # # @see BrandDev::Models::BrandWebScrapeImagesResponse::Image#element module Element @@ -84,7 +104,7 @@ module Element # @return [Array] end - # The type/format of the src value + # Format of src. # # @see BrandDev::Models::BrandWebScrapeImagesResponse::Image#type module Type @@ -97,9 +117,74 @@ module Type # @!method self.values # @return [Array] end + + # @see BrandDev::Models::BrandWebScrapeImagesResponse::Image#enrichment + class Enrichment < BrandDev::Internal::Type::BaseModel + # @!attribute height + # Image height in pixels, when measured. + # + # @return [Integer, nil] + optional :height, Integer + + # @!attribute mimetype + # Detected MIME type, when hosted. + # + # @return [String, nil] + optional :mimetype, String + + # @!attribute type + # Visual asset category, when classified. + # + # @return [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type, nil] + optional :type, enum: -> { BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type } + + # @!attribute url + # Brand.dev CDN URL, when hosted. + # + # @return [String, nil] + optional :url, String + + # @!attribute width + # Image width in pixels, when measured. + # + # @return [Integer, nil] + optional :width, Integer + + # @!method initialize(height: nil, mimetype: nil, type: nil, url: nil, width: nil) + # Requested metadata for images that could be processed. + # + # @param height [Integer] Image height in pixels, when measured. + # + # @param mimetype [String] Detected MIME type, when hosted. + # + # @param type [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type] Visual asset category, when classified. + # + # @param url [String] Brand.dev CDN URL, when hosted. + # + # @param width [Integer] Image width in pixels, when measured. + + # Visual asset category, when classified. + # + # @see BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment#type + module Type + extend BrandDev::Internal::Type::Enum + + PHOTOGRAPHY = :photography + ILLUSTRATION = :illustration + LOGO = :logo + WORDMARK = :wordmark + ICON = :icon + PATTERN = :pattern + GRAPHIC = :graphic + OTHER = :other + + # @!method self.values + # @return [Array] + end + end end - # Indicates success + # Always true on success. # # @see BrandDev::Models::BrandWebScrapeImagesResponse#success module Success @@ -110,6 +195,29 @@ module Success # @!method self.values # @return [Array] end + + # @see BrandDev::Models::BrandWebScrapeImagesResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_web_scrape_md_params.rb b/lib/brand_dev/models/brand_web_scrape_md_params.rb index 1159be5b..b946fc39 100644 --- a/lib/brand_dev/models/brand_web_scrape_md_params.rb +++ b/lib/brand_dev/models/brand_web_scrape_md_params.rb @@ -8,52 +8,718 @@ class BrandWebScrapeMdParams < BrandDev::Internal::Type::BaseModel include BrandDev::Internal::Type::RequestParameters # @!attribute url - # Full URL to scrape and convert to markdown (must include http:// or https:// + # Full URL to scrape into LLM usable Markdown (must include http:// or https:// # protocol) # # @return [String] required :url, String + # @!attribute actions + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + # + # @return [Array, nil] + optional :actions, + -> { BrandDev::Internal::Type::ArrayOf[union: BrandDev::BrandWebScrapeMdParams::Action] }, + nil?: true + + # @!attribute country + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + # + # @return [Symbol, BrandDev::Models::BrandWebScrapeMdParams::Country, nil] + optional :country, enum: -> { BrandDev::BrandWebScrapeMdParams::Country } + + # @!attribute exclude_selectors + # CSS selectors to remove before conversion to Markdown. Applied after + # includeSelectors. Exclusion takes precedence: an element matching both is + # removed. Examples: "nav", "footer", ".ad-banner", "[aria-hidden=true]". + # + # @return [Array, nil] + optional :exclude_selectors, BrandDev::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute headers + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + # + # @return [Hash{Symbol=>String}, nil] + optional :headers, BrandDev::Internal::Type::HashOf[String] + + # @!attribute include_frames + # When true, the contents of iframes are rendered to Markdown. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::IncludeFrames, nil] + optional :include_frames, union: -> { BrandDev::BrandWebScrapeMdParams::IncludeFrames } + # @!attribute include_images # Include image references in Markdown output # - # @return [Boolean, nil] - optional :include_images, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::IncludeImages, nil] + optional :include_images, union: -> { BrandDev::BrandWebScrapeMdParams::IncludeImages } # @!attribute include_links # Preserve hyperlinks in Markdown output # - # @return [Boolean, nil] - optional :include_links, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::IncludeLinks, nil] + optional :include_links, union: -> { BrandDev::BrandWebScrapeMdParams::IncludeLinks } + + # @!attribute include_selectors + # CSS selectors. When provided, only matching HTML subtrees (and their + # descendants) are kept before conversion to Markdown. When omitted, the entire + # document is kept. Examples: "article.main", "#content", "[role=main]". + # + # @return [Array, nil] + optional :include_selectors, BrandDev::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute max_age_ms + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, nil?: true + + # @!attribute pdf + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + # + # @return [BrandDev::Models::BrandWebScrapeMdParams::Pdf, nil] + optional :pdf, -> { BrandDev::BrandWebScrapeMdParams::Pdf } + + # @!attribute settle_animations + # When true, waits briefly for CSS and transition animations to settle before + # converting to Markdown. Defaults to false. This adds a bit of latency in + # exchange for more stable output on animated pages. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::SettleAnimations, nil] + optional :settle_animations, union: -> { BrandDev::BrandWebScrapeMdParams::SettleAnimations } # @!attribute shorten_base64_images # Shorten base64-encoded image data in the Markdown output # - # @return [Boolean, nil] - optional :shorten_base64_images, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::ShortenBase64Images, nil] + optional :shorten_base64_images, union: -> { BrandDev::BrandWebScrapeMdParams::ShortenBase64Images } + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + + # @!attribute timeout_ms + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + # + # @return [Integer, nil] + optional :timeout_ms, Integer # @!attribute use_main_content_only # Extract only the main content of the page, excluding headers, footers, sidebars, # and navigation # - # @return [Boolean, nil] - optional :use_main_content_only, BrandDev::Internal::Type::Boolean + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::UseMainContentOnly, nil] + optional :use_main_content_only, union: -> { BrandDev::BrandWebScrapeMdParams::UseMainContentOnly } + + # @!attribute wait_for_ms + # Optional browser wait time in milliseconds after initial page load before + # converting the page to Markdown. Min: 0. Max: 30000 (30 seconds). + # + # @return [Integer, nil] + optional :wait_for_ms, Integer, nil?: true + + # @!attribute zdr + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + # + # @return [Symbol, BrandDev::Models::BrandWebScrapeMdParams::Zdr, nil] + optional :zdr, enum: -> { BrandDev::BrandWebScrapeMdParams::Zdr } - # @!method initialize(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {}) + # @!method initialize(url:, actions: nil, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, shorten_base64_images: nil, tags: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, zdr: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandWebScrapeMdParams} for more details. # - # @param url [String] Full URL to scrape and convert to markdown (must include http:// or https:// pro + # @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr + # + # @param actions [Array, nil] Optional browser actions executed in array order after the page loads and before + # + # @param country [Symbol, BrandDev::Models::BrandWebScrapeMdParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al + # + # @param exclude_selectors [Array, nil] CSS selectors to remove before conversion to Markdown. Applied after includeSele + # + # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob + # + # @param include_frames [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::IncludeFrames] When true, the contents of iframes are rendered to Markdown. + # + # @param include_images [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::IncludeImages] Include image references in Markdown output + # + # @param include_links [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::IncludeLinks] Preserve hyperlinks in Markdown output + # + # @param include_selectors [Array, nil] CSS selectors. When provided, only matching HTML subtrees (and their descendants # - # @param include_images [Boolean] Include image references in Markdown output + # @param max_age_ms [Integer, nil] Return a cached result if a prior scrape for the same parameters exists and is y # - # @param include_links [Boolean] Preserve hyperlinks in Markdown output + # @param pdf [BrandDev::Models::BrandWebScrapeMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image # - # @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output + # @param settle_animations [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::SettleAnimations] When true, waits briefly for CSS and transition animations to settle before conv # - # @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars, + # @param shorten_base64_images [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::ShortenBase64Images] Shorten base64-encoded image data in the Markdown output + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th + # + # @param use_main_content_only [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::UseMainContentOnly] Extract only the main content of the page, excluding headers, footers, sidebars, + # + # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load before conver + # + # @param zdr [Symbol, BrandDev::Models::BrandWebScrapeMdParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] + + # Browser action discriminated by `do`. Each variant exposes only its applicable + # fields. + module Action + extend BrandDev::Internal::Type::Union + + discriminator :do + + # Pause for a fixed number of milliseconds before continuing to the next action. + variant :wait, -> { BrandDev::BrandWebScrapeMdParams::Action::Wait } + + # Resolve and perform one natural-language browser action. + variant :perform, -> { BrandDev::BrandWebScrapeMdParams::Action::Perform } + + class Wait < BrandDev::Internal::Type::BaseModel + # @!attribute do_ + # + # @return [Symbol, :wait] + required :do_, const: :wait, api_name: :do + + # @!attribute time_ms + # + # @return [Integer] + required :time_ms, Integer, api_name: :timeMs + + # @!method initialize(time_ms:, do_: :wait) + # Pause for a fixed number of milliseconds before continuing to the next action. + # + # @param time_ms [Integer] + # @param do_ [Symbol, :wait] + end + + class Perform < BrandDev::Internal::Type::BaseModel + # @!attribute action + # + # @return [String] + required :action, String + + # @!attribute do_ + # + # @return [Symbol, :perform] + required :do_, const: :perform, api_name: :do + + # @!method initialize(action:, do_: :perform) + # Resolve and perform one natural-language browser action. + # + # @param action [String] + # @param do_ [Symbol, :perform] + end + + # @!method self.variants + # @return [Array(BrandDev::Models::BrandWebScrapeMdParams::Action::Wait, BrandDev::Models::BrandWebScrapeMdParams::Action::Perform)] + end + + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + module Country + extend BrandDev::Internal::Type::Enum + + AD = :ad + AE = :ae + AF = :af + AG = :ag + AI = :ai + AL = :al + AM = :am + AO = :ao + AR = :ar + AT = :at + AU = :au + AW = :aw + AZ = :az + BA = :ba + BB = :bb + BD = :bd + BE = :be + BF = :bf + BG = :bg + BH = :bh + BI = :bi + BJ = :bj + BM = :bm + BN = :bn + BO = :bo + BQ = :bq + BR = :br + BS = :bs + BW = :bw + BY = :by + BZ = :bz + CA = :ca + CD = :cd + CF = :cf + CG = :cg + CH = :ch + CI = :ci + CL = :cl + CM = :cm + CN = :cn + CO = :co + CR = :cr + CV = :cv + CW = :cw + CY = :cy + CZ = :cz + DE = :de + DJ = :dj + DK = :dk + DM = :dm + DO = :do + DZ = :dz + EC = :ec + EE = :ee + EG = :eg + ES = :es + ET = :et + FI = :fi + FJ = :fj + FR = :fr + GA = :ga + GB = :gb + GD = :gd + GE = :ge + GF = :gf + GG = :gg + GH = :gh + GM = :gm + GN = :gn + GP = :gp + GQ = :gq + GR = :gr + GT = :gt + GU = :gu + GW = :gw + GY = :gy + HK = :hk + HN = :hn + HR = :hr + HT = :ht + HU = :hu + ID = :id + IE = :ie + IL = :il + IM = :im + IN = :in + IQ = :iq + IR = :ir + IS = :is + IT = :it + JE = :je + JM = :jm + JO = :jo + JP = :jp + KE = :ke + KG = :kg + KH = :kh + KN = :kn + KR = :kr + KW = :kw + KY = :ky + KZ = :kz + LA = :la + LB = :lb + LC = :lc + LK = :lk + LR = :lr + LS = :ls + LT = :lt + LU = :lu + LV = :lv + LY = :ly + MA = :ma + MC = :mc + MD = :md + ME = :me + MF = :mf + MG = :mg + MK = :mk + ML = :ml + MM = :mm + MN = :mn + MO = :mo + MQ = :mq + MR = :mr + MT = :mt + MU = :mu + MV = :mv + MW = :mw + MX = :mx + MY = :my + MZ = :mz + NA = :na + NC = :nc + NE = :ne + NG = :ng + NI = :ni + NL = :nl + NO = :no + NP = :np + NZ = :nz + OM = :om + PA = :pa + PE = :pe + PF = :pf + PG = :pg + PH = :ph + PK = :pk + PL = :pl + PR = :pr + PS = :ps + PT = :pt + PY = :py + QA = :qa + RE = :re + RO = :ro + RS = :rs + RU = :ru + RW = :rw + SA = :sa + SC = :sc + SD = :sd + SE = :se + SG = :sg + SI = :si + SK = :sk + SL = :sl + SM = :sm + SN = :sn + SO = :so + SR = :sr + SS = :ss + ST = :st + SV = :sv + SX = :sx + SY = :sy + SZ = :sz + TC = :tc + TD = :td + TG = :tg + TH = :th + TJ = :tj + TL = :tl + TM = :tm + TN = :tn + TR = :tr + TT = :tt + TW = :tw + TZ = :tz + UA = :ua + UG = :ug + US = :us + UY = :uy + UZ = :uz + VC = :vc + VE = :ve + VG = :vg + VI = :vi + VN = :vn + YE = :ye + YT = :yt + ZA = :za + ZM = :zm + ZW = :zw + + # @!method self.values + # @return [Array] + end + + # When true, the contents of iframes are rendered to Markdown. + module IncludeFrames + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::IncludeFrames::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::IncludeFrames::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeMdParams::IncludeFrames::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Include image references in Markdown output + module IncludeImages + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::IncludeImages::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::IncludeImages::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeMdParams::IncludeImages::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Preserve hyperlinks in Markdown output + module IncludeLinks + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::IncludeLinks::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::IncludeLinks::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeMdParams::IncludeLinks::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + class Pdf < BrandDev::Internal::Type::BaseModel + # @!attribute end_ + # Last 1-based PDF page to parse. When omitted, parsing ends at the last page. + # Must be greater than or equal to start when both are provided. + # + # @return [Integer, nil] + optional :end_, Integer, api_name: :end + + # @!attribute ocr + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::Pdf::Ocr, nil] + optional :ocr, union: -> { BrandDev::BrandWebScrapeMdParams::Pdf::Ocr } + + # @!attribute should_parse + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + # + # @return [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::Pdf::ShouldParse, nil] + optional :should_parse, + union: -> { BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse }, + api_name: :shouldParse + + # @!attribute start + # First 1-based PDF page to parse. When omitted, parsing starts at the first page. + # + # @return [Integer, nil] + optional :start, Integer + + # @!method initialize(end_: nil, ocr: nil, should_parse: nil, start: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeMdParams::Pdf} for more details. + # + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + # + # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus + # + # @param ocr [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::Pdf::Ocr] When true, detect and OCR images embedded in the selected PDF pages, inserting r + # + # @param should_parse [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::Pdf::ShouldParse] When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # + # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page. + + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + # + # @see BrandDev::Models::BrandWebScrapeMdParams::Pdf#ocr + module Ocr + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::Pdf::Ocr::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::Pdf::Ocr::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeMdParams::Pdf::Ocr::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + # + # @see BrandDev::Models::BrandWebScrapeMdParams::Pdf#should_parse + module ShouldParse + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::Pdf::ShouldParse::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::Pdf::ShouldParse::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + end + + # When true, waits briefly for CSS and transition animations to settle before + # converting to Markdown. Defaults to false. This adds a bit of latency in + # exchange for more stable output on animated pages. + module SettleAnimations + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::SettleAnimations::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::SettleAnimations::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeMdParams::SettleAnimations::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Shorten base64-encoded image data in the Markdown output + module ShortenBase64Images + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::ShortenBase64Images::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::ShortenBase64Images::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Extract only the main content of the page, excluding headers, footers, sidebars, + # and navigation + module UseMainContentOnly + extend BrandDev::Internal::Type::Union + + variant BrandDev::Internal::Type::Boolean + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::UseMainContentOnly::TRUE } + + variant const: -> { BrandDev::Models::BrandWebScrapeMdParams::UseMainContentOnly::FALSE } + + # @!method self.variants + # @return [Array(Boolean, Symbol)] + + define_sorbet_constant!(:Variants) do + T.type_alias { T.any(T::Boolean, BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::TaggedSymbol) } + end + + # @!group + + TRUE = :true + FALSE = :false + + # @!endgroup + end + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + module Zdr + extend BrandDev::Internal::Type::Enum + + ENABLED = :enabled + DISABLED = :disabled + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/brand_dev/models/brand_web_scrape_md_response.rb b/lib/brand_dev/models/brand_web_scrape_md_response.rb index ed967634..2c9f8ebf 100644 --- a/lib/brand_dev/models/brand_web_scrape_md_response.rb +++ b/lib/brand_dev/models/brand_web_scrape_md_response.rb @@ -4,12 +4,26 @@ module BrandDev module Models # @see BrandDev::Resources::Brand#web_scrape_md class BrandWebScrapeMdResponse < BrandDev::Internal::Type::BaseModel + # @!attribute content_length + # UTF-8 byte length of the returned Markdown. Use 0 to identify an empty result + # and compare small values against your workload's minimum useful-content + # threshold. + # + # @return [Integer] + required :content_length, Integer, api_name: :contentLength + # @!attribute markdown # Page content converted to GitHub Flavored Markdown # # @return [String] required :markdown, String + # @!attribute metadata + # Metadata extracted from the scraped page HTML. + # + # @return [BrandDev::Models::BrandWebScrapeMdResponse::Metadata] + required :metadata, -> { BrandDev::Models::BrandWebScrapeMdResponse::Metadata } + # @!attribute success # Indicates success # @@ -22,12 +36,294 @@ class BrandWebScrapeMdResponse < BrandDev::Internal::Type::BaseModel # @return [String] required :url, String - # @!method initialize(markdown:, success:, url:) + # @!attribute actions_applied + # One verified outcome per requested browser action, in request order. + # + # @return [Array, nil] + optional :actions_applied, + -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied] }, + api_name: :actionsApplied + + # @!attribute actions_html_stale + # True when an action was applied but the returned content could not be refreshed + # afterward. + # + # @return [Boolean, nil] + optional :actions_html_stale, BrandDev::Internal::Type::Boolean, api_name: :actionsHtmlStale + + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata } + + # @!method initialize(content_length:, markdown:, metadata:, success:, url:, actions_applied: nil, actions_html_stale: nil, key_metadata: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeMdResponse} for more details. + # + # @param content_length [Integer] UTF-8 byte length of the returned Markdown. Use 0 to identify an empty result an + # # @param markdown [String] Page content converted to GitHub Flavored Markdown # + # @param metadata [BrandDev::Models::BrandWebScrapeMdResponse::Metadata] Metadata extracted from the scraped page HTML. + # # @param success [Boolean, BrandDev::Models::BrandWebScrapeMdResponse::Success] Indicates success # # @param url [String] The URL that was scraped + # + # @param actions_applied [Array] One verified outcome per requested browser action, in request order. + # + # @param actions_html_stale [Boolean] True when an action was applied but the returned content could not be refreshed + # + # @param key_metadata [BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when + + # @see BrandDev::Models::BrandWebScrapeMdResponse#metadata + class Metadata < BrandDev::Internal::Type::BaseModel + # @!attribute final_url + # Final URL scraped after redirects or scraper fallback, when known. Falls back to + # sourceUrl when unavailable. + # + # @return [String] + required :final_url, String, api_name: :finalUrl + + # @!attribute source_url + # Original URL requested by the caller. + # + # @return [String] + required :source_url, String, api_name: :sourceUrl + + # @!attribute additional_meta + # Additional non-social meta tags not promoted to top-level metadata fields. + # + # @return [Hash{Symbol=>String, Array}, nil] + optional :additional_meta, + -> { BrandDev::Internal::Type::HashOf[union: BrandDev::Models::BrandWebScrapeMdResponse::Metadata::AdditionalMeta] }, + api_name: :additionalMeta + + # @!attribute alternates + # Resolved alternate links from link rel=alternate tags. + # + # @return [Array, nil] + optional :alternates, + -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate] } + + # @!attribute author + # Author metadata, when present. + # + # @return [String, nil] + optional :author, String + + # @!attribute canonical_url + # Resolved canonical URL, when present. + # + # @return [String, nil] + optional :canonical_url, String, api_name: :canonicalUrl + + # @!attribute description + # Best description extracted from standard, Open Graph, or Twitter metadata. + # + # @return [String, nil] + optional :description, String + + # @!attribute favicon + # Resolved favicon URL, when present. + # + # @return [String, nil] + optional :favicon, String + + # @!attribute image + # Primary resolved preview image from Open Graph, Twitter, or image metadata. + # + # @return [String, nil] + optional :image, String + + # @!attribute json_ld + # JSON-LD structured data blocks parsed from the page. + # + # @return [ArrayObject}>, nil] + optional :json_ld, + BrandDev::Internal::Type::ArrayOf[BrandDev::Internal::Type::HashOf[BrandDev::Internal::Type::Unknown]], + api_name: :jsonLd + + # @!attribute keywords + # Keywords extracted from the page's keywords meta tag. + # + # @return [Array, nil] + optional :keywords, BrandDev::Internal::Type::ArrayOf[String] + + # @!attribute language + # Language extracted from html lang or language meta tags. + # + # @return [String, nil] + optional :language, String + + # @!attribute modified_time + # Modified timestamp/date from page metadata, when present. + # + # @return [String, nil] + optional :modified_time, String, api_name: :modifiedTime + + # @!attribute open_graph + # Open Graph metadata with the og: prefix removed and keys camel-cased. + # + # @return [Hash{Symbol=>String, Array}, nil] + optional :open_graph, + -> { BrandDev::Internal::Type::HashOf[union: BrandDev::Models::BrandWebScrapeMdResponse::Metadata::OpenGraph] }, + api_name: :openGraph + + # @!attribute published_time + # Published timestamp/date from page metadata, when present. + # + # @return [String, nil] + optional :published_time, String, api_name: :publishedTime + + # @!attribute robots + # Robots meta directive, when present. + # + # @return [String, nil] + optional :robots, String + + # @!attribute site_name + # Site or application name from page metadata. + # + # @return [String, nil] + optional :site_name, String, api_name: :siteName + + # @!attribute title + # Best title extracted from the page. + # + # @return [String, nil] + optional :title, String + + # @!attribute twitter + # Twitter card metadata with the twitter: prefix removed and keys camel-cased. + # + # @return [Hash{Symbol=>String, Array}, nil] + optional :twitter, + -> { BrandDev::Internal::Type::HashOf[union: BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Twitter] } + + # @!method initialize(final_url:, source_url:, additional_meta: nil, alternates: nil, author: nil, canonical_url: nil, description: nil, favicon: nil, image: nil, json_ld: nil, keywords: nil, language: nil, modified_time: nil, open_graph: nil, published_time: nil, robots: nil, site_name: nil, title: nil, twitter: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeMdResponse::Metadata} for more details. + # + # Metadata extracted from the scraped page HTML. + # + # @param final_url [String] Final URL scraped after redirects or scraper fallback, when known. Falls back to + # + # @param source_url [String] Original URL requested by the caller. + # + # @param additional_meta [Hash{Symbol=>String, Array}] Additional non-social meta tags not promoted to top-level metadata fields. + # + # @param alternates [Array] Resolved alternate links from link rel=alternate tags. + # + # @param author [String] Author metadata, when present. + # + # @param canonical_url [String] Resolved canonical URL, when present. + # + # @param description [String] Best description extracted from standard, Open Graph, or Twitter metadata. + # + # @param favicon [String] Resolved favicon URL, when present. + # + # @param image [String] Primary resolved preview image from Open Graph, Twitter, or image metadata. + # + # @param json_ld [ArrayObject}>] JSON-LD structured data blocks parsed from the page. + # + # @param keywords [Array] Keywords extracted from the page's keywords meta tag. + # + # @param language [String] Language extracted from html lang or language meta tags. + # + # @param modified_time [String] Modified timestamp/date from page metadata, when present. + # + # @param open_graph [Hash{Symbol=>String, Array}] Open Graph metadata with the og: prefix removed and keys camel-cased. + # + # @param published_time [String] Published timestamp/date from page metadata, when present. + # + # @param robots [String] Robots meta directive, when present. + # + # @param site_name [String] Site or application name from page metadata. + # + # @param title [String] Best title extracted from the page. + # + # @param twitter [Hash{Symbol=>String, Array}] Twitter card metadata with the twitter: prefix removed and keys camel-cased. + + module AdditionalMeta + extend BrandDev::Internal::Type::Union + + variant String + + variant -> { BrandDev::Models::BrandWebScrapeMdResponse::Metadata::AdditionalMeta::StringArray } + + # @!method self.variants + # @return [Array(String, Array)] + + # @type [BrandDev::Internal::Type::Converter] + StringArray = BrandDev::Internal::Type::ArrayOf[String] + end + + class Alternate < BrandDev::Internal::Type::BaseModel + # @!attribute href + # Resolved alternate URL. + # + # @return [String] + required :href, String + + # @!attribute hreflang + # Language or locale for the alternate URL, when present. + # + # @return [String, nil] + optional :hreflang, String + + # @!attribute title + # Alternate resource title, when present. + # + # @return [String, nil] + optional :title, String + + # @!attribute type + # Alternate resource MIME type, when present. + # + # @return [String, nil] + optional :type, String + + # @!method initialize(href:, hreflang: nil, title: nil, type: nil) + # @param href [String] Resolved alternate URL. + # + # @param hreflang [String] Language or locale for the alternate URL, when present. + # + # @param title [String] Alternate resource title, when present. + # + # @param type [String] Alternate resource MIME type, when present. + end + + module OpenGraph + extend BrandDev::Internal::Type::Union + + variant String + + variant -> { BrandDev::Models::BrandWebScrapeMdResponse::Metadata::OpenGraph::StringArray } + + # @!method self.variants + # @return [Array(String, Array)] + + # @type [BrandDev::Internal::Type::Converter] + StringArray = BrandDev::Internal::Type::ArrayOf[String] + end + + module Twitter + extend BrandDev::Internal::Type::Union + + variant String + + variant -> { BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Twitter::StringArray } + + # @!method self.variants + # @return [Array(String, Array)] + + # @type [BrandDev::Internal::Type::Converter] + StringArray = BrandDev::Internal::Type::ArrayOf[String] + end + end # Indicates success # @@ -40,6 +336,102 @@ module Success # @!method self.values # @return [Array] end + + class ActionsApplied < BrandDev::Internal::Type::BaseModel + # @!attribute instruction + # + # @return [String] + required :instruction, String + + # @!attribute status + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + # + # @return [Symbol, BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status] + required :status, enum: -> { BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status } + + # @!attribute completion_evidence + # Visible page evidence used to verify an applied action. + # + # @return [String, nil] + optional :completion_evidence, String, api_name: :completionEvidence + + # @!attribute duration_ms + # + # @return [Float, nil] + optional :duration_ms, Float, api_name: :durationMs + + # @!attribute error + # + # @return [String, nil] + optional :error, String + + # @!attribute method_ + # + # @return [String, nil] + optional :method_, String, api_name: :method + + # @!attribute target_description + # + # @return [String, nil] + optional :target_description, String, api_name: :targetDescription + + # @!method initialize(instruction:, status:, completion_evidence: nil, duration_ms: nil, error: nil, method_: nil, target_description: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied} for more details. + # + # @param instruction [String] + # + # @param status [Symbol, BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status] Applied means the requested page state was visibly verified. Failed means it was + # + # @param completion_evidence [String] Visible page evidence used to verify an applied action. + # + # @param duration_ms [Float] + # + # @param error [String] + # + # @param method_ [String] + # + # @param target_description [String] + + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + # + # @see BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied#status + module Status + extend BrandDev::Internal::Type::Enum + + APPLIED = :applied + FAILED = :failed + SKIPPED = :skipped + + # @!method self.values + # @return [Array] + end + end + + # @see BrandDev::Models::BrandWebScrapeMdResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/brand_web_scrape_sitemap_params.rb b/lib/brand_dev/models/brand_web_scrape_sitemap_params.rb index eabba65d..4317b4c8 100644 --- a/lib/brand_dev/models/brand_web_scrape_sitemap_params.rb +++ b/lib/brand_dev/models/brand_web_scrape_sitemap_params.rb @@ -8,12 +8,19 @@ class BrandWebScrapeSitemapParams < BrandDev::Internal::Type::BaseModel include BrandDev::Internal::Type::RequestParameters # @!attribute domain - # Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be - # automatically normalized and validated. + # Domain to build a sitemap for # # @return [String] required :domain, String + # @!attribute headers + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + # + # @return [Hash{Symbol=>String}, nil] + optional :headers, BrandDev::Internal::Type::HashOf[String] + # @!attribute max_links # Maximum number of links to return from the sitemap crawl. Defaults to 10,000. # Minimum is 1, maximum is 100,000. @@ -21,15 +28,80 @@ class BrandWebScrapeSitemapParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :max_links, Integer - # @!method initialize(domain:, max_links: nil, request_options: {}) + # @!attribute sitemap_url + # Optional explicit sitemap URL. When provided, exactly this sitemap is crawled + # instead of discovering the domain's sitemaps. + # + # @return [String, nil] + optional :sitemap_url, String + + # @!attribute tags + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + # + # @return [Array, nil] + optional :tags, BrandDev::Internal::Type::ArrayOf[String] + + # @!attribute timeout_ms + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + # + # @return [Integer, nil] + optional :timeout_ms, Integer + + # @!attribute url_regex + # Optional RE2-compatible regex pattern. Only URLs matching this pattern are + # returned and counted against maxLinks. + # + # @return [String, nil] + optional :url_regex, String + + # @!attribute zdr + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + # + # @return [Symbol, BrandDev::Models::BrandWebScrapeSitemapParams::Zdr, nil] + optional :zdr, enum: -> { BrandDev::BrandWebScrapeSitemapParams::Zdr } + + # @!method initialize(domain:, headers: nil, max_links: nil, sitemap_url: nil, tags: nil, timeout_ms: nil, url_regex: nil, zdr: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandWebScrapeSitemapParams} for more details. # - # @param domain [String] Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be auto + # @param domain [String] Domain to build a sitemap for + # + # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob # # @param max_links [Integer] Maximum number of links to return from the sitemap crawl. Defaults to 10,000. Mi # + # @param sitemap_url [String] Optional explicit sitemap URL. When provided, exactly this sitemap is crawled in + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th + # + # @param url_regex [String] Optional RE2-compatible regex pattern. Only URLs matching this pattern are retur + # + # @param zdr [Symbol, BrandDev::Models::BrandWebScrapeSitemapParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro + # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + module Zdr + extend BrandDev::Internal::Type::Enum + + ENABLED = :enabled + DISABLED = :disabled + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/brand_dev/models/brand_web_scrape_sitemap_response.rb b/lib/brand_dev/models/brand_web_scrape_sitemap_response.rb index a4423812..38ab124b 100644 --- a/lib/brand_dev/models/brand_web_scrape_sitemap_response.rb +++ b/lib/brand_dev/models/brand_web_scrape_sitemap_response.rb @@ -28,7 +28,17 @@ class BrandWebScrapeSitemapResponse < BrandDev::Internal::Type::BaseModel # @return [Array] required :urls, BrandDev::Internal::Type::ArrayOf[String] - # @!method initialize(domain:, meta:, success:, urls:) + # @!attribute key_metadata + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @return [BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata, nil] + optional :key_metadata, -> { BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata } + + # @!method initialize(domain:, meta:, success:, urls:, key_metadata: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeSitemapResponse} for more details. + # # @param domain [String] The normalized domain that was crawled # # @param meta [BrandDev::Models::BrandWebScrapeSitemapResponse::Meta] Metadata about the sitemap crawl operation @@ -36,6 +46,8 @@ class BrandWebScrapeSitemapResponse < BrandDev::Internal::Type::BaseModel # @param success [Boolean, BrandDev::Models::BrandWebScrapeSitemapResponse::Success] Indicates success # # @param urls [Array] Array of discovered page URLs from the sitemap (max 500) + # + # @param key_metadata [BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when # @see BrandDev::Models::BrandWebScrapeSitemapResponse#meta class Meta < BrandDev::Internal::Type::BaseModel @@ -86,6 +98,29 @@ module Success # @!method self.values # @return [Array] end + + # @see BrandDev::Models::BrandWebScrapeSitemapResponse#key_metadata + class KeyMetadata < BrandDev::Internal::Type::BaseModel + # @!attribute credits_consumed + # The number of credits consumed by this request. + # + # @return [Integer] + required :credits_consumed, Integer + + # @!attribute credits_remaining + # The number of credits remaining for your organization after this request. + # + # @return [Integer] + required :credits_remaining, Integer + + # @!method initialize(credits_consumed:, credits_remaining:) + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + # + # @param credits_consumed [Integer] The number of credits consumed by this request. + # + # @param credits_remaining [Integer] The number of credits remaining for your organization after this request. + end end end end diff --git a/lib/brand_dev/models/crawl_controls.rb b/lib/brand_dev/models/crawl_controls.rb new file mode 100644 index 00000000..85257316 --- /dev/null +++ b/lib/brand_dev/models/crawl_controls.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +module BrandDev + module Models + class CrawlControls < BrandDev::Internal::Type::BaseModel + # @!attribute follow_subdomains + # Whether links to subdomains were followed. Always false for a sitemap crawl. + # + # @return [Boolean] + required :follow_subdomains, BrandDev::Internal::Type::Boolean + + # @!attribute max_depth + # Link depth limit. Always 0 for a sitemap crawl, which never follows links off + # its URLs; null when a `start_url` crawl set no limit. + # + # @return [Integer, nil] + required :max_depth, Integer, nil?: true + + # @!attribute max_pages + # The `maxUrls` submitted with the crawl. A sitemap crawl scrapes only the URLs + # its sitemap actually lists, up to this many, so `input.reserved` is often lower. + # + # @return [Integer] + required :max_pages, Integer + + # @!attribute source + # Where the crawl started. + # + # @return [BrandDev::Models::CrawlControls::Source::UnionMember0, BrandDev::Models::CrawlControls::Source::UnionMember1] + required :source, union: -> { BrandDev::CrawlControls::Source } + + # @!attribute url_pattern + # RE2 pattern URLs had to match to be crawled. Null when the crawl set none. + # + # @return [String, nil] + required :url_pattern, String, nil?: true + + # @!method initialize(follow_subdomains:, max_depth:, max_pages:, source:, url_pattern:) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::CrawlControls} for more details. + # + # The crawl controls as submitted, so the limits requested can be compared against + # what the crawl reached. + # + # @param follow_subdomains [Boolean] Whether links to subdomains were followed. Always false for a sitemap crawl. + # + # @param max_depth [Integer, nil] Link depth limit. Always 0 for a sitemap crawl, which never follows links off it + # + # @param max_pages [Integer] The `maxUrls` submitted with the crawl. A sitemap crawl scrapes only the URLs it + # + # @param source [BrandDev::Models::CrawlControls::Source::UnionMember0, BrandDev::Models::CrawlControls::Source::UnionMember1] Where the crawl started. + # + # @param url_pattern [String, nil] RE2 pattern URLs had to match to be crawled. Null when the crawl set none. + + # Where the crawl started. + # + # @see BrandDev::Models::CrawlControls#source + module Source + extend BrandDev::Internal::Type::Union + + variant -> { BrandDev::CrawlControls::Source::UnionMember0 } + + variant -> { BrandDev::CrawlControls::Source::UnionMember1 } + + class UnionMember0 < BrandDev::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, BrandDev::Models::CrawlControls::Source::UnionMember0::Type] + required :type, enum: -> { BrandDev::CrawlControls::Source::UnionMember0::Type } + + # @!attribute url + # Page the crawl started from. + # + # @return [String] + required :url, String + + # @!method initialize(type:, url:) + # @param type [Symbol, BrandDev::Models::CrawlControls::Source::UnionMember0::Type] + # + # @param url [String] Page the crawl started from. + + # @see BrandDev::Models::CrawlControls::Source::UnionMember0#type + module Type + extend BrandDev::Internal::Type::Enum + + START_URL = :start_url + + # @!method self.values + # @return [Array] + end + end + + class UnionMember1 < BrandDev::Internal::Type::BaseModel + # @!attribute domain + # Domain whose sitemap supplied the pages. + # + # @return [String] + required :domain, String + + # @!attribute type + # + # @return [Symbol, BrandDev::Models::CrawlControls::Source::UnionMember1::Type] + required :type, enum: -> { BrandDev::CrawlControls::Source::UnionMember1::Type } + + # @!method initialize(domain:, type:) + # @param domain [String] Domain whose sitemap supplied the pages. + # + # @param type [Symbol, BrandDev::Models::CrawlControls::Source::UnionMember1::Type] + + # @see BrandDev::Models::CrawlControls::Source::UnionMember1#type + module Type + extend BrandDev::Internal::Type::Enum + + SITEMAP = :sitemap + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(BrandDev::Models::CrawlControls::Source::UnionMember0, BrandDev::Models::CrawlControls::Source::UnionMember1)] + end + end + end +end diff --git a/lib/brand_dev/models/failure.rb b/lib/brand_dev/models/failure.rb new file mode 100644 index 00000000..e70f881b --- /dev/null +++ b/lib/brand_dev/models/failure.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +module BrandDev + module Models + class Failure < BrandDev::Internal::Type::BaseModel + # @!attribute code + # Why the batch itself stopped. + # + # @return [String] + required :code, String + + # @!attribute message + # Human-readable explanation. + # + # @return [String] + required :message, String + + # @!method initialize(code:, message:) + # A failure of the batch as a whole, distinct from the per-page failures in + # `page_errors`. + # + # @param code [String] Why the batch itself stopped. + # + # @param message [String] Human-readable explanation. + end + end +end diff --git a/lib/brand_dev/models/intake.rb b/lib/brand_dev/models/intake.rb new file mode 100644 index 00000000..7d4546f4 --- /dev/null +++ b/lib/brand_dev/models/intake.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +module BrandDev + module Models + class Intake < BrandDev::Internal::Type::BaseModel + # @!attribute duplicates + # URLs dropped before reserving because another entry resolved to the same page. + # Non-zero for sitemap crawls too, whose sitemaps routinely list a page more than + # once. + # + # @return [Integer] + required :duplicates, Integer + + # @!attribute invalid + # URLs from your list rejected as unusable; the same ones are itemised in + # `invalid_urls` at submission. Null for a crawl — a crawl that resolves no usable + # page is rejected outright with a 400 rather than accepted with an empty list. + # + # @return [Integer, nil] + required :invalid, Integer, nil?: true + + # @!attribute reserved + # Pages credits were reserved for. Everything else — progress, the refund, the + # completion percentage — is measured against this. + # + # @return [Integer] + required :reserved, Integer + + # @!attribute reserved_is_ceiling + # Whether `reserved` is an upper bound the batch may finish under. True only for a + # crawl that follows links, whose reachable page count is unknowable until it + # runs. False for a scrape and for a sitemap crawl, where `reserved` is an exact + # page count. + # + # @return [Boolean] + required :reserved_is_ceiling, BrandDev::Internal::Type::Boolean + + # @!attribute submitted + # URLs in the list you sent, before validation and de-duplication. Null for a + # crawl, which is given a source rather than a list. + # + # @return [Integer, nil] + required :submitted, Integer, nil?: true + + # @!method initialize(duplicates:, invalid:, reserved:, reserved_is_ceiling:, submitted:) + # Some parameter documentations has been truncated, see {BrandDev::Models::Intake} + # for more details. + # + # What submission took in, and what it charged for. + # + # @param duplicates [Integer] URLs dropped before reserving because another entry resolved to the same page. N + # + # @param invalid [Integer, nil] URLs from your list rejected as unusable; the same ones are itemised in `invalid + # + # @param reserved [Integer] Pages credits were reserved for. Everything else — progress, the refund, the com + # + # @param reserved_is_ceiling [Boolean] Whether `reserved` is an upper bound the batch may finish under. True only for a + # + # @param submitted [Integer, nil] URLs in the list you sent, before validation and de-duplication. Null for a craw + end + end +end diff --git a/lib/brand_dev/models/page_error_count.rb b/lib/brand_dev/models/page_error_count.rb new file mode 100644 index 00000000..b8c996e7 --- /dev/null +++ b/lib/brand_dev/models/page_error_count.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module BrandDev + module Models + class PageErrorCount < BrandDev::Internal::Type::BaseModel + # @!attribute code + # Error code for these failures. + # + # @return [String] + required :code, String + + # @!attribute count + # Pages that failed with this code. + # + # @return [Integer] + required :count, Integer + + # @!method initialize(code:, count:) + # Page failures sharing one error code. + # + # @param code [String] Error code for these failures. + # + # @param count [Integer] Pages that failed with this code. + end + end +end diff --git a/lib/brand_dev/models/webhook_delivery.rb b/lib/brand_dev/models/webhook_delivery.rb new file mode 100644 index 00000000..23fe9e1d --- /dev/null +++ b/lib/brand_dev/models/webhook_delivery.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +module BrandDev + module Models + class WebhookDelivery < BrandDev::Internal::Type::BaseModel + # @!attribute attempted_at + # + # @return [Time] + required :attempted_at, Time + + # @!attribute error + # + # @return [BrandDev::Models::WebhookDelivery::Error, nil] + required :error, -> { BrandDev::WebhookDelivery::Error }, nil?: true + + # @!attribute event + # The event this delivery carried. Deliveries recorded before event selection + # existed report change.detected. + # + # @return [Symbol, BrandDev::Models::WebhookDelivery::Event] + required :event, enum: -> { BrandDev::WebhookDelivery::Event } + + # @!attribute event_id + # Identifier sent in the X-Context-Id header. + # + # @return [String] + required :event_id, String + + # @!attribute http_status + # The endpoint's final HTTP response status, or null when no response was + # received. + # + # @return [Integer, nil] + required :http_status, Integer, nil?: true + + # @!attribute status + # Delivery outcome. delivered means any 2xx response; rejected means a non-2xx + # response; failed means no HTTP response was received; skipped_unsafe_url means + # the URL failed the public-endpoint safety check. + # + # @return [Symbol, BrandDev::Models::WebhookDelivery::Status] + required :status, enum: -> { BrandDev::WebhookDelivery::Status } + + # @!method initialize(attempted_at:, error:, event:, event_id:, http_status:, status:) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::WebhookDelivery} for more details. + # + # @param attempted_at [Time] + # + # @param error [BrandDev::Models::WebhookDelivery::Error, nil] + # + # @param event [Symbol, BrandDev::Models::WebhookDelivery::Event] The event this delivery carried. Deliveries recorded before event selection exis + # + # @param event_id [String] Identifier sent in the X-Context-Id header. + # + # @param http_status [Integer, nil] The endpoint's final HTTP response status, or null when no response was received + # + # @param status [Symbol, BrandDev::Models::WebhookDelivery::Status] Delivery outcome. delivered means any 2xx response; rejected means a non-2xx res + + # @see BrandDev::Models::WebhookDelivery#error + class Error < BrandDev::Internal::Type::BaseModel + # @!attribute code + # + # @return [String] + required :code, String + + # @!attribute message + # + # @return [String] + required :message, String + + # @!method initialize(code:, message:) + # @param code [String] + # @param message [String] + end + + # The event this delivery carried. Deliveries recorded before event selection + # existed report change.detected. + # + # @see BrandDev::Models::WebhookDelivery#event + module Event + extend BrandDev::Internal::Type::Enum + + CHANGE_DETECTED = :"change.detected" + RUN_COMPLETED = :"run.completed" + + # @!method self.values + # @return [Array] + end + + # Delivery outcome. delivered means any 2xx response; rejected means a non-2xx + # response; failed means no HTTP response was received; skipped_unsafe_url means + # the URL failed the public-endpoint safety check. + # + # @see BrandDev::Models::WebhookDelivery#status + module Status + extend BrandDev::Internal::Type::Enum + + DELIVERED = :delivered + REJECTED = :rejected + FAILED = :failed + SKIPPED_UNSAFE_URL = :skipped_unsafe_url + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/brand_dev/resources/batch.rb b/lib/brand_dev/resources/batch.rb new file mode 100644 index 00000000..4bfa6ae9 --- /dev/null +++ b/lib/brand_dev/resources/batch.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module BrandDev + module Resources + class Batch + # @api private + # + # @param client [BrandDev::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/brand_dev/resources/brand.rb b/lib/brand_dev/resources/brand.rb index 34dfad51..9c07b1f3 100644 --- a/lib/brand_dev/resources/brand.rb +++ b/lib/brand_dev/resources/brand.rb @@ -9,13 +9,23 @@ class Brand # Retrieve logos, backdrops, colors, industry, description, and more from any # domain # - # @overload retrieve(domain:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {}) + # @overload retrieve(domain: nil, force_language: nil, max_age_ms: nil, max_speed: nil, name: nil, tags: nil, ticker: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {}) # # @param domain [String] Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). Cann # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. Works with + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveParams::ForceLanguage, nil] Language to force for the retrieved brand data. # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, + # + # @param name [String] Company name to retrieve brand data for (e.g., 'Apple Inc'). Cannot be used with + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param ticker [String] Stock ticker symbol to retrieve brand data for (e.g., 'AAPL'). Cannot be used wi + # + # @param ticker_exchange [Symbol, BrandDev::Models::BrandRetrieveParams::TickerExchange] Stock exchange code. # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # @@ -24,13 +34,13 @@ class Brand # @return [BrandDev::Models::BrandRetrieveResponse] # # @see BrandDev::Models::BrandRetrieveParams - def retrieve(params) + def retrieve(params = {}) parsed, options = BrandDev::BrandRetrieveParams.dump_request(params) query = BrandDev::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "brand/retrieve", - query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"), + query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"), model: BrandDev::Models::BrandRetrieveResponse, options: options ) @@ -39,15 +49,18 @@ def retrieve(params) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandAIProductParams} for more details. # - # Beta feature: Given a single URL, determines if it is a product detail page, - # classifies the platform/product type, and extracts the product information. - # Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites. + # Given a single URL, determines if it is a product page and extracts the product + # information. # - # @overload ai_product(url:, timeout_ms: nil, request_options: {}) + # @overload ai_product(url:, max_age_ms: nil, tags: nil, timeout_ms: nil, request_options: {}) # # @param url [String] The product page URL to extract product data from. # - # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 + # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y + # + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -65,9 +78,9 @@ def ai_product(params) ) end - # Beta feature: Extract product information from a brand's website. We will - # analyze the website and return a list of products with details such as name, - # description, image, pricing, features, and more. + # Extract product information from a brand's website. We will analyze the website + # and return a list of products with details such as name, description, image, + # pricing, features, and more. # # @overload ai_products(body:, request_options: {}) # @@ -95,7 +108,7 @@ def ai_products(params) # the website and extract the requested information based on the provided data # points. # - # @overload ai_query(data_to_extract:, domain:, specific_pages: nil, timeout_ms: nil, request_options: {}) + # @overload ai_query(data_to_extract:, domain:, specific_pages: nil, tags: nil, timeout_ms: nil, request_options: {}) # # @param data_to_extract [Array] Array of data points to extract from the website # @@ -103,6 +116,8 @@ def ai_products(params) # # @param specific_pages [BrandDev::Models::BrandAIQueryParams::SpecificPages] Optional object specifying which pages to analyze # + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] @@ -124,13 +139,19 @@ def ai_query(params) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandFontsParams} for more details. # - # Extract font information from a brand's website including font families, usage + # Scrape font information from a website including font families, usage # statistics, fallbacks, and element/word counts. # - # @overload fonts(domain:, timeout_ms: nil, request_options: {}) + # @overload fonts(direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, request_options: {}) + # + # @param direct_url [String] A specific URL to fetch fonts from directly, bypassing domain resolution (e.g., # # @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai # + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] @@ -138,13 +159,17 @@ def ai_query(params) # @return [BrandDev::Models::BrandFontsResponse] # # @see BrandDev::Models::BrandFontsParams - def fonts(params) + def fonts(params = {}) parsed, options = BrandDev::BrandFontsParams.dump_request(params) query = BrandDev::Internal::Util.encode_query_params(parsed) @client.request( method: :get, - path: "brand/fonts", - query: query.transform_keys(timeout_ms: "timeoutMS"), + path: "web/fonts", + query: query.transform_keys( + direct_url: "directUrl", + max_age_ms: "maxAgeMs", + timeout_ms: "timeoutMS" + ), model: BrandDev::Models::BrandFontsResponse, options: options ) @@ -156,23 +181,25 @@ def fonts(params) # Endpoint specially designed for platforms that want to identify transaction data # by the transaction title. # - # @overload identify_from_transaction(transaction_info:, city: nil, country_gl: nil, force_language: nil, high_confidence_only: nil, max_speed: nil, mcc: nil, phone: nil, timeout_ms: nil, request_options: {}) + # @overload identify_from_transaction(transaction_info:, city: nil, country_gl: nil, force_language: nil, high_confidence_only: nil, max_speed: nil, mcc: nil, phone: nil, tags: nil, timeout_ms: nil, request_options: {}) # # @param transaction_info [String] Transaction information to identify the brand # # @param city [String] Optional city name to prioritize when searching for the brand. # - # @param country_gl [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::CountryGl] Optional country code (GL parameter) to specify the country. This affects the ge + # @param country_gl [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::CountryGl] Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize searc # - # @param force_language [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::ForceLanguage, nil] Language to force for the retrieved brand data. # - # @param high_confidence_only [Boolean] When set to true, the API will perform an additional verification steps to ensur + # @param high_confidence_only [Boolean, Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::HighConfidenceOnly] When set to true, the API will perform an additional verification steps to ensur # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandIdentifyFromTransactionParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, # - # @param mcc [String] Optional Merchant Category Code (MCC) to help identify the business category/ind + # @param mcc [String, Float] Optional Merchant Category Code (MCC) to help identify the business category/ind # - # @param phone [Float] Optional phone number from the transaction to help verify brand match. + # @param phone [String, Float] Optional phone number from the transaction to help verify brand match. + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # @@ -197,14 +224,14 @@ def identify_from_transaction(params) # {BrandDev::Models::BrandPrefetchParams} for more details. # # Signal that you may fetch brand data for a particular domain soon to improve - # latency. This endpoint does not charge credits and is available for paid - # customers to optimize future requests. [You must be on a paid plan to use this - # endpoint] + # latency. # - # @overload prefetch(domain:, timeout_ms: nil, request_options: {}) + # @overload prefetch(domain:, tags: nil, timeout_ms: nil, request_options: {}) # # @param domain [String] Domain name to prefetch brand data for # + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] @@ -229,14 +256,14 @@ def prefetch(params) # Signal that you may fetch brand data for a particular domain soon to improve # latency. This endpoint accepts an email address, extracts the domain from it, # validates that it's not a disposable or free email provider, and queues the - # domain for prefetching. This endpoint does not charge credits and is available - # for paid customers to optimize future requests. [You must be on a paid plan to - # use this endpoint] + # domain for prefetching. # - # @overload prefetch_by_email(email:, timeout_ms: nil, request_options: {}) + # @overload prefetch_by_email(email:, tags: nil, timeout_ms: nil, request_options: {}) # # @param email [String] Email address to prefetch brand data for. The domain will be extracted from the # + # @param tags [Array] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] @@ -259,17 +286,20 @@ def prefetch_by_email(params) # {BrandDev::Models::BrandRetrieveByEmailParams} for more details. # # Retrieve brand information using an email address while detecting disposable and - # free email addresses. This endpoint extracts the domain from the email address - # and returns brand data for that domain. Disposable and free email addresses - # (like gmail.com, yahoo.com) will throw a 422 error. + # free email addresses. Disposable and free email addresses (like gmail.com, + # yahoo.com) will throw a 422 error. # - # @overload retrieve_by_email(email:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {}) + # @overload retrieve_by_email(email:, force_language: nil, max_age_ms: nil, max_speed: nil, tags: nil, timeout_ms: nil, request_options: {}) # # @param email [String] Email address to retrieve brand data for (e.g., 'contact@example.com'). The doma # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByEmailParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByEmailParams::ForceLanguage, nil] Language to force for the retrieved brand data. + # + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveByEmailParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # @@ -284,7 +314,7 @@ def retrieve_by_email(params) @client.request( method: :get, path: "brand/retrieve-by-email", - query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"), + query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"), model: BrandDev::Models::BrandRetrieveByEmailResponse, options: options ) @@ -294,16 +324,19 @@ def retrieve_by_email(params) # {BrandDev::Models::BrandRetrieveByIsinParams} for more details. # # Retrieve brand information using an ISIN (International Securities - # Identification Number). This endpoint looks up the company associated with the - # ISIN and returns its brand data. + # Identification Number). # - # @overload retrieve_by_isin(isin:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {}) + # @overload retrieve_by_isin(isin:, force_language: nil, max_age_ms: nil, max_speed: nil, tags: nil, timeout_ms: nil, request_options: {}) # # @param isin [String] ISIN (International Securities Identification Number) to retrieve brand data for # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByIsinParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByIsinParams::ForceLanguage, nil] Language to force for the retrieved brand data. + # + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveByIsinParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # @@ -318,7 +351,7 @@ def retrieve_by_isin(params) @client.request( method: :get, path: "brand/retrieve-by-isin", - query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"), + query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"), model: BrandDev::Models::BrandRetrieveByIsinResponse, options: options ) @@ -327,18 +360,21 @@ def retrieve_by_isin(params) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByNameParams} for more details. # - # Retrieve brand information using a company name. This endpoint searches for the - # company by name and returns its brand data. + # Retrieve brand information using a company name. # - # @overload retrieve_by_name(name:, country_gl: nil, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {}) + # @overload retrieve_by_name(name:, country_gl: nil, force_language: nil, max_age_ms: nil, max_speed: nil, tags: nil, timeout_ms: nil, request_options: {}) # # @param name [String] Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft Corporati # - # @param country_gl [Symbol, BrandDev::Models::BrandRetrieveByNameParams::CountryGl] Optional country code (GL parameter) to specify the country. This affects the ge + # @param country_gl [Symbol, BrandDev::Models::BrandRetrieveByNameParams::CountryGl] Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize searc # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByNameParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByNameParams::ForceLanguage, nil] Language to force for the retrieved brand data. # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveByNameParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # @@ -353,7 +389,7 @@ def retrieve_by_name(params) @client.request( method: :get, path: "brand/retrieve-by-name", - query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"), + query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"), model: BrandDev::Models::BrandRetrieveByNameResponse, options: options ) @@ -362,18 +398,21 @@ def retrieve_by_name(params) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveByTickerParams} for more details. # - # Retrieve brand information using a stock ticker symbol. This endpoint looks up - # the company associated with the ticker and returns its brand data. + # Retrieve brand information using a stock ticker symbol. # - # @overload retrieve_by_ticker(ticker:, force_language: nil, max_speed: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {}) + # @overload retrieve_by_ticker(ticker:, force_language: nil, max_age_ms: nil, max_speed: nil, tags: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {}) # # @param ticker [String] Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). # - # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data. + # @param force_language [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::ForceLanguage, nil] Language to force for the retrieved brand data. # - # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true, + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard # - # @param ticker_exchange [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::TickerExchange] Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. + # @param max_speed [Boolean, Symbol, BrandDev::Models::BrandRetrieveByTickerParams::MaxSpeed] Optional parameter to optimize the API call for maximum speed. When set to true, + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param ticker_exchange [Symbol, BrandDev::Models::BrandRetrieveByTickerParams::TickerExchange] Stock exchange code. # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # @@ -388,7 +427,7 @@ def retrieve_by_ticker(params) @client.request( method: :get, path: "brand/retrieve-by-ticker", - query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"), + query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"), model: BrandDev::Models::BrandRetrieveByTickerResponse, options: options ) @@ -397,16 +436,18 @@ def retrieve_by_ticker(params) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandRetrieveNaicsParams} for more details. # - # Endpoint to classify any brand into a 2022 NAICS code. + # Classify any brand into 2022 NAICS industry codes from its domain or name. # - # @overload retrieve_naics(input:, max_results: nil, min_results: nil, timeout_ms: nil, request_options: {}) + # @overload retrieve_naics(input:, max_results: nil, min_results: nil, tags: nil, timeout_ms: nil, request_options: {}) # - # @param input [String] Brand domain or title to retrieve NAICS code for. If a valid domain is provided + # @param input [String] Brand domain or title to retrieve NAICS code for. If a valid domain is provided, # # @param max_results [Integer] Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults to 5 # # @param min_results [Integer] Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1. # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] @@ -419,7 +460,7 @@ def retrieve_naics(params) query = BrandDev::Internal::Util.encode_query_params(parsed) @client.request( method: :get, - path: "brand/naics", + path: "web/naics", query: query.transform_keys( max_results: "maxResults", min_results: "minResults", @@ -434,13 +475,19 @@ def retrieve_naics(params) # {BrandDev::Models::BrandRetrieveSimplifiedParams} for more details. # # Returns a simplified version of brand data containing only essential - # information: domain, title, colors, logos, and backdrops. This endpoint is - # optimized for faster responses and reduced data transfer. + # information: domain, title, colors, logos, and backdrops. Optimized for faster + # responses and reduced data transfer. # - # @overload retrieve_simplified(domain:, timeout_ms: nil, request_options: {}) + # @overload retrieve_simplified(domain:, max_age_ms: nil, tags: nil, theme: nil, timeout_ms: nil, request_options: {}) # # @param domain [String] Domain name to retrieve simplified brand data for # + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param theme [Symbol, BrandDev::Models::BrandRetrieveSimplifiedParams::Theme] Optional theme preference used when selecting brand assets. + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] @@ -454,7 +501,7 @@ def retrieve_simplified(params) @client.request( method: :get, path: "brand/retrieve-simplified", - query: query.transform_keys(timeout_ms: "timeoutMS"), + query: query.transform_keys(max_age_ms: "maxAgeMs", timeout_ms: "timeoutMS"), model: BrandDev::Models::BrandRetrieveSimplifiedResponse, options: options ) @@ -463,33 +510,59 @@ def retrieve_simplified(params) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandScreenshotParams} for more details. # - # Capture a screenshot of a website. Supports both viewport (standard browser - # view) and full-page screenshots. Can also screenshot specific page types (login, - # pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to - # the uploaded screenshot image hosted on our CDN. + # Capture a screenshot of a website. # - # @overload screenshot(domain:, full_screenshot: nil, page: nil, prioritize: nil, request_options: {}) + # @overload screenshot(color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, tags: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, zdr: nil, request_options: {}) + # + # @param color_scheme [Symbol, BrandDev::Models::BrandScreenshotParams::ColorScheme] Optional parameter to choose the site's visual theme in the screenshot. Use 'lig + # + # @param country [Symbol, BrandDev::Models::BrandScreenshotParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al + # + # @param direct_url [String] A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https # # @param domain [String] Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The domai # # @param full_screenshot [Symbol, BrandDev::Models::BrandScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc # + # @param handle_cookie_popup [Boolean, Symbol, BrandDev::Models::BrandScreenshotParams::HandleCookiePopup] Optional parameter to control cookie/consent popup handling. If 'true', we dismi + # + # @param max_age_ms [Integer, nil] Return a cached screenshot if a prior screenshot for the same parameters exists + # # @param page [Symbol, BrandDev::Models::BrandScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy # - # @param prioritize [Symbol, BrandDev::Models::BrandScreenshotParams::Prioritize] Optional parameter to prioritize screenshot capture. If 'speed', optimizes for f + # @param scroll_offset [Integer, nil] Optional vertical scroll offset in pixels for capturing a long page in viewport- + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th + # + # @param viewport [BrandDev::Models::BrandScreenshotParams::Viewport] Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080. + # + # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load before taking + # + # @param zdr [Symbol, BrandDev::Models::BrandScreenshotParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [BrandDev::Models::BrandScreenshotResponse] # # @see BrandDev::Models::BrandScreenshotParams - def screenshot(params) + def screenshot(params = {}) parsed, options = BrandDev::BrandScreenshotParams.dump_request(params) query = BrandDev::Internal::Util.encode_query_params(parsed) @client.request( method: :get, - path: "brand/screenshot", - query: query.transform_keys(full_screenshot: "fullScreenshot"), + path: "web/screenshot", + query: query.transform_keys( + color_scheme: "colorScheme", + direct_url: "directUrl", + full_screenshot: "fullScreenshot", + handle_cookie_popup: "handleCookiePopup", + max_age_ms: "maxAgeMs", + scroll_offset: "scrollOffset", + timeout_ms: "timeoutMS", + wait_for_ms: "waitForMs" + ), model: BrandDev::Models::BrandScreenshotResponse, options: options ) @@ -498,17 +571,21 @@ def screenshot(params) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandStyleguideParams} for more details. # - # Automatically extract comprehensive design system information from a brand's - # website including colors, typography, spacing, shadows, and UI components. - # Either 'domain' or 'directUrl' must be provided as a query parameter, but not - # both. + # Extract a comprehensive design system from a website including colors, + # typography, spacing, shadows, and UI components. + # + # @overload styleguide(color_scheme: nil, direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, request_options: {}) # - # @overload styleguide(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {}) + # @param color_scheme [Symbol, BrandDev::Models::BrandStyleguideParams::ColorScheme] Optional browser color scheme to emulate for websites that respond to prefers-co # # @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio # # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # + # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] @@ -521,19 +598,56 @@ def styleguide(params = {}) query = BrandDev::Internal::Util.encode_query_params(parsed) @client.request( method: :get, - path: "brand/styleguide", - query: query.transform_keys(direct_url: "directUrl", timeout_ms: "timeoutMS"), + path: "web/styleguide", + query: query.transform_keys( + color_scheme: "colorScheme", + direct_url: "directUrl", + max_age_ms: "maxAgeMs", + timeout_ms: "timeoutMS" + ), model: BrandDev::Models::BrandStyleguideResponse, options: options ) end - # Scrapes the given URL and returns the raw HTML content of the page. + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeHTMLParams} for more details. + # + # Scrapes the given URL and returns the raw HTML content of the page. The base + # request costs 1 credit; requests with browser actions cost 2 credits. # - # @overload web_scrape_html(url:, request_options: {}) + # @overload web_scrape_html(url:, actions: nil, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, tags: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, zdr: nil, request_options: {}) # # @param url [String] Full URL to scrape (must include http:// or https:// protocol) # + # @param actions [Array, nil] Optional browser actions executed in array order after the page loads and before + # + # @param country [Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al + # + # @param exclude_selectors [Array, nil] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi + # + # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob + # + # @param include_frames [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::IncludeFrames] When true, iframes are rendered inline into the returned HTML. + # + # @param include_selectors [Array, nil] CSS selectors. When provided, only matching subtrees (and their descendants) are + # + # @param max_age_ms [Integer, nil] Return a cached result if a prior scrape for the same parameters exists and is y + # + # @param pdf [BrandDev::Models::BrandWebScrapeHTMLParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image + # + # @param settle_animations [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::SettleAnimations] When true, waits briefly for CSS and transition animations to settle before extr + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th + # + # @param use_main_content_only [Boolean, Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::UseMainContentOnly] When true, return only the page's main content in the HTML response, excluding h + # + # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load. Min: 0. Max: + # + # @param zdr [Symbol, BrandDev::Models::BrandWebScrapeHTMLParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro + # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [BrandDev::Models::BrandWebScrapeHTMLResponse] @@ -545,19 +659,49 @@ def web_scrape_html(params) @client.request( method: :get, path: "web/scrape/html", - query: query, + query: query.transform_keys( + exclude_selectors: "excludeSelectors", + include_frames: "includeFrames", + include_selectors: "includeSelectors", + max_age_ms: "maxAgeMs", + settle_animations: "settleAnimations", + timeout_ms: "timeoutMS", + use_main_content_only: "useMainContentOnly", + wait_for_ms: "waitForMs" + ), model: BrandDev::Models::BrandWebScrapeHTMLResponse, options: options ) end - # Scrapes all images from the given URL. Extracts images from img, svg, - # picture/source, link, and video elements including inline SVGs, base64 data - # URIs, and standard URLs. + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandWebScrapeImagesParams} for more details. + # + # Extract image assets from a web page, including standard URLs, inline SVGs, data + # URIs, responsive image sources, metadata, CSS backgrounds, video posters, and + # embeds. The base request costs 1 credit, or 2 credits with browser actions. When + # enrichment is enabled, the entire call costs 5 credits, including requests that + # also use actions. + # + # @overload web_scrape_images(url:, actions: nil, dedupe: nil, enrichment: nil, headers: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {}) + # + # @param url [String] Page URL to inspect. Must include http:// or https://. # - # @overload web_scrape_images(url:, request_options: {}) + # @param actions [Array, nil] Optional browser actions executed in array order after the page loads and before + # + # @param dedupe [Boolean, Symbol, BrandDev::Models::BrandWebScrapeImagesParams::Dedupe] When true, visually duplicate images are removed: every image is loaded and perc + # + # @param enrichment [BrandDev::Models::BrandWebScrapeImagesParams::Enrichment, nil] Optional per-image processing, sent as deep-object query params such as enrichme + # + # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob + # + # @param max_age_ms [Integer, nil] Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # - # @param url [String] Full URL to scrape images from (must include http:// or https:// protocol) + # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load before collec # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -570,7 +714,11 @@ def web_scrape_images(params) @client.request( method: :get, path: "web/scrape/images", - query: query, + query: query.transform_keys( + max_age_ms: "maxAgeMs", + timeout_ms: "timeoutMS", + wait_for_ms: "waitForMs" + ), model: BrandDev::Models::BrandWebScrapeImagesResponse, options: options ) @@ -579,20 +727,60 @@ def web_scrape_images(params) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandWebScrapeMdParams} for more details. # - # Scrapes the given URL, converts the HTML content to Markdown, and returns the - # result. + # Scrapes the given URL into LLM usable Markdown. Inspect key_metadata on JSON + # responses from a recognized API key; use error_code to distinguish stable + # failure categories. + # + # ### Billing & errors + # + # | HTTP status | Billed? | Meaning | + # | ----------- | ----------------------------------------- | ---------------------------------------------------------------------------------------- | + # | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing | + # | 400 | No | Invalid input, skipped PDF, or the page could not be scraped | + # | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code | + # | 404 | No | Target page returned or fingerprinted as not found | + # | 408 | No | Request timed out | + # | 415 | No | Unsupported content type | + # | 429 | No | Per-minute rate limit exceeded; honor Retry-After | + # | 500 | No | Internal error | + # + # @overload web_scrape_md(url:, actions: nil, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, shorten_base64_images: nil, tags: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, zdr: nil, request_options: {}) + # + # @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr + # + # @param actions [Array, nil] Optional browser actions executed in array order after the page loads and before # - # @overload web_scrape_md(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {}) + # @param country [Symbol, BrandDev::Models::BrandWebScrapeMdParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al # - # @param url [String] Full URL to scrape and convert to markdown (must include http:// or https:// pro + # @param exclude_selectors [Array, nil] CSS selectors to remove before conversion to Markdown. Applied after includeSele # - # @param include_images [Boolean] Include image references in Markdown output + # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob # - # @param include_links [Boolean] Preserve hyperlinks in Markdown output + # @param include_frames [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::IncludeFrames] When true, the contents of iframes are rendered to Markdown. # - # @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output + # @param include_images [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::IncludeImages] Include image references in Markdown output # - # @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars, + # @param include_links [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::IncludeLinks] Preserve hyperlinks in Markdown output + # + # @param include_selectors [Array, nil] CSS selectors. When provided, only matching HTML subtrees (and their descendants + # + # @param max_age_ms [Integer, nil] Return a cached result if a prior scrape for the same parameters exists and is y + # + # @param pdf [BrandDev::Models::BrandWebScrapeMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image + # + # @param settle_animations [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::SettleAnimations] When true, waits briefly for CSS and transition animations to settle before conv + # + # @param shorten_base64_images [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::ShortenBase64Images] Shorten base64-encoded image data in the Markdown output + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th + # + # @param use_main_content_only [Boolean, Symbol, BrandDev::Models::BrandWebScrapeMdParams::UseMainContentOnly] Extract only the main content of the page, excluding headers, footers, sidebars, + # + # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load before conver + # + # @param zdr [Symbol, BrandDev::Models::BrandWebScrapeMdParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -606,10 +794,17 @@ def web_scrape_md(params) method: :get, path: "web/scrape/markdown", query: query.transform_keys( + exclude_selectors: "excludeSelectors", + include_frames: "includeFrames", include_images: "includeImages", include_links: "includeLinks", + include_selectors: "includeSelectors", + max_age_ms: "maxAgeMs", + settle_animations: "settleAnimations", shorten_base64_images: "shortenBase64Images", - use_main_content_only: "useMainContentOnly" + timeout_ms: "timeoutMS", + use_main_content_only: "useMainContentOnly", + wait_for_ms: "waitForMs" ), model: BrandDev::Models::BrandWebScrapeMdResponse, options: options @@ -619,16 +814,26 @@ def web_scrape_md(params) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandWebScrapeSitemapParams} for more details. # - # Crawls the sitemap of the given domain and returns all discovered page URLs. - # Supports sitemap index files (recursive), parallel fetching with concurrency - # control, deduplication, and filters out non-page resources (images, PDFs, etc.). + # Crawl an entire website's sitemap and return all discovered page URLs. # - # @overload web_scrape_sitemap(domain:, max_links: nil, request_options: {}) + # @overload web_scrape_sitemap(domain:, headers: nil, max_links: nil, sitemap_url: nil, tags: nil, timeout_ms: nil, url_regex: nil, zdr: nil, request_options: {}) # - # @param domain [String] Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be auto + # @param domain [String] Domain to build a sitemap for + # + # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob # # @param max_links [Integer] Maximum number of links to return from the sitemap crawl. Defaults to 10,000. Mi # + # @param sitemap_url [String] Optional explicit sitemap URL. When provided, exactly this sitemap is crawled in + # + # @param tags [Array] Optional comma-separated caller-defined tags for tracking this request. Tags are + # + # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th + # + # @param url_regex [String] Optional RE2-compatible regex pattern. Only URLs matching this pattern are retur + # + # @param zdr [Symbol, BrandDev::Models::BrandWebScrapeSitemapParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro + # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [BrandDev::Models::BrandWebScrapeSitemapResponse] @@ -640,7 +845,12 @@ def web_scrape_sitemap(params) @client.request( method: :get, path: "web/scrape/sitemap", - query: query.transform_keys(max_links: "maxLinks"), + query: query.transform_keys( + max_links: "maxLinks", + sitemap_url: "sitemapUrl", + timeout_ms: "timeoutMS", + url_regex: "urlRegex" + ), model: BrandDev::Models::BrandWebScrapeSitemapResponse, options: options ) diff --git a/lib/brand_dev/resources/monitors.rb b/lib/brand_dev/resources/monitors.rb new file mode 100644 index 00000000..38d059cc --- /dev/null +++ b/lib/brand_dev/resources/monitors.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module BrandDev + module Resources + class Monitors + # @api private + # + # @param client [BrandDev::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/brand_dev/version.rb b/lib/brand_dev/version.rb index d4aea6c0..ff350c42 100644 --- a/lib/brand_dev/version.rb +++ b/lib/brand_dev/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module BrandDev - VERSION = "1.2.0" + VERSION = "1.3.0" end diff --git a/rbi/brand_dev/client.rbi b/rbi/brand_dev/client.rbi index 1f769282..2779dc3d 100644 --- a/rbi/brand_dev/client.rbi +++ b/rbi/brand_dev/client.rbi @@ -16,6 +16,12 @@ module BrandDev sig { returns(BrandDev::Resources::Brand) } attr_reader :brand + sig { returns(BrandDev::Resources::Monitors) } + attr_reader :monitors + + sig { returns(BrandDev::Resources::Batch) } + attr_reader :batch + # @api private sig { override.returns(T::Hash[String, String]) } private def auth_headers diff --git a/rbi/brand_dev/models.rbi b/rbi/brand_dev/models.rbi index d7c026f7..d752ea43 100644 --- a/rbi/brand_dev/models.rbi +++ b/rbi/brand_dev/models.rbi @@ -42,4 +42,14 @@ module BrandDev BrandWebScrapeMdParams = BrandDev::Models::BrandWebScrapeMdParams BrandWebScrapeSitemapParams = BrandDev::Models::BrandWebScrapeSitemapParams + + CrawlControls = BrandDev::Models::CrawlControls + + Failure = BrandDev::Models::Failure + + Intake = BrandDev::Models::Intake + + PageErrorCount = BrandDev::Models::PageErrorCount + + WebhookDelivery = BrandDev::Models::WebhookDelivery end diff --git a/rbi/brand_dev/models/brand_ai_product_params.rbi b/rbi/brand_dev/models/brand_ai_product_params.rbi index 509b1184..7e1a0d4f 100644 --- a/rbi/brand_dev/models/brand_ai_product_params.rbi +++ b/rbi/brand_dev/models/brand_ai_product_params.rbi @@ -15,8 +15,25 @@ module BrandDev sig { returns(String) } attr_accessor :url - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + sig { returns(T.nilable(Integer)) } + attr_reader :max_age_ms + + sig { params(max_age_ms: Integer).void } + attr_writer :max_age_ms + + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). sig { returns(T.nilable(Integer)) } attr_reader :timeout_ms @@ -26,6 +43,8 @@ module BrandDev sig do params( url: String, + max_age_ms: Integer, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -33,8 +52,15 @@ module BrandDev def self.new( # The product page URL to extract product data from. url:, - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). timeout_ms: nil, request_options: {} ) @@ -44,6 +70,8 @@ module BrandDev override.returns( { url: String, + max_age_ms: Integer, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/rbi/brand_dev/models/brand_ai_product_response.rbi b/rbi/brand_dev/models/brand_ai_product_response.rbi index 4eadc377..dbab0fdf 100644 --- a/rbi/brand_dev/models/brand_ai_product_response.rbi +++ b/rbi/brand_dev/models/brand_ai_product_response.rbi @@ -18,6 +18,23 @@ module BrandDev sig { params(is_product_page: T::Boolean).void } attr_writer :is_product_page + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandAIProductResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandAIProductResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # The detected ecommerce platform, or null if not a product page sig do returns( @@ -45,6 +62,8 @@ module BrandDev sig do params( is_product_page: T::Boolean, + key_metadata: + BrandDev::Models::BrandAIProductResponse::KeyMetadata::OrHash, platform: T.nilable( BrandDev::Models::BrandAIProductResponse::Platform::OrSymbol @@ -56,6 +75,9 @@ module BrandDev def self.new( # Whether the given URL is a product detail page is_product_page: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # The detected ecommerce platform, or null if not a product page platform: nil, # The extracted product data, or null if not a product page @@ -67,6 +89,7 @@ module BrandDev override.returns( { is_product_page: T::Boolean, + key_metadata: BrandDev::Models::BrandAIProductResponse::KeyMetadata, platform: T.nilable( BrandDev::Models::BrandAIProductResponse::Platform::TaggedSymbol @@ -79,6 +102,47 @@ module BrandDev def to_hash end + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandAIProductResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end + # The detected ecommerce platform, or null if not a product page module Platform extend BrandDev::Internal::Type::Enum @@ -146,6 +210,10 @@ module BrandDev sig { returns(String) } attr_accessor :name + # Stock Keeping Unit (product identifier). Null if no identifier is found. + sig { returns(T.nilable(String)) } + attr_accessor :sku + # Tags associated with the product sig { returns(T::Array[String]) } attr_accessor :tags @@ -201,6 +269,7 @@ module BrandDev features: T::Array[String], images: T::Array[String], name: String, + sku: T.nilable(String), tags: T::Array[String], target_audience: T::Array[String], billing_frequency: @@ -227,6 +296,8 @@ module BrandDev images:, # Name of the product name:, + # Stock Keeping Unit (product identifier). Null if no identifier is found. + sku:, # Tags associated with the product tags:, # Target audience for the product (array of strings) @@ -255,6 +326,7 @@ module BrandDev features: T::Array[String], images: T::Array[String], name: String, + sku: T.nilable(String), tags: T::Array[String], target_audience: T::Array[String], billing_frequency: diff --git a/rbi/brand_dev/models/brand_ai_products_params.rbi b/rbi/brand_dev/models/brand_ai_products_params.rbi index b4d5d75a..5541fa51 100644 --- a/rbi/brand_dev/models/brand_ai_products_params.rbi +++ b/rbi/brand_dev/models/brand_ai_products_params.rbi @@ -73,6 +73,15 @@ module BrandDev sig { returns(String) } attr_accessor :domain + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + sig { returns(T.nilable(Integer)) } + attr_reader :max_age_ms + + sig { params(max_age_ms: Integer).void } + attr_writer :max_age_ms + # Maximum number of products to extract. sig { returns(T.nilable(Integer)) } attr_reader :max_products @@ -80,8 +89,16 @@ module BrandDev sig { params(max_products: Integer).void } attr_writer :max_products - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). sig { returns(T.nilable(Integer)) } attr_reader :timeout_ms @@ -91,24 +108,39 @@ module BrandDev sig do params( domain: String, + max_age_ms: Integer, max_products: Integer, + tags: T::Array[String], timeout_ms: Integer ).returns(T.attached_class) end def self.new( # The domain name to analyze. domain:, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, # Maximum number of products to extract. max_products: nil, - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). timeout_ms: nil ) end sig do override.returns( - { domain: String, max_products: Integer, timeout_ms: Integer } + { + domain: String, + max_age_ms: Integer, + max_products: Integer, + tags: T::Array[String], + timeout_ms: Integer + } ) end def to_hash @@ -129,6 +161,15 @@ module BrandDev sig { returns(String) } attr_accessor :direct_url + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + sig { returns(T.nilable(Integer)) } + attr_reader :max_age_ms + + sig { params(max_age_ms: Integer).void } + attr_writer :max_age_ms + # Maximum number of products to extract. sig { returns(T.nilable(Integer)) } attr_reader :max_products @@ -136,8 +177,16 @@ module BrandDev sig { params(max_products: Integer).void } attr_writer :max_products - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). sig { returns(T.nilable(Integer)) } attr_reader :timeout_ms @@ -147,7 +196,9 @@ module BrandDev sig do params( direct_url: String, + max_age_ms: Integer, max_products: Integer, + tags: T::Array[String], timeout_ms: Integer ).returns(T.attached_class) end @@ -155,17 +206,30 @@ module BrandDev # A specific URL to use directly as the starting point for extraction without # domain resolution. direct_url:, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, # Maximum number of products to extract. max_products: nil, - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). timeout_ms: nil ) end sig do override.returns( - { direct_url: String, max_products: Integer, timeout_ms: Integer } + { + direct_url: String, + max_age_ms: Integer, + max_products: Integer, + tags: T::Array[String], + timeout_ms: Integer + } ) end def to_hash diff --git a/rbi/brand_dev/models/brand_ai_products_response.rbi b/rbi/brand_dev/models/brand_ai_products_response.rbi index 1aa1dfca..97f60e3c 100644 --- a/rbi/brand_dev/models/brand_ai_products_response.rbi +++ b/rbi/brand_dev/models/brand_ai_products_response.rbi @@ -11,6 +11,23 @@ module BrandDev ) end + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandAIProductsResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandAIProductsResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Array of products extracted from the website sig do returns( @@ -31,11 +48,16 @@ module BrandDev sig do params( + key_metadata: + BrandDev::Models::BrandAIProductsResponse::KeyMetadata::OrHash, products: T::Array[BrandDev::Models::BrandAIProductsResponse::Product::OrHash] ).returns(T.attached_class) end def self.new( + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Array of products extracted from the website products: nil ) @@ -44,6 +66,8 @@ module BrandDev sig do override.returns( { + key_metadata: + BrandDev::Models::BrandAIProductsResponse::KeyMetadata, products: T::Array[BrandDev::Models::BrandAIProductsResponse::Product] } @@ -52,6 +76,47 @@ module BrandDev def to_hash end + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandAIProductsResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end + class Product < BrandDev::Internal::Type::BaseModel OrHash = T.type_alias do @@ -77,6 +142,10 @@ module BrandDev sig { returns(String) } attr_accessor :name + # Stock Keeping Unit (product identifier). Null if no identifier is found. + sig { returns(T.nilable(String)) } + attr_accessor :sku + # Tags associated with the product sig { returns(T::Array[String]) } attr_accessor :tags @@ -131,6 +200,7 @@ module BrandDev features: T::Array[String], images: T::Array[String], name: String, + sku: T.nilable(String), tags: T::Array[String], target_audience: T::Array[String], billing_frequency: @@ -157,6 +227,8 @@ module BrandDev images:, # Name of the product name:, + # Stock Keeping Unit (product identifier). Null if no identifier is found. + sku:, # Tags associated with the product tags:, # Target audience for the product (array of strings) @@ -185,6 +257,7 @@ module BrandDev features: T::Array[String], images: T::Array[String], name: String, + sku: T.nilable(String), tags: T::Array[String], target_audience: T::Array[String], billing_frequency: diff --git a/rbi/brand_dev/models/brand_ai_query_params.rbi b/rbi/brand_dev/models/brand_ai_query_params.rbi index 957893ad..2b7f7fb1 100644 --- a/rbi/brand_dev/models/brand_ai_query_params.rbi +++ b/rbi/brand_dev/models/brand_ai_query_params.rbi @@ -30,6 +30,13 @@ module BrandDev end attr_writer :specific_pages + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -45,6 +52,7 @@ module BrandDev T::Array[BrandDev::BrandAIQueryParams::DataToExtract::OrHash], domain: String, specific_pages: BrandDev::BrandAIQueryParams::SpecificPages::OrHash, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -56,6 +64,8 @@ module BrandDev domain:, # Optional object specifying which pages to analyze specific_pages: nil, + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -71,6 +81,7 @@ module BrandDev T::Array[BrandDev::BrandAIQueryParams::DataToExtract], domain: String, specific_pages: BrandDev::BrandAIQueryParams::SpecificPages, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/rbi/brand_dev/models/brand_ai_query_response.rbi b/rbi/brand_dev/models/brand_ai_query_response.rbi index d7bc1c19..76363dd4 100644 --- a/rbi/brand_dev/models/brand_ai_query_response.rbi +++ b/rbi/brand_dev/models/brand_ai_query_response.rbi @@ -38,6 +38,21 @@ module BrandDev sig { params(domain: String).void } attr_writer :domain + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns(T.nilable(BrandDev::Models::BrandAIQueryResponse::KeyMetadata)) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandAIQueryResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -59,6 +74,8 @@ module BrandDev BrandDev::Models::BrandAIQueryResponse::DataExtracted::OrHash ], domain: String, + key_metadata: + BrandDev::Models::BrandAIQueryResponse::KeyMetadata::OrHash, status: String, urls_analyzed: T::Array[String] ).returns(T.attached_class) @@ -68,6 +85,9 @@ module BrandDev data_extracted: nil, # The domain that was analyzed domain: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil, # List of URLs that were analyzed @@ -81,6 +101,7 @@ module BrandDev data_extracted: T::Array[BrandDev::Models::BrandAIQueryResponse::DataExtracted], domain: String, + key_metadata: BrandDev::Models::BrandAIQueryResponse::KeyMetadata, status: String, urls_analyzed: T::Array[String] } @@ -200,6 +221,47 @@ module BrandDev ) end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandAIQueryResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_fonts_params.rbi b/rbi/brand_dev/models/brand_fonts_params.rbi index 19b92371..f822dc1e 100644 --- a/rbi/brand_dev/models/brand_fonts_params.rbi +++ b/rbi/brand_dev/models/brand_fonts_params.rbi @@ -11,10 +11,39 @@ module BrandDev T.any(BrandDev::BrandFontsParams, BrandDev::Internal::AnyHash) end + # A specific URL to fetch fonts from directly, bypassing domain resolution (e.g., + # 'https://example.com/design-system'). When provided, fonts are extracted from + # this exact URL. You must provide either 'domain' or 'directUrl', but not both. + sig { returns(T.nilable(String)) } + attr_reader :direct_url + + sig { params(direct_url: String).void } + attr_writer :direct_url + # Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. - sig { returns(String) } - attr_accessor :domain + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. + sig { returns(T.nilable(String)) } + attr_reader :domain + + sig { params(domain: String).void } + attr_writer :domain + + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms + + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -27,15 +56,32 @@ module BrandDev sig do params( + direct_url: String, domain: String, + max_age_ms: T.nilable(Integer), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # A specific URL to fetch fonts from directly, bypassing domain resolution (e.g., + # 'https://example.com/design-system'). When provided, fonts are extracted from + # this exact URL. You must provide either 'domain' or 'directUrl', but not both. + direct_url: nil, # Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. - domain:, + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. + domain: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -47,7 +93,10 @@ module BrandDev sig do override.returns( { + direct_url: String, domain: String, + max_age_ms: T.nilable(Integer), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/rbi/brand_dev/models/brand_fonts_response.rbi b/rbi/brand_dev/models/brand_fonts_response.rbi index 8bc3b372..e17aafb4 100644 --- a/rbi/brand_dev/models/brand_fonts_response.rbi +++ b/rbi/brand_dev/models/brand_fonts_response.rbi @@ -27,12 +27,57 @@ module BrandDev sig { returns(String) } attr_accessor :status + # Font assets keyed by family name as it appears in the fonts array (non-generic + # names only). Clients match entries in fonts to pick a file URL from files. + # Omitted when no families resolve to Google or custom @font-face URLs. + sig do + returns( + T.nilable( + T::Hash[Symbol, BrandDev::Models::BrandFontsResponse::FontLink] + ) + ) + end + attr_reader :font_links + + sig do + params( + font_links: + T::Hash[ + Symbol, + BrandDev::Models::BrandFontsResponse::FontLink::OrHash + ] + ).void + end + attr_writer :font_links + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns(T.nilable(BrandDev::Models::BrandFontsResponse::KeyMetadata)) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandFontsResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + sig do params( code: Integer, domain: String, fonts: T::Array[BrandDev::Models::BrandFontsResponse::Font::OrHash], - status: String + status: String, + font_links: + T::Hash[ + Symbol, + BrandDev::Models::BrandFontsResponse::FontLink::OrHash + ], + key_metadata: + BrandDev::Models::BrandFontsResponse::KeyMetadata::OrHash ).returns(T.attached_class) end def self.new( @@ -43,7 +88,14 @@ module BrandDev # Array of font usage information fonts:, # Status of the response, e.g., 'ok' - status: + status:, + # Font assets keyed by family name as it appears in the fonts array (non-generic + # names only). Clients match entries in fonts to pick a file URL from files. + # Omitted when no families resolve to Google or custom @font-face URLs. + font_links: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil ) end @@ -53,7 +105,10 @@ module BrandDev code: Integer, domain: String, fonts: T::Array[BrandDev::Models::BrandFontsResponse::Font], - status: String + status: String, + font_links: + T::Hash[Symbol, BrandDev::Models::BrandFontsResponse::FontLink], + key_metadata: BrandDev::Models::BrandFontsResponse::KeyMetadata } ) end @@ -142,6 +197,158 @@ module BrandDev def to_hash end end + + class FontLink < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandFontsResponse::FontLink, + BrandDev::Internal::AnyHash + ) + end + + # Upright font files keyed by weight string (e.g. "400" for regular, "500", + # "700"). Values are absolute URLs. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :files + + sig do + returns( + BrandDev::Models::BrandFontsResponse::FontLink::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Google Fonts category when type is google (e.g. sans-serif, serif, monospace, + # display, handwriting). Omitted for custom fonts when unknown. + sig { returns(T.nilable(String)) } + attr_reader :category + + sig { params(category: String).void } + attr_writer :category + + # Present when type is custom: human-readable name derived from the fontLinks key + # (strip build/hash suffixes, split camelCase / PascalCase, normalize separators). + # Google entries omit this. + sig { returns(T.nilable(String)) } + attr_reader :display_name + + sig { params(display_name: String).void } + attr_writer :display_name + + sig do + params( + files: T::Hash[Symbol, String], + type: + BrandDev::Models::BrandFontsResponse::FontLink::Type::OrSymbol, + category: String, + display_name: String + ).returns(T.attached_class) + end + def self.new( + # Upright font files keyed by weight string (e.g. "400" for regular, "500", + # "700"). Values are absolute URLs. + files:, + type:, + # Google Fonts category when type is google (e.g. sans-serif, serif, monospace, + # display, handwriting). Omitted for custom fonts when unknown. + category: nil, + # Present when type is custom: human-readable name derived from the fontLinks key + # (strip build/hash suffixes, split camelCase / PascalCase, normalize separators). + # Google entries omit this. + display_name: nil + ) + end + + sig do + override.returns( + { + files: T::Hash[Symbol, String], + type: + BrandDev::Models::BrandFontsResponse::FontLink::Type::TaggedSymbol, + category: String, + display_name: String + } + ) + end + def to_hash + end + + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandFontsResponse::FontLink::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + GOOGLE = + T.let( + :google, + BrandDev::Models::BrandFontsResponse::FontLink::Type::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + BrandDev::Models::BrandFontsResponse::FontLink::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandFontsResponse::FontLink::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandFontsResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_identify_from_transaction_params.rbi b/rbi/brand_dev/models/brand_identify_from_transaction_params.rbi index 16305a91..516c2dd0 100644 --- a/rbi/brand_dev/models/brand_identify_from_transaction_params.rbi +++ b/rbi/brand_dev/models/brand_identify_from_transaction_params.rbi @@ -25,8 +25,8 @@ module BrandDev sig { params(city: String).void } attr_writer :city - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. sig do returns( T.nilable( @@ -44,7 +44,7 @@ module BrandDev end attr_writer :country_gl - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. sig do returns( T.nilable( @@ -52,49 +52,101 @@ module BrandDev ) ) end - attr_reader :force_language - - sig do - params( - force_language: - BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::OrSymbol - ).void - end - attr_writer :force_language + attr_accessor :force_language # When set to true, the API will perform an additional verification steps to # ensure the identified brand matches the transaction with high confidence. - # Defaults to false. - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::OrSymbol + ) + ) + ) + end attr_reader :high_confidence_only - sig { params(high_confidence_only: T::Boolean).void } + sig do + params( + high_confidence_only: + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::OrSymbol + ) + ).void + end attr_writer :high_confidence_only # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::OrSymbol + ) + ) + ) + end attr_reader :max_speed - sig { params(max_speed: T::Boolean).void } + sig do + params( + max_speed: + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::OrSymbol + ) + ).void + end attr_writer :max_speed # Optional Merchant Category Code (MCC) to help identify the business # category/industry. - sig { returns(T.nilable(String)) } + sig do + returns( + T.nilable(BrandDev::BrandIdentifyFromTransactionParams::Mcc::Variants) + ) + end attr_reader :mcc - sig { params(mcc: String).void } + sig do + params( + mcc: BrandDev::BrandIdentifyFromTransactionParams::Mcc::Variants + ).void + end attr_writer :mcc # Optional phone number from the transaction to help verify brand match. - sig { returns(T.nilable(Float)) } + sig do + returns( + T.nilable( + BrandDev::BrandIdentifyFromTransactionParams::Phone::Variants + ) + ) + end attr_reader :phone - sig { params(phone: Float).void } + sig do + params( + phone: BrandDev::BrandIdentifyFromTransactionParams::Phone::Variants + ).void + end attr_writer :phone + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -111,11 +163,22 @@ module BrandDev country_gl: BrandDev::BrandIdentifyFromTransactionParams::CountryGl::OrSymbol, force_language: - BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::OrSymbol, - high_confidence_only: T::Boolean, - max_speed: T::Boolean, - mcc: String, - phone: Float, + T.nilable( + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::OrSymbol + ), + high_confidence_only: + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::OrSymbol + ), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::OrSymbol + ), + mcc: BrandDev::BrandIdentifyFromTransactionParams::Mcc::Variants, + phone: BrandDev::BrandIdentifyFromTransactionParams::Phone::Variants, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -125,14 +188,13 @@ module BrandDev transaction_info:, # Optional city name to prioritize when searching for the brand. city: nil, - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. country_gl: nil, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, # When set to true, the API will perform an additional verification steps to # ensure the identified brand matches the transaction with high confidence. - # Defaults to false. high_confidence_only: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of @@ -143,6 +205,10 @@ module BrandDev mcc: nil, # Optional phone number from the transaction to help verify brand match. phone: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -159,11 +225,23 @@ module BrandDev country_gl: BrandDev::BrandIdentifyFromTransactionParams::CountryGl::OrSymbol, force_language: - BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::OrSymbol, - high_confidence_only: T::Boolean, - max_speed: T::Boolean, - mcc: String, - phone: Float, + T.nilable( + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::OrSymbol + ), + high_confidence_only: + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::OrSymbol + ), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::OrSymbol + ), + mcc: BrandDev::BrandIdentifyFromTransactionParams::Mcc::Variants, + phone: + BrandDev::BrandIdentifyFromTransactionParams::Phone::Variants, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } @@ -172,8 +250,8 @@ module BrandDev def to_hash end - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. module CountryGl extend BrandDev::Internal::Type::Enum @@ -186,49 +264,39 @@ module BrandDev end OrSymbol = T.type_alias { T.any(Symbol, String) } - AD = - T.let( - :ad, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - AE = - T.let( - :ae, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) AF = T.let( :af, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - AG = + AL = T.let( - :ag, + :al, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - AI = + DZ = T.let( - :ai, + :dz, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - AL = + AS = T.let( - :al, + :as, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - AM = + AD = T.let( - :am, + :ad, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - AN = + AO = T.let( - :an, + :ao, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - AO = + AI = T.let( - :ao, + :ai, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) AQ = @@ -236,19 +304,24 @@ module BrandDev :aq, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) + AG = + T.let( + :ag, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) AR = T.let( :ar, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - AS = + AM = T.let( - :as, + :am, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - AT = + AW = T.let( - :at, + :aw, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) AU = @@ -256,9 +329,9 @@ module BrandDev :au, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - AW = + AT = T.let( - :aw, + :at, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) AZ = @@ -266,14 +339,14 @@ module BrandDev :az, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BA = + BS = T.let( - :ba, + :bs, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BB = + BH = T.let( - :bb, + :bh, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) BD = @@ -281,29 +354,24 @@ module BrandDev :bd, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BE = - T.let( - :be, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - BF = + BB = T.let( - :bf, + :bb, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BG = + BY = T.let( - :bg, + :by, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BH = + BE = T.let( - :bh, + :be, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BI = + BZ = T.let( - :bi, + :bz, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) BJ = @@ -316,9 +384,9 @@ module BrandDev :bm, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BN = + BT = T.let( - :bn, + :bt, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) BO = @@ -326,39 +394,59 @@ module BrandDev :bo, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) + BA = + T.let( + :ba, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + BW = + T.let( + :bw, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + BV = + T.let( + :bv, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) BR = T.let( :br, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BS = + IO = T.let( - :bs, + :io, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BT = + BN = T.let( - :bt, + :bn, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BV = + BG = T.let( - :bv, + :bg, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BW = + BF = T.let( - :bw, + :bf, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BY = + BI = T.let( - :by, + :bi, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - BZ = + KH = T.let( - :bz, + :kh, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + CM = + T.let( + :cm, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) CA = @@ -366,14 +454,14 @@ module BrandDev :ca, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CC = + CV = T.let( - :cc, + :cv, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CD = + KY = T.let( - :cd, + :ky, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) CF = @@ -381,44 +469,54 @@ module BrandDev :cf, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CG = + TD = T.let( - :cg, + :td, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CH = + CL = T.let( - :ch, + :cl, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CI = + CN = T.let( - :ci, + :cn, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CK = + CX = T.let( - :ck, + :cx, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CL = + CC = T.let( - :cl, + :cc, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CM = + CO = T.let( - :cm, + :co, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CN = + KM = T.let( - :cn, + :km, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CO = + CG = T.let( - :co, + :cg, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + CD = + T.let( + :cd, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + CK = + T.let( + :ck, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) CR = @@ -426,19 +524,19 @@ module BrandDev :cr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CU = + CI = T.let( - :cu, + :ci, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CV = + HR = T.let( - :cv, + :hr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - CX = + CU = T.let( - :cx, + :cu, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) CY = @@ -451,9 +549,9 @@ module BrandDev :cz, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - DE = + DK = T.let( - :de, + :dk, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) DJ = @@ -461,11 +559,6 @@ module BrandDev :dj, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - DK = - T.let( - :dk, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) DM = T.let( :dm, @@ -476,29 +569,24 @@ module BrandDev :do, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - DZ = - T.let( - :dz, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) EC = T.let( :ec, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - EE = + EG = T.let( - :ee, + :eg, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - EG = + SV = T.let( - :eg, + :sv, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - EH = + GQ = T.let( - :eh, + :gq, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) ER = @@ -506,9 +594,9 @@ module BrandDev :er, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - ES = + EE = T.let( - :es, + :ee, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) ET = @@ -516,9 +604,14 @@ module BrandDev :et, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - FI = + FK = T.let( - :fi, + :fk, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + FO = + T.let( + :fo, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) FJ = @@ -526,39 +619,39 @@ module BrandDev :fj, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - FK = + FI = T.let( - :fk, + :fi, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - FM = + FR = T.let( - :fm, + :fr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - FO = + GF = T.let( - :fo, + :gf, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - FR = + PF = T.let( - :fr, + :pf, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - GA = + TF = T.let( - :ga, + :tf, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - GB = + GA = T.let( - :gb, + :ga, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - GD = + GM = T.let( - :gd, + :gm, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) GE = @@ -566,9 +659,9 @@ module BrandDev :ge, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - GF = + DE = T.let( - :gf, + :de, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) GH = @@ -581,19 +674,19 @@ module BrandDev :gi, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - GL = + GR = T.let( - :gl, + :gr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - GM = + GL = T.let( - :gm, + :gl, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - GN = + GD = T.let( - :gn, + :gd, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) GP = @@ -601,19 +694,9 @@ module BrandDev :gp, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - GQ = - T.let( - :gq, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - GR = - T.let( - :gr, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - GS = + GU = T.let( - :gs, + :gu, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) GT = @@ -621,9 +704,9 @@ module BrandDev :gt, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - GU = + GN = T.let( - :gu, + :gn, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) GW = @@ -636,9 +719,9 @@ module BrandDev :gy, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - HK = + HT = T.let( - :hk, + :ht, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) HM = @@ -646,19 +729,19 @@ module BrandDev :hm, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - HN = + VA = T.let( - :hn, + :va, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - HR = + HN = T.let( - :hr, + :hn, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - HT = + HK = T.let( - :ht, + :hk, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) HU = @@ -666,29 +749,24 @@ module BrandDev :hu, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - ID = - T.let( - :id, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - IE = + IS = T.let( - :ie, + :is, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - IL = + IN = T.let( - :il, + :in, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - IN = + ID = T.let( - :in, + :id, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - IO = + IR = T.let( - :io, + :ir, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) IQ = @@ -696,14 +774,14 @@ module BrandDev :iq, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - IR = + IE = T.let( - :ir, + :ie, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - IS = + IL = T.let( - :is, + :il, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) IT = @@ -716,29 +794,24 @@ module BrandDev :jm, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - JO = - T.let( - :jo, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) JP = T.let( :jp, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - KE = + JO = T.let( - :ke, + :jo, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - KG = + KZ = T.let( - :kg, + :kz, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - KH = + KE = T.let( - :kh, + :ke, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) KI = @@ -746,16 +819,6 @@ module BrandDev :ki, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - KM = - T.let( - :km, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - KN = - T.let( - :kn, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) KP = T.let( :kp, @@ -771,14 +834,9 @@ module BrandDev :kw, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - KY = - T.let( - :ky, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - KZ = + KG = T.let( - :kz, + :kg, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) LA = @@ -786,34 +844,34 @@ module BrandDev :la, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - LB = + LV = T.let( - :lb, + :lv, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - LC = + LB = T.let( - :lc, + :lb, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - LI = + LS = T.let( - :li, + :ls, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - LK = + LR = T.let( - :lk, + :lr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - LR = + LY = T.let( - :lr, + :ly, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - LS = + LI = T.let( - :ls, + :li, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) LT = @@ -826,29 +884,14 @@ module BrandDev :lu, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - LV = - T.let( - :lv, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - LY = - T.let( - :ly, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - MA = - T.let( - :ma, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - MC = + MO = T.let( - :mc, + :mo, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MD = + MK = T.let( - :md, + :mk, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) MG = @@ -856,39 +899,34 @@ module BrandDev :mg, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MH = - T.let( - :mh, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - MK = + MW = T.let( - :mk, + :mw, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - ML = + MY = T.let( - :ml, + :my, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MM = + MV = T.let( - :mm, + :mv, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MN = + ML = T.let( - :mn, + :ml, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MO = + MT = T.let( - :mo, + :mt, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MP = + MH = T.let( - :mp, + :mh, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) MQ = @@ -901,39 +939,49 @@ module BrandDev :mr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MS = + MU = T.let( - :ms, + :mu, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MT = + YT = T.let( - :mt, + :yt, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MU = + MX = T.let( - :mu, + :mx, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MV = + FM = T.let( - :mv, + :fm, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MW = + MD = T.let( - :mw, + :md, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MX = + MC = T.let( - :mx, + :mc, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - MY = + MN = T.let( - :my, + :mn, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + MS = + T.let( + :ms, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + MA = + T.let( + :ma, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) MZ = @@ -941,54 +989,59 @@ module BrandDev :mz, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) + MM = + T.let( + :mm, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) NA = T.let( :na, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NC = + NR = T.let( - :nc, + :nr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NE = + NP = T.let( - :ne, + :np, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NF = + NL = T.let( - :nf, + :nl, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NG = + AN = T.let( - :ng, + :an, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NI = + NC = T.let( - :ni, + :nc, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NL = + NZ = T.let( - :nl, + :nz, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NO = + NI = T.let( - :no, + :ni, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NP = + NE = T.let( - :np, + :ne, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NR = + NG = T.let( - :nr, + :ng, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) NU = @@ -996,9 +1049,19 @@ module BrandDev :nu, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - NZ = + NF = T.let( - :nz, + :nf, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + MP = + T.let( + :mp, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + NO = + T.let( + :no, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) OM = @@ -1006,19 +1069,24 @@ module BrandDev :om, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PA = + PK = T.let( - :pa, + :pk, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PE = + PW = T.let( - :pe, + :pw, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PF = + PS = T.let( - :pf, + :ps, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + PA = + T.let( + :pa, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) PG = @@ -1026,14 +1094,24 @@ module BrandDev :pg, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) + PY = + T.let( + :py, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + PE = + T.let( + :pe, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) PH = T.let( :ph, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PK = + PN = T.let( - :pk, + :pn, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) PL = @@ -1041,69 +1119,79 @@ module BrandDev :pl, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PM = + PT = T.let( - :pm, + :pt, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PN = + PR = T.let( - :pn, + :pr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PR = + QA = T.let( - :pr, + :qa, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PS = + RE = T.let( - :ps, + :re, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PT = + RO = T.let( - :pt, + :ro, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PW = + RU = T.let( - :pw, + :ru, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - PY = + RW = T.let( - :py, + :rw, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - QA = + SH = T.let( - :qa, + :sh, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - RE = + KN = T.let( - :re, + :kn, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - RO = + LC = T.let( - :ro, + :lc, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - RS = + PM = T.let( - :rs, + :pm, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - RU = + VC = T.let( - :ru, + :vc, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - RW = + WS = T.let( - :rw, + :ws, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + SM = + T.let( + :sm, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + ST = + T.let( + :st, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) SA = @@ -1111,24 +1199,24 @@ module BrandDev :sa, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SB = + SN = T.let( - :sb, + :sn, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SC = + RS = T.let( - :sc, + :rs, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SD = + SC = T.let( - :sd, + :sc, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SE = + SL = T.let( - :se, + :sl, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) SG = @@ -1136,9 +1224,9 @@ module BrandDev :sg, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SH = + SK = T.let( - :sh, + :sk, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) SI = @@ -1146,34 +1234,39 @@ module BrandDev :si, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SJ = + SB = T.let( - :sj, + :sb, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SK = + SO = T.let( - :sk, + :so, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SL = + ZA = T.let( - :sl, + :za, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SM = + GS = T.let( - :sm, + :gs, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SN = + ES = T.let( - :sn, + :es, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SO = + LK = T.let( - :so, + :lk, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + SD = + T.let( + :sd, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) SR = @@ -1181,44 +1274,44 @@ module BrandDev :sr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - ST = + SJ = T.let( - :st, + :sj, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SV = + SZ = T.let( - :sv, + :sz, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SY = + SE = T.let( - :sy, + :se, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - SZ = + CH = T.let( - :sz, + :ch, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TC = + SY = T.let( - :tc, + :sy, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TD = + TW = T.let( - :td, + :tw, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TF = + TJ = T.let( - :tf, + :tj, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TG = + TZ = T.let( - :tg, + :tz, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) TH = @@ -1226,9 +1319,14 @@ module BrandDev :th, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TJ = + TL = T.let( - :tj, + :tl, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) + TG = + T.let( + :tg, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) TK = @@ -1236,14 +1334,14 @@ module BrandDev :tk, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TL = + TO = T.let( - :tl, + :to, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TM = + TT = T.let( - :tm, + :tt, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) TN = @@ -1251,34 +1349,29 @@ module BrandDev :tn, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TO = - T.let( - :to, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) TR = T.let( :tr, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TT = + TM = T.let( - :tt, + :tm, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TV = + TC = T.let( - :tv, + :tc, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TW = + TV = T.let( - :tw, + :tv, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - TZ = + UG = T.let( - :tz, + :ug, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) UA = @@ -1286,14 +1379,14 @@ module BrandDev :ua, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - UG = + AE = T.let( - :ug, + :ae, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - UM = + GB = T.let( - :um, + :gb, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) US = @@ -1301,6 +1394,11 @@ module BrandDev :us, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) + UM = + T.let( + :um, + BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol + ) UY = T.let( :uy, @@ -1311,19 +1409,19 @@ module BrandDev :uz, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - VA = + VU = T.let( - :va, + :vu, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - VC = + VE = T.let( - :vc, + :ve, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - VE = + VN = T.let( - :ve, + :vn, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) VG = @@ -1336,24 +1434,14 @@ module BrandDev :vi, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - VN = - T.let( - :vn, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - VU = - T.let( - :vu, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) WF = T.let( :wf, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - WS = + EH = T.let( - :ws, + :eh, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) YE = @@ -1361,16 +1449,6 @@ module BrandDev :ye, BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol ) - YT = - T.let( - :yt, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) - ZA = - T.let( - :za, - BrandDev::BrandIdentifyFromTransactionParams::CountryGl::TaggedSymbol - ) ZM = T.let( :zm, @@ -1393,7 +1471,7 @@ module BrandDev end end - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum @@ -1406,24 +1484,64 @@ module BrandDev end OrSymbol = T.type_alias { T.any(Symbol, String) } + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) ALBANIAN = T.let( :albanian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + AMHARIC = + T.let( + :amharic, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) ARABIC = T.let( :arabic, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + ARMENIAN = + T.let( + :armenian, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) AZERI = T.let( :azeri, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + BASQUE = + T.let( + :basque, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) BENGALI = T.let( - :bengali, + :bengali, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + BOSNIAN = + T.let( + :bosnian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) BULGARIAN = @@ -1431,16 +1549,36 @@ module BrandDev :bulgarian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + BURMESE = + T.let( + :burmese, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) CANTONESE = T.let( :cantonese, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + CATALAN = + T.let( + :catalan, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) CEBUANO = T.let( :cebuano, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + CHINESE = + T.let( + :chinese, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) CROATIAN = T.let( :croatian, @@ -1466,6 +1604,11 @@ module BrandDev :english, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) ESTONIAN = T.let( :estonian, @@ -1476,6 +1619,11 @@ module BrandDev :farsi, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + FIJIAN = + T.let( + :fijian, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) FINNISH = T.let( :finnish, @@ -1486,11 +1634,41 @@ module BrandDev :french, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + GALICIAN = + T.let( + :galician, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) GERMAN = T.let( :german, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + GREEK = + T.let( + :greek, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) HAUSA = T.let( :hausa, @@ -1501,11 +1679,21 @@ module BrandDev :hawaiian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + HEBREW = + T.let( + :hebrew, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) HINDI = T.let( :hindi, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + HMONG = + T.let( + :hmong, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) HUNGARIAN = T.let( :hungarian, @@ -1516,31 +1704,76 @@ module BrandDev :icelandic, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + IGBO = + T.let( + :igbo, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) INDONESIAN = T.let( :indonesian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + IRISH = + T.let( + :irish, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) ITALIAN = T.let( :italian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + JAPANESE = + T.let( + :japanese, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) KAZAKH = T.let( :kazakh, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + KHMER = + T.let( + :khmer, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) KOREAN = T.let( :korean, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + KURDISH = + T.let( + :kurdish, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) KYRGYZ = T.let( :kyrgyz, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + LAO = + T.let( + :lao, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) LATIN = T.let( :latin, @@ -1551,16 +1784,56 @@ module BrandDev :latvian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + LINGALA = + T.let( + :lingala, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) LITHUANIAN = T.let( :lithuanian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) MACEDONIAN = T.let( :macedonian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + MALAGASY = + T.let( + :malagasy, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) MONGOLIAN = T.let( :mongolian, @@ -1576,6 +1849,16 @@ module BrandDev :norwegian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + ODIA = + T.let( + :odia, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) PASHTO = T.let( :pashto, @@ -1596,6 +1879,16 @@ module BrandDev :portuguese, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + PUNJABI = + T.let( + :punjabi, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) ROMANIAN = T.let( :romanian, @@ -1606,11 +1899,41 @@ module BrandDev :russian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + SAMOAN = + T.let( + :samoan, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) SERBIAN = T.let( :serbian, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + SESOTHO = + T.let( + :sesotho, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) SLOVAK = T.let( :slovak, @@ -1631,6 +1954,11 @@ module BrandDev :spanish, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) SWAHILI = T.let( :swahili, @@ -1646,16 +1974,61 @@ module BrandDev :tagalog, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + TAJIK = + T.let( + :tajik, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) THAI = T.let( :thai, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + TIBETAN = + T.let( + :tibetan, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) TURKISH = T.let( :turkish, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + TURKMEN = + T.let( + :turkmen, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) UKRAINIAN = T.let( :ukrainian, @@ -1666,6 +2039,11 @@ module BrandDev :urdu, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + UYGHUR = + T.let( + :uyghur, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) UZBEK = T.let( :uzbek, @@ -1681,6 +2059,31 @@ module BrandDev :welsh, BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol ) + WOLOF = + T.let( + :wolof, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::TaggedSymbol + ) sig do override.returns( @@ -1692,6 +2095,130 @@ module BrandDev def self.values end end + + # When set to true, the API will perform an additional verification steps to + # ensure the identified brand matches the transaction with high confidence. + module HighConfidenceOnly + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::TaggedSymbol + ) + end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::TaggedSymbol + ) + end + + # Optional Merchant Category Code (MCC) to help identify the business + # category/industry. + module Mcc + extend BrandDev::Internal::Type::Union + + Variants = T.type_alias { T.any(String, Float) } + + sig do + override.returns( + T::Array[ + BrandDev::BrandIdentifyFromTransactionParams::Mcc::Variants + ] + ) + end + def self.variants + end + end + + # Optional phone number from the transaction to help verify brand match. + module Phone + extend BrandDev::Internal::Type::Union + + Variants = T.type_alias { T.any(String, Float) } + + sig do + override.returns( + T::Array[ + BrandDev::BrandIdentifyFromTransactionParams::Phone::Variants + ] + ) + end + def self.variants + end + end end end end diff --git a/rbi/brand_dev/models/brand_identify_from_transaction_response.rbi b/rbi/brand_dev/models/brand_identify_from_transaction_response.rbi index 02a83811..ab13c151 100644 --- a/rbi/brand_dev/models/brand_identify_from_transaction_response.rbi +++ b/rbi/brand_dev/models/brand_identify_from_transaction_response.rbi @@ -36,6 +36,25 @@ module BrandDev sig { params(code: Integer).void } attr_writer :code + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable( + BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata + ) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -48,6 +67,8 @@ module BrandDev brand: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::OrHash, code: Integer, + key_metadata: + BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata::OrHash, status: String ).returns(T.attached_class) end @@ -56,6 +77,9 @@ module BrandDev brand: nil, # HTTP status code code: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil ) @@ -67,6 +91,8 @@ module BrandDev brand: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand, code: Integer, + key_metadata: + BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata, status: String } ) @@ -238,6 +264,16 @@ module BrandDev sig { params(phone: String).void } attr_writer :phone + # Language to force for the retrieved brand data. + sig do + returns( + T.nilable( + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ) + end + attr_accessor :primary_language + # The brand's slogan sig { returns(T.nilable(String)) } attr_reader :slogan @@ -319,6 +355,10 @@ module BrandDev BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::OrHash ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::OrSymbol + ), slogan: String, socials: T::Array[ @@ -352,6 +392,8 @@ module BrandDev logos: nil, # Company phone number phone: nil, + # Language to force for the retrieved brand data. + primary_language: nil, # The brand's slogan slogan: nil, # An array of social media links for the brand @@ -390,6 +432,10 @@ module BrandDev BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ), slogan: String, socials: T::Array[ @@ -1255,11 +1301,6 @@ module BrandDev :"Creator Economy & Influencer Platforms", BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) - ADVERTISING_ADTECH_MEDIA_BUYING = - T.let( - :"Advertising, Adtech & Media Buying", - BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol - ) FILM_TV_PRODUCTION_STUDIOS = T.let( :"Film, TV & Production Studios", @@ -1560,6 +1601,11 @@ module BrandDev :"News Publishing & Journalism", BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) + ADVERTISING_ADTECH_MEDIA_BUYING = + T.let( + :"Advertising, Adtech & Media Buying", + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol + ) DIGITAL_MEDIA_CONTENT_PLATFORMS = T.let( :"Digital Media & Content Platforms", @@ -2512,6 +2558,631 @@ module BrandDev end end + # Language to force for the retrieved brand data. + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ALBANIAN = + T.let( + :albanian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AMHARIC = + T.let( + :amharic, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARABIC = + T.let( + :arabic, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARMENIAN = + T.let( + :armenian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AZERI = + T.let( + :azeri, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BASQUE = + T.let( + :basque, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BENGALI = + T.let( + :bengali, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BULGARIAN = + T.let( + :bulgarian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BURMESE = + T.let( + :burmese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CANTONESE = + T.let( + :cantonese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CATALAN = + T.let( + :catalan, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CEBUANO = + T.let( + :cebuano, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CHINESE = + T.let( + :chinese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CROATIAN = + T.let( + :croatian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CZECH = + T.let( + :czech, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DANISH = + T.let( + :danish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DUTCH = + T.let( + :dutch, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ENGLISH = + T.let( + :english, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESTONIAN = + T.let( + :estonian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FARSI = + T.let( + :farsi, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FIJIAN = + T.let( + :fijian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FINNISH = + T.let( + :finnish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FRENCH = + T.let( + :french, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GALICIAN = + T.let( + :galician, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GERMAN = + T.let( + :german, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GREEK = + T.let( + :greek, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAUSA = + T.let( + :hausa, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAWAIIAN = + T.let( + :hawaiian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HEBREW = + T.let( + :hebrew, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HINDI = + T.let( + :hindi, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HMONG = + T.let( + :hmong, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HUNGARIAN = + T.let( + :hungarian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ICELANDIC = + T.let( + :icelandic, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IGBO = + T.let( + :igbo, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + INDONESIAN = + T.let( + :indonesian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IRISH = + T.let( + :irish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ITALIAN = + T.let( + :italian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAPANESE = + T.let( + :japanese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KAZAKH = + T.let( + :kazakh, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KHMER = + T.let( + :khmer, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KOREAN = + T.let( + :korean, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KURDISH = + T.let( + :kurdish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KYRGYZ = + T.let( + :kyrgyz, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LAO = + T.let( + :lao, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATIN = + T.let( + :latin, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATVIAN = + T.let( + :latvian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LINGALA = + T.let( + :lingala, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LITHUANIAN = + T.let( + :lithuanian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MACEDONIAN = + T.let( + :macedonian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAGASY = + T.let( + :malagasy, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MONGOLIAN = + T.let( + :mongolian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NEPALI = + T.let( + :nepali, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NORWEGIAN = + T.let( + :norwegian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ODIA = + T.let( + :odia, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PASHTO = + T.let( + :pashto, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PIDGIN = + T.let( + :pidgin, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + POLISH = + T.let( + :polish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PORTUGUESE = + T.let( + :portuguese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PUNJABI = + T.let( + :punjabi, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ROMANIAN = + T.let( + :romanian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + RUSSIAN = + T.let( + :russian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SAMOAN = + T.let( + :samoan, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SERBIAN = + T.let( + :serbian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SESOTHO = + T.let( + :sesotho, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVAK = + T.let( + :slovak, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVENE = + T.let( + :slovene, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SOMALI = + T.let( + :somali, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SPANISH = + T.let( + :spanish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWAHILI = + T.let( + :swahili, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWEDISH = + T.let( + :swedish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAGALOG = + T.let( + :tagalog, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAJIK = + T.let( + :tajik, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + THAI = + T.let( + :thai, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIBETAN = + T.let( + :tibetan, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKISH = + T.let( + :turkish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKMEN = + T.let( + :turkmen, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UKRAINIAN = + T.let( + :ukrainian, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + URDU = + T.let( + :urdu, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UYGHUR = + T.let( + :uyghur, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UZBEK = + T.let( + :uzbek, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + VIETNAMESE = + T.let( + :vietnamese, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WELSH = + T.let( + :welsh, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WOLOF = + T.let( + :wolof, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::PrimaryLanguage::TaggedSymbol + ] + ) + end + def self.values + end + end + class Social < BrandDev::Internal::Type::BaseModel OrHash = T.type_alias do @@ -2521,11 +3192,22 @@ module BrandDev ) end - # Type of social media, e.g., 'facebook', 'twitter' - sig { returns(T.nilable(String)) } + # Type of social media platform + sig do + returns( + T.nilable( + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + ) + end attr_reader :type - sig { params(type: String).void } + sig do + params( + type: + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::OrSymbol + ).void + end attr_writer :type # URL of the social media page @@ -2535,18 +3217,212 @@ module BrandDev sig { params(url: String).void } attr_writer :url - sig { params(type: String, url: String).returns(T.attached_class) } + sig do + params( + type: + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::OrSymbol, + url: String + ).returns(T.attached_class) + end def self.new( - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform type: nil, # URL of the social media page url: nil ) end - sig { override.returns({ type: String, url: String }) } + sig do + override.returns( + { + type: + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol, + url: String + } + ) + end def to_hash end + + # Type of social media platform + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + X = + T.let( + :x, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + FACEBOOK = + T.let( + :facebook, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + INSTAGRAM = + T.let( + :instagram, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + LINKEDIN = + T.let( + :linkedin, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + YOUTUBE = + T.let( + :youtube, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + PINTEREST = + T.let( + :pinterest, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + DRIBBBLE = + T.let( + :dribbble, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + GITHUB = + T.let( + :github, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + BEHANCE = + T.let( + :behance, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + SNAPCHAT = + T.let( + :snapchat, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + WHATSAPP = + T.let( + :whatsapp, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + TELEGRAM = + T.let( + :telegram, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + LINE = + T.let( + :line, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + DISCORD = + T.let( + :discord, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + TWITCH = + T.let( + :twitch, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + VIMEO = + T.let( + :vimeo, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + IMDB = + T.let( + :imdb, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + TUMBLR = + T.let( + :tumblr, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + FLICKR = + T.let( + :flickr, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + GIPHY = + T.let( + :giphy, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + MEDIUM = + T.let( + :medium, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + SPOTIFY = + T.let( + :spotify, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + SOUNDCLOUD = + T.let( + :soundcloud, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + TRIPADVISOR = + T.let( + :tripadvisor, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + YELP = + T.let( + :yelp, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + PRODUCTHUNT = + T.let( + :producthunt, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + REDDIT = + T.let( + :reddit, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + CRUNCHBASE = + T.let( + :crunchbase, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + APPSTORE = + T.let( + :appstore, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + PLAYSTORE = + T.let( + :playstore, + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::Type::TaggedSymbol + ] + ) + end + def self.values + end + end end class Stock < BrandDev::Internal::Type::BaseModel @@ -2590,6 +3466,47 @@ module BrandDev end end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_prefetch_by_email_params.rbi b/rbi/brand_dev/models/brand_prefetch_by_email_params.rbi index 41ad86de..a3b1a8e7 100644 --- a/rbi/brand_dev/models/brand_prefetch_by_email_params.rbi +++ b/rbi/brand_dev/models/brand_prefetch_by_email_params.rbi @@ -20,6 +20,13 @@ module BrandDev sig { returns(String) } attr_accessor :email + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -32,6 +39,7 @@ module BrandDev sig do params( email: String, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -41,6 +49,8 @@ module BrandDev # email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email # addresses are not allowed. email:, + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -53,6 +63,7 @@ module BrandDev override.returns( { email: String, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/rbi/brand_dev/models/brand_prefetch_by_email_response.rbi b/rbi/brand_dev/models/brand_prefetch_by_email_response.rbi index cc66aa0f..6994d411 100644 --- a/rbi/brand_dev/models/brand_prefetch_by_email_response.rbi +++ b/rbi/brand_dev/models/brand_prefetch_by_email_response.rbi @@ -18,6 +18,23 @@ module BrandDev sig { params(domain: String).void } attr_writer :domain + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Success message sig { returns(T.nilable(String)) } attr_reader :message @@ -33,13 +50,20 @@ module BrandDev attr_writer :status sig do - params(domain: String, message: String, status: String).returns( - T.attached_class - ) + params( + domain: String, + key_metadata: + BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata::OrHash, + message: String, + status: String + ).returns(T.attached_class) end def self.new( # The domain that was queued for prefetching domain: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Success message message: nil, # Status of the response, e.g., 'ok' @@ -48,10 +72,59 @@ module BrandDev end sig do - override.returns({ domain: String, message: String, status: String }) + override.returns( + { + domain: String, + key_metadata: + BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata, + message: String, + status: String + } + ) end def to_hash end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_prefetch_params.rbi b/rbi/brand_dev/models/brand_prefetch_params.rbi index 74850a63..a29e143f 100644 --- a/rbi/brand_dev/models/brand_prefetch_params.rbi +++ b/rbi/brand_dev/models/brand_prefetch_params.rbi @@ -15,6 +15,13 @@ module BrandDev sig { returns(String) } attr_accessor :domain + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -27,6 +34,7 @@ module BrandDev sig do params( domain: String, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -34,6 +42,8 @@ module BrandDev def self.new( # Domain name to prefetch brand data for domain:, + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -46,6 +56,7 @@ module BrandDev override.returns( { domain: String, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/rbi/brand_dev/models/brand_prefetch_response.rbi b/rbi/brand_dev/models/brand_prefetch_response.rbi index 585fb3aa..56987f4b 100644 --- a/rbi/brand_dev/models/brand_prefetch_response.rbi +++ b/rbi/brand_dev/models/brand_prefetch_response.rbi @@ -18,6 +18,21 @@ module BrandDev sig { params(domain: String).void } attr_writer :domain + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns(T.nilable(BrandDev::Models::BrandPrefetchResponse::KeyMetadata)) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandPrefetchResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Success message sig { returns(T.nilable(String)) } attr_reader :message @@ -33,13 +48,20 @@ module BrandDev attr_writer :status sig do - params(domain: String, message: String, status: String).returns( - T.attached_class - ) + params( + domain: String, + key_metadata: + BrandDev::Models::BrandPrefetchResponse::KeyMetadata::OrHash, + message: String, + status: String + ).returns(T.attached_class) end def self.new( # The domain that was queued for prefetching domain: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Success message message: nil, # Status of the response, e.g., 'ok' @@ -48,10 +70,58 @@ module BrandDev end sig do - override.returns({ domain: String, message: String, status: String }) + override.returns( + { + domain: String, + key_metadata: BrandDev::Models::BrandPrefetchResponse::KeyMetadata, + message: String, + status: String + } + ) end def to_hash end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandPrefetchResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_by_email_params.rbi b/rbi/brand_dev/models/brand_retrieve_by_email_params.rbi index 259dd24b..8948660d 100644 --- a/rbi/brand_dev/models/brand_retrieve_by_email_params.rbi +++ b/rbi/brand_dev/models/brand_retrieve_by_email_params.rbi @@ -20,7 +20,7 @@ module BrandDev sig { returns(String) } attr_accessor :email - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. sig do returns( T.nilable( @@ -28,25 +28,50 @@ module BrandDev ) ) end - attr_reader :force_language + attr_accessor :force_language - sig do - params( - force_language: - BrandDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol - ).void - end - attr_writer :force_language + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandRetrieveByEmailParams::MaxSpeed::OrSymbol + ) + ) + ) + end attr_reader :max_speed - sig { params(max_speed: T::Boolean).void } + sig do + params( + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByEmailParams::MaxSpeed::OrSymbol + ) + ).void + end attr_writer :max_speed + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -60,8 +85,16 @@ module BrandDev params( email: String, force_language: - BrandDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByEmailParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -71,12 +104,21 @@ module BrandDev # domain will be extracted from the email. Free email providers (gmail.com, # yahoo.com, etc.) and disposable email addresses are not allowed. email:, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. max_speed: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -90,8 +132,16 @@ module BrandDev { email: String, force_language: - BrandDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByEmailParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } @@ -100,7 +150,7 @@ module BrandDev def to_hash end - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum @@ -110,41 +160,101 @@ module BrandDev end OrSymbol = T.type_alias { T.any(Symbol, String) } + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) ALBANIAN = T.let( :albanian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + AMHARIC = + T.let( + :amharic, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) ARABIC = T.let( :arabic, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + ARMENIAN = + T.let( + :armenian, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) AZERI = T.let( :azeri, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + BASQUE = + T.let( + :basque, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) BENGALI = T.let( :bengali, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) BULGARIAN = T.let( :bulgarian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + BURMESE = + T.let( + :burmese, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) CANTONESE = T.let( :cantonese, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + CATALAN = + T.let( + :catalan, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) CEBUANO = T.let( :cebuano, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + CHINESE = + T.let( + :chinese, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) CROATIAN = T.let( :croatian, @@ -170,6 +280,11 @@ module BrandDev :english, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) ESTONIAN = T.let( :estonian, @@ -180,6 +295,11 @@ module BrandDev :farsi, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + FIJIAN = + T.let( + :fijian, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) FINNISH = T.let( :finnish, @@ -190,11 +310,41 @@ module BrandDev :french, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + GALICIAN = + T.let( + :galician, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) GERMAN = T.let( :german, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + GREEK = + T.let( + :greek, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) HAUSA = T.let( :hausa, @@ -205,11 +355,21 @@ module BrandDev :hawaiian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + HEBREW = + T.let( + :hebrew, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) HINDI = T.let( :hindi, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + HMONG = + T.let( + :hmong, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) HUNGARIAN = T.let( :hungarian, @@ -220,31 +380,76 @@ module BrandDev :icelandic, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + IGBO = + T.let( + :igbo, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) INDONESIAN = T.let( :indonesian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + IRISH = + T.let( + :irish, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) ITALIAN = T.let( :italian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + JAPANESE = + T.let( + :japanese, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) KAZAKH = T.let( :kazakh, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + KHMER = + T.let( + :khmer, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) KOREAN = T.let( :korean, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + KURDISH = + T.let( + :kurdish, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) KYRGYZ = T.let( :kyrgyz, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + LAO = + T.let( + :lao, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) LATIN = T.let( :latin, @@ -255,16 +460,56 @@ module BrandDev :latvian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + LINGALA = + T.let( + :lingala, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) LITHUANIAN = T.let( :lithuanian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) MACEDONIAN = T.let( :macedonian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + MALAGASY = + T.let( + :malagasy, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) MONGOLIAN = T.let( :mongolian, @@ -280,6 +525,16 @@ module BrandDev :norwegian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + ODIA = + T.let( + :odia, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) PASHTO = T.let( :pashto, @@ -300,6 +555,16 @@ module BrandDev :portuguese, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + PUNJABI = + T.let( + :punjabi, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) ROMANIAN = T.let( :romanian, @@ -310,11 +575,41 @@ module BrandDev :russian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + SAMOAN = + T.let( + :samoan, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) SERBIAN = T.let( :serbian, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + SESOTHO = + T.let( + :sesotho, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) SLOVAK = T.let( :slovak, @@ -335,6 +630,11 @@ module BrandDev :spanish, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) SWAHILI = T.let( :swahili, @@ -350,16 +650,61 @@ module BrandDev :tagalog, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + TAJIK = + T.let( + :tajik, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) THAI = T.let( :thai, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + TIBETAN = + T.let( + :tibetan, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) TURKISH = T.let( :turkish, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + TURKMEN = + T.let( + :turkmen, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) UKRAINIAN = T.let( :ukrainian, @@ -370,6 +715,11 @@ module BrandDev :urdu, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + UYGHUR = + T.let( + :uyghur, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) UZBEK = T.let( :uzbek, @@ -385,6 +735,31 @@ module BrandDev :welsh, BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol ) + WOLOF = + T.let( + :wolof, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::TaggedSymbol + ) sig do override.returns( @@ -396,6 +771,46 @@ module BrandDev def self.values end end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandRetrieveByEmailParams::MaxSpeed::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandRetrieveByEmailParams::MaxSpeed::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandRetrieveByEmailParams::MaxSpeed) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandRetrieveByEmailParams::MaxSpeed::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandRetrieveByEmailParams::MaxSpeed::TaggedSymbol + ) + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_by_email_response.rbi b/rbi/brand_dev/models/brand_retrieve_by_email_response.rbi index 651de974..9933acfb 100644 --- a/rbi/brand_dev/models/brand_retrieve_by_email_response.rbi +++ b/rbi/brand_dev/models/brand_retrieve_by_email_response.rbi @@ -33,6 +33,23 @@ module BrandDev sig { params(code: Integer).void } attr_writer :code + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -44,6 +61,8 @@ module BrandDev params( brand: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::OrHash, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata::OrHash, status: String ).returns(T.attached_class) end @@ -52,6 +71,9 @@ module BrandDev brand: nil, # HTTP status code code: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil ) @@ -62,6 +84,8 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveByEmailResponse::Brand, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata, status: String } ) @@ -233,6 +257,16 @@ module BrandDev sig { params(phone: String).void } attr_writer :phone + # Language to force for the retrieved brand data. + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ) + end + attr_accessor :primary_language + # The brand's slogan sig { returns(T.nilable(String)) } attr_reader :slogan @@ -314,6 +348,10 @@ module BrandDev BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Logo::OrHash ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::OrSymbol + ), slogan: String, socials: T::Array[ @@ -347,6 +385,8 @@ module BrandDev logos: nil, # Company phone number phone: nil, + # Language to force for the retrieved brand data. + primary_language: nil, # The brand's slogan slogan: nil, # An array of social media links for the brand @@ -385,6 +425,10 @@ module BrandDev BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Logo ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ), slogan: String, socials: T::Array[ @@ -1250,11 +1294,6 @@ module BrandDev :"Creator Economy & Influencer Platforms", BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) - ADVERTISING_ADTECH_MEDIA_BUYING = - T.let( - :"Advertising, Adtech & Media Buying", - BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol - ) FILM_TV_PRODUCTION_STUDIOS = T.let( :"Film, TV & Production Studios", @@ -1555,6 +1594,11 @@ module BrandDev :"News Publishing & Journalism", BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) + ADVERTISING_ADTECH_MEDIA_BUYING = + T.let( + :"Advertising, Adtech & Media Buying", + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol + ) DIGITAL_MEDIA_CONTENT_PLATFORMS = T.let( :"Digital Media & Content Platforms", @@ -2507,6 +2551,631 @@ module BrandDev end end + # Language to force for the retrieved brand data. + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ALBANIAN = + T.let( + :albanian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AMHARIC = + T.let( + :amharic, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARABIC = + T.let( + :arabic, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARMENIAN = + T.let( + :armenian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AZERI = + T.let( + :azeri, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BASQUE = + T.let( + :basque, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BENGALI = + T.let( + :bengali, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BULGARIAN = + T.let( + :bulgarian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BURMESE = + T.let( + :burmese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CANTONESE = + T.let( + :cantonese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CATALAN = + T.let( + :catalan, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CEBUANO = + T.let( + :cebuano, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CHINESE = + T.let( + :chinese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CROATIAN = + T.let( + :croatian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CZECH = + T.let( + :czech, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DANISH = + T.let( + :danish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DUTCH = + T.let( + :dutch, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ENGLISH = + T.let( + :english, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESTONIAN = + T.let( + :estonian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FARSI = + T.let( + :farsi, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FIJIAN = + T.let( + :fijian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FINNISH = + T.let( + :finnish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FRENCH = + T.let( + :french, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GALICIAN = + T.let( + :galician, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GERMAN = + T.let( + :german, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GREEK = + T.let( + :greek, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAUSA = + T.let( + :hausa, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAWAIIAN = + T.let( + :hawaiian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HEBREW = + T.let( + :hebrew, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HINDI = + T.let( + :hindi, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HMONG = + T.let( + :hmong, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HUNGARIAN = + T.let( + :hungarian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ICELANDIC = + T.let( + :icelandic, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IGBO = + T.let( + :igbo, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + INDONESIAN = + T.let( + :indonesian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IRISH = + T.let( + :irish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ITALIAN = + T.let( + :italian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAPANESE = + T.let( + :japanese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KAZAKH = + T.let( + :kazakh, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KHMER = + T.let( + :khmer, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KOREAN = + T.let( + :korean, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KURDISH = + T.let( + :kurdish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KYRGYZ = + T.let( + :kyrgyz, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LAO = + T.let( + :lao, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATIN = + T.let( + :latin, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATVIAN = + T.let( + :latvian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LINGALA = + T.let( + :lingala, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LITHUANIAN = + T.let( + :lithuanian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MACEDONIAN = + T.let( + :macedonian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAGASY = + T.let( + :malagasy, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MONGOLIAN = + T.let( + :mongolian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NEPALI = + T.let( + :nepali, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NORWEGIAN = + T.let( + :norwegian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ODIA = + T.let( + :odia, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PASHTO = + T.let( + :pashto, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PIDGIN = + T.let( + :pidgin, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + POLISH = + T.let( + :polish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PORTUGUESE = + T.let( + :portuguese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PUNJABI = + T.let( + :punjabi, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ROMANIAN = + T.let( + :romanian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + RUSSIAN = + T.let( + :russian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SAMOAN = + T.let( + :samoan, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SERBIAN = + T.let( + :serbian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SESOTHO = + T.let( + :sesotho, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVAK = + T.let( + :slovak, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVENE = + T.let( + :slovene, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SOMALI = + T.let( + :somali, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SPANISH = + T.let( + :spanish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWAHILI = + T.let( + :swahili, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWEDISH = + T.let( + :swedish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAGALOG = + T.let( + :tagalog, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAJIK = + T.let( + :tajik, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + THAI = + T.let( + :thai, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIBETAN = + T.let( + :tibetan, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKISH = + T.let( + :turkish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKMEN = + T.let( + :turkmen, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UKRAINIAN = + T.let( + :ukrainian, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + URDU = + T.let( + :urdu, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UYGHUR = + T.let( + :uyghur, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UZBEK = + T.let( + :uzbek, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + VIETNAMESE = + T.let( + :vietnamese, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WELSH = + T.let( + :welsh, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WOLOF = + T.let( + :wolof, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::PrimaryLanguage::TaggedSymbol + ] + ) + end + def self.values + end + end + class Social < BrandDev::Internal::Type::BaseModel OrHash = T.type_alias do @@ -2516,11 +3185,22 @@ module BrandDev ) end - # Type of social media, e.g., 'facebook', 'twitter' - sig { returns(T.nilable(String)) } + # Type of social media platform + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + ) + end attr_reader :type - sig { params(type: String).void } + sig do + params( + type: + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::OrSymbol + ).void + end attr_writer :type # URL of the social media page @@ -2530,18 +3210,212 @@ module BrandDev sig { params(url: String).void } attr_writer :url - sig { params(type: String, url: String).returns(T.attached_class) } + sig do + params( + type: + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::OrSymbol, + url: String + ).returns(T.attached_class) + end def self.new( - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform type: nil, # URL of the social media page url: nil ) end - sig { override.returns({ type: String, url: String }) } + sig do + override.returns( + { + type: + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol, + url: String + } + ) + end def to_hash end + + # Type of social media platform + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + X = + T.let( + :x, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + FACEBOOK = + T.let( + :facebook, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + INSTAGRAM = + T.let( + :instagram, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + LINKEDIN = + T.let( + :linkedin, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + YOUTUBE = + T.let( + :youtube, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + PINTEREST = + T.let( + :pinterest, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + DRIBBBLE = + T.let( + :dribbble, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + GITHUB = + T.let( + :github, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + BEHANCE = + T.let( + :behance, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + SNAPCHAT = + T.let( + :snapchat, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + WHATSAPP = + T.let( + :whatsapp, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + TELEGRAM = + T.let( + :telegram, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + LINE = + T.let( + :line, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + DISCORD = + T.let( + :discord, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + TWITCH = + T.let( + :twitch, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + VIMEO = + T.let( + :vimeo, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + IMDB = + T.let( + :imdb, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + TUMBLR = + T.let( + :tumblr, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + FLICKR = + T.let( + :flickr, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + GIPHY = + T.let( + :giphy, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + MEDIUM = + T.let( + :medium, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + SPOTIFY = + T.let( + :spotify, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + SOUNDCLOUD = + T.let( + :soundcloud, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + TRIPADVISOR = + T.let( + :tripadvisor, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + YELP = + T.let( + :yelp, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + PRODUCTHUNT = + T.let( + :producthunt, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + REDDIT = + T.let( + :reddit, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + CRUNCHBASE = + T.let( + :crunchbase, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + APPSTORE = + T.let( + :appstore, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + PLAYSTORE = + T.let( + :playstore, + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::Type::TaggedSymbol + ] + ) + end + def self.values + end + end end class Stock < BrandDev::Internal::Type::BaseModel @@ -2585,6 +3459,47 @@ module BrandDev end end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_by_isin_params.rbi b/rbi/brand_dev/models/brand_retrieve_by_isin_params.rbi index d89c54df..27ce61f2 100644 --- a/rbi/brand_dev/models/brand_retrieve_by_isin_params.rbi +++ b/rbi/brand_dev/models/brand_retrieve_by_isin_params.rbi @@ -20,7 +20,7 @@ module BrandDev sig { returns(String) } attr_accessor :isin - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. sig do returns( T.nilable( @@ -28,25 +28,50 @@ module BrandDev ) ) end - attr_reader :force_language + attr_accessor :force_language - sig do - params( - force_language: - BrandDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol - ).void - end - attr_writer :force_language + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandRetrieveByIsinParams::MaxSpeed::OrSymbol + ) + ) + ) + end attr_reader :max_speed - sig { params(max_speed: T::Boolean).void } + sig do + params( + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByIsinParams::MaxSpeed::OrSymbol + ) + ).void + end attr_writer :max_speed + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -60,8 +85,16 @@ module BrandDev params( isin: String, force_language: - BrandDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByIsinParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -71,12 +104,21 @@ module BrandDev # (e.g., 'AU000000IMD5', 'US0378331005'). Must be exactly 12 characters: 2 letters # followed by 9 alphanumeric characters and ending with a digit. isin:, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. max_speed: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -90,8 +132,16 @@ module BrandDev { isin: String, force_language: - BrandDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByIsinParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } @@ -100,7 +150,7 @@ module BrandDev def to_hash end - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum @@ -110,41 +160,101 @@ module BrandDev end OrSymbol = T.type_alias { T.any(Symbol, String) } + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) ALBANIAN = T.let( :albanian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + AMHARIC = + T.let( + :amharic, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) ARABIC = T.let( :arabic, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + ARMENIAN = + T.let( + :armenian, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) AZERI = T.let( :azeri, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + BASQUE = + T.let( + :basque, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) BENGALI = T.let( :bengali, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) BULGARIAN = T.let( :bulgarian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + BURMESE = + T.let( + :burmese, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) CANTONESE = T.let( :cantonese, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + CATALAN = + T.let( + :catalan, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) CEBUANO = T.let( :cebuano, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + CHINESE = + T.let( + :chinese, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) CROATIAN = T.let( :croatian, @@ -170,6 +280,11 @@ module BrandDev :english, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) ESTONIAN = T.let( :estonian, @@ -180,6 +295,11 @@ module BrandDev :farsi, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + FIJIAN = + T.let( + :fijian, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) FINNISH = T.let( :finnish, @@ -190,11 +310,41 @@ module BrandDev :french, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + GALICIAN = + T.let( + :galician, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) GERMAN = T.let( :german, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + GREEK = + T.let( + :greek, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) HAUSA = T.let( :hausa, @@ -205,11 +355,21 @@ module BrandDev :hawaiian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + HEBREW = + T.let( + :hebrew, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) HINDI = T.let( :hindi, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + HMONG = + T.let( + :hmong, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) HUNGARIAN = T.let( :hungarian, @@ -220,31 +380,76 @@ module BrandDev :icelandic, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + IGBO = + T.let( + :igbo, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) INDONESIAN = T.let( :indonesian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + IRISH = + T.let( + :irish, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) ITALIAN = T.let( :italian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + JAPANESE = + T.let( + :japanese, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) KAZAKH = T.let( :kazakh, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + KHMER = + T.let( + :khmer, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) KOREAN = T.let( :korean, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + KURDISH = + T.let( + :kurdish, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) KYRGYZ = T.let( :kyrgyz, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + LAO = + T.let( + :lao, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) LATIN = T.let( :latin, @@ -255,16 +460,56 @@ module BrandDev :latvian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + LINGALA = + T.let( + :lingala, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) LITHUANIAN = T.let( :lithuanian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) MACEDONIAN = T.let( :macedonian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + MALAGASY = + T.let( + :malagasy, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) MONGOLIAN = T.let( :mongolian, @@ -280,6 +525,16 @@ module BrandDev :norwegian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + ODIA = + T.let( + :odia, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) PASHTO = T.let( :pashto, @@ -300,6 +555,16 @@ module BrandDev :portuguese, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + PUNJABI = + T.let( + :punjabi, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) ROMANIAN = T.let( :romanian, @@ -310,11 +575,41 @@ module BrandDev :russian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + SAMOAN = + T.let( + :samoan, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) SERBIAN = T.let( :serbian, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + SESOTHO = + T.let( + :sesotho, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) SLOVAK = T.let( :slovak, @@ -335,6 +630,11 @@ module BrandDev :spanish, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) SWAHILI = T.let( :swahili, @@ -350,16 +650,61 @@ module BrandDev :tagalog, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + TAJIK = + T.let( + :tajik, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) THAI = T.let( :thai, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + TIBETAN = + T.let( + :tibetan, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) TURKISH = T.let( :turkish, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + TURKMEN = + T.let( + :turkmen, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) UKRAINIAN = T.let( :ukrainian, @@ -370,6 +715,11 @@ module BrandDev :urdu, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + UYGHUR = + T.let( + :uyghur, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) UZBEK = T.let( :uzbek, @@ -385,6 +735,31 @@ module BrandDev :welsh, BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol ) + WOLOF = + T.let( + :wolof, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::TaggedSymbol + ) sig do override.returns( @@ -396,6 +771,46 @@ module BrandDev def self.values end end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandRetrieveByIsinParams::MaxSpeed::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandRetrieveByIsinParams::MaxSpeed::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandRetrieveByIsinParams::MaxSpeed) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandRetrieveByIsinParams::MaxSpeed::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandRetrieveByIsinParams::MaxSpeed::TaggedSymbol + ) + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_by_isin_response.rbi b/rbi/brand_dev/models/brand_retrieve_by_isin_response.rbi index ef848f8a..5ece2981 100644 --- a/rbi/brand_dev/models/brand_retrieve_by_isin_response.rbi +++ b/rbi/brand_dev/models/brand_retrieve_by_isin_response.rbi @@ -31,6 +31,23 @@ module BrandDev sig { params(code: Integer).void } attr_writer :code + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -42,6 +59,8 @@ module BrandDev params( brand: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::OrHash, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata::OrHash, status: String ).returns(T.attached_class) end @@ -50,6 +69,9 @@ module BrandDev brand: nil, # HTTP status code code: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil ) @@ -60,6 +82,8 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveByIsinResponse::Brand, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata, status: String } ) @@ -231,6 +255,16 @@ module BrandDev sig { params(phone: String).void } attr_writer :phone + # Language to force for the retrieved brand data. + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ) + end + attr_accessor :primary_language + # The brand's slogan sig { returns(T.nilable(String)) } attr_reader :slogan @@ -312,6 +346,10 @@ module BrandDev BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Logo::OrHash ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::OrSymbol + ), slogan: String, socials: T::Array[ @@ -345,6 +383,8 @@ module BrandDev logos: nil, # Company phone number phone: nil, + # Language to force for the retrieved brand data. + primary_language: nil, # The brand's slogan slogan: nil, # An array of social media links for the brand @@ -383,6 +423,10 @@ module BrandDev BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Logo ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ), slogan: String, socials: T::Array[ @@ -1248,11 +1292,6 @@ module BrandDev :"Creator Economy & Influencer Platforms", BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) - ADVERTISING_ADTECH_MEDIA_BUYING = - T.let( - :"Advertising, Adtech & Media Buying", - BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol - ) FILM_TV_PRODUCTION_STUDIOS = T.let( :"Film, TV & Production Studios", @@ -1553,6 +1592,11 @@ module BrandDev :"News Publishing & Journalism", BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) + ADVERTISING_ADTECH_MEDIA_BUYING = + T.let( + :"Advertising, Adtech & Media Buying", + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol + ) DIGITAL_MEDIA_CONTENT_PLATFORMS = T.let( :"Digital Media & Content Platforms", @@ -2505,6 +2549,631 @@ module BrandDev end end + # Language to force for the retrieved brand data. + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ALBANIAN = + T.let( + :albanian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AMHARIC = + T.let( + :amharic, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARABIC = + T.let( + :arabic, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARMENIAN = + T.let( + :armenian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AZERI = + T.let( + :azeri, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BASQUE = + T.let( + :basque, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BENGALI = + T.let( + :bengali, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BULGARIAN = + T.let( + :bulgarian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BURMESE = + T.let( + :burmese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CANTONESE = + T.let( + :cantonese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CATALAN = + T.let( + :catalan, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CEBUANO = + T.let( + :cebuano, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CHINESE = + T.let( + :chinese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CROATIAN = + T.let( + :croatian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CZECH = + T.let( + :czech, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DANISH = + T.let( + :danish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DUTCH = + T.let( + :dutch, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ENGLISH = + T.let( + :english, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESTONIAN = + T.let( + :estonian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FARSI = + T.let( + :farsi, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FIJIAN = + T.let( + :fijian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FINNISH = + T.let( + :finnish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FRENCH = + T.let( + :french, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GALICIAN = + T.let( + :galician, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GERMAN = + T.let( + :german, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GREEK = + T.let( + :greek, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAUSA = + T.let( + :hausa, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAWAIIAN = + T.let( + :hawaiian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HEBREW = + T.let( + :hebrew, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HINDI = + T.let( + :hindi, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HMONG = + T.let( + :hmong, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HUNGARIAN = + T.let( + :hungarian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ICELANDIC = + T.let( + :icelandic, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IGBO = + T.let( + :igbo, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + INDONESIAN = + T.let( + :indonesian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IRISH = + T.let( + :irish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ITALIAN = + T.let( + :italian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAPANESE = + T.let( + :japanese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KAZAKH = + T.let( + :kazakh, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KHMER = + T.let( + :khmer, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KOREAN = + T.let( + :korean, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KURDISH = + T.let( + :kurdish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KYRGYZ = + T.let( + :kyrgyz, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LAO = + T.let( + :lao, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATIN = + T.let( + :latin, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATVIAN = + T.let( + :latvian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LINGALA = + T.let( + :lingala, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LITHUANIAN = + T.let( + :lithuanian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MACEDONIAN = + T.let( + :macedonian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAGASY = + T.let( + :malagasy, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MONGOLIAN = + T.let( + :mongolian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NEPALI = + T.let( + :nepali, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NORWEGIAN = + T.let( + :norwegian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ODIA = + T.let( + :odia, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PASHTO = + T.let( + :pashto, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PIDGIN = + T.let( + :pidgin, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + POLISH = + T.let( + :polish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PORTUGUESE = + T.let( + :portuguese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PUNJABI = + T.let( + :punjabi, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ROMANIAN = + T.let( + :romanian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + RUSSIAN = + T.let( + :russian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SAMOAN = + T.let( + :samoan, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SERBIAN = + T.let( + :serbian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SESOTHO = + T.let( + :sesotho, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVAK = + T.let( + :slovak, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVENE = + T.let( + :slovene, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SOMALI = + T.let( + :somali, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SPANISH = + T.let( + :spanish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWAHILI = + T.let( + :swahili, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWEDISH = + T.let( + :swedish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAGALOG = + T.let( + :tagalog, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAJIK = + T.let( + :tajik, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + THAI = + T.let( + :thai, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIBETAN = + T.let( + :tibetan, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKISH = + T.let( + :turkish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKMEN = + T.let( + :turkmen, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UKRAINIAN = + T.let( + :ukrainian, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + URDU = + T.let( + :urdu, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UYGHUR = + T.let( + :uyghur, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UZBEK = + T.let( + :uzbek, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + VIETNAMESE = + T.let( + :vietnamese, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WELSH = + T.let( + :welsh, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WOLOF = + T.let( + :wolof, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::PrimaryLanguage::TaggedSymbol + ] + ) + end + def self.values + end + end + class Social < BrandDev::Internal::Type::BaseModel OrHash = T.type_alias do @@ -2514,11 +3183,22 @@ module BrandDev ) end - # Type of social media, e.g., 'facebook', 'twitter' - sig { returns(T.nilable(String)) } + # Type of social media platform + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + ) + end attr_reader :type - sig { params(type: String).void } + sig do + params( + type: + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::OrSymbol + ).void + end attr_writer :type # URL of the social media page @@ -2528,18 +3208,212 @@ module BrandDev sig { params(url: String).void } attr_writer :url - sig { params(type: String, url: String).returns(T.attached_class) } + sig do + params( + type: + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::OrSymbol, + url: String + ).returns(T.attached_class) + end def self.new( - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform type: nil, # URL of the social media page url: nil ) end - sig { override.returns({ type: String, url: String }) } + sig do + override.returns( + { + type: + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol, + url: String + } + ) + end def to_hash end + + # Type of social media platform + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + X = + T.let( + :x, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + FACEBOOK = + T.let( + :facebook, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + INSTAGRAM = + T.let( + :instagram, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + LINKEDIN = + T.let( + :linkedin, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + YOUTUBE = + T.let( + :youtube, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + PINTEREST = + T.let( + :pinterest, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + DRIBBBLE = + T.let( + :dribbble, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + GITHUB = + T.let( + :github, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + BEHANCE = + T.let( + :behance, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + SNAPCHAT = + T.let( + :snapchat, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + WHATSAPP = + T.let( + :whatsapp, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + TELEGRAM = + T.let( + :telegram, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + LINE = + T.let( + :line, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + DISCORD = + T.let( + :discord, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + TWITCH = + T.let( + :twitch, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + VIMEO = + T.let( + :vimeo, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + IMDB = + T.let( + :imdb, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + TUMBLR = + T.let( + :tumblr, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + FLICKR = + T.let( + :flickr, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + GIPHY = + T.let( + :giphy, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + MEDIUM = + T.let( + :medium, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + SPOTIFY = + T.let( + :spotify, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + SOUNDCLOUD = + T.let( + :soundcloud, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + TRIPADVISOR = + T.let( + :tripadvisor, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + YELP = + T.let( + :yelp, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + PRODUCTHUNT = + T.let( + :producthunt, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + REDDIT = + T.let( + :reddit, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + CRUNCHBASE = + T.let( + :crunchbase, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + APPSTORE = + T.let( + :appstore, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + PLAYSTORE = + T.let( + :playstore, + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::Type::TaggedSymbol + ] + ) + end + def self.values + end + end end class Stock < BrandDev::Internal::Type::BaseModel @@ -2583,6 +3457,47 @@ module BrandDev end end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_by_name_params.rbi b/rbi/brand_dev/models/brand_retrieve_by_name_params.rbi index f7bf6187..174de5b3 100644 --- a/rbi/brand_dev/models/brand_retrieve_by_name_params.rbi +++ b/rbi/brand_dev/models/brand_retrieve_by_name_params.rbi @@ -19,8 +19,8 @@ module BrandDev sig { returns(String) } attr_accessor :name - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. sig do returns( T.nilable(BrandDev::BrandRetrieveByNameParams::CountryGl::OrSymbol) @@ -35,7 +35,7 @@ module BrandDev end attr_writer :country_gl - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. sig do returns( T.nilable( @@ -43,25 +43,50 @@ module BrandDev ) ) end - attr_reader :force_language + attr_accessor :force_language - sig do - params( - force_language: - BrandDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol - ).void - end - attr_writer :force_language + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandRetrieveByNameParams::MaxSpeed::OrSymbol + ) + ) + ) + end attr_reader :max_speed - sig { params(max_speed: T::Boolean).void } + sig do + params( + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByNameParams::MaxSpeed::OrSymbol + ) + ).void + end attr_writer :max_speed + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -76,8 +101,16 @@ module BrandDev name: String, country_gl: BrandDev::BrandRetrieveByNameParams::CountryGl::OrSymbol, force_language: - BrandDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByNameParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -86,15 +119,24 @@ module BrandDev # Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft # Corporation'). Must be 3-30 characters. name:, - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. country_gl: nil, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. max_speed: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -110,8 +152,16 @@ module BrandDev country_gl: BrandDev::BrandRetrieveByNameParams::CountryGl::OrSymbol, force_language: - BrandDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByNameParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } @@ -120,8 +170,8 @@ module BrandDev def to_hash end - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. module CountryGl extend BrandDev::Internal::Type::Enum @@ -131,49 +181,39 @@ module BrandDev end OrSymbol = T.type_alias { T.any(Symbol, String) } - AD = - T.let( - :ad, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - AE = - T.let( - :ae, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) AF = T.let( :af, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - AG = + AL = T.let( - :ag, + :al, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - AI = + DZ = T.let( - :ai, + :dz, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - AL = + AS = T.let( - :al, + :as, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - AM = + AD = T.let( - :am, + :ad, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - AN = + AO = T.let( - :an, + :ao, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - AO = + AI = T.let( - :ao, + :ai, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) AQ = @@ -181,19 +221,24 @@ module BrandDev :aq, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) + AG = + T.let( + :ag, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) AR = T.let( :ar, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - AS = + AM = T.let( - :as, + :am, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - AT = + AW = T.let( - :at, + :aw, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) AU = @@ -201,9 +246,9 @@ module BrandDev :au, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - AW = + AT = T.let( - :aw, + :at, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) AZ = @@ -211,14 +256,14 @@ module BrandDev :az, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BA = + BS = T.let( - :ba, + :bs, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BB = + BH = T.let( - :bb, + :bh, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) BD = @@ -226,29 +271,24 @@ module BrandDev :bd, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BE = - T.let( - :be, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - BF = + BB = T.let( - :bf, + :bb, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BG = + BY = T.let( - :bg, + :by, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BH = + BE = T.let( - :bh, + :be, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BI = + BZ = T.let( - :bi, + :bz, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) BJ = @@ -261,9 +301,9 @@ module BrandDev :bm, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BN = + BT = T.let( - :bn, + :bt, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) BO = @@ -271,39 +311,59 @@ module BrandDev :bo, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) + BA = + T.let( + :ba, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + BW = + T.let( + :bw, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + BV = + T.let( + :bv, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) BR = T.let( :br, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BS = + IO = T.let( - :bs, + :io, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BT = + BN = T.let( - :bt, + :bn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BV = + BG = T.let( - :bv, + :bg, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BW = + BF = T.let( - :bw, + :bf, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BY = + BI = T.let( - :by, + :bi, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - BZ = + KH = T.let( - :bz, + :kh, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + CM = + T.let( + :cm, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) CA = @@ -311,14 +371,14 @@ module BrandDev :ca, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CC = + CV = T.let( - :cc, + :cv, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CD = + KY = T.let( - :cd, + :ky, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) CF = @@ -326,44 +386,54 @@ module BrandDev :cf, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CG = + TD = T.let( - :cg, + :td, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CH = + CL = T.let( - :ch, + :cl, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CI = + CN = T.let( - :ci, + :cn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CK = + CX = T.let( - :ck, + :cx, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CL = + CC = T.let( - :cl, + :cc, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CM = + CO = T.let( - :cm, + :co, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CN = + KM = T.let( - :cn, + :km, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CO = + CG = T.let( - :co, + :cg, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + CD = + T.let( + :cd, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + CK = + T.let( + :ck, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) CR = @@ -371,19 +441,19 @@ module BrandDev :cr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CU = + CI = T.let( - :cu, + :ci, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CV = + HR = T.let( - :cv, + :hr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - CX = + CU = T.let( - :cx, + :cu, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) CY = @@ -396,9 +466,9 @@ module BrandDev :cz, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - DE = + DK = T.let( - :de, + :dk, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) DJ = @@ -406,11 +476,6 @@ module BrandDev :dj, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - DK = - T.let( - :dk, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) DM = T.let( :dm, @@ -421,29 +486,24 @@ module BrandDev :do, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - DZ = - T.let( - :dz, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) EC = T.let( :ec, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - EE = + EG = T.let( - :ee, + :eg, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - EG = + SV = T.let( - :eg, + :sv, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - EH = + GQ = T.let( - :eh, + :gq, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) ER = @@ -451,9 +511,9 @@ module BrandDev :er, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - ES = + EE = T.let( - :es, + :ee, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) ET = @@ -461,9 +521,14 @@ module BrandDev :et, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - FI = + FK = T.let( - :fi, + :fk, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + FO = + T.let( + :fo, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) FJ = @@ -471,39 +536,39 @@ module BrandDev :fj, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - FK = + FI = T.let( - :fk, + :fi, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - FM = + FR = T.let( - :fm, + :fr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - FO = + GF = T.let( - :fo, + :gf, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - FR = + PF = T.let( - :fr, + :pf, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - GA = + TF = T.let( - :ga, + :tf, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - GB = + GA = T.let( - :gb, + :ga, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - GD = + GM = T.let( - :gd, + :gm, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) GE = @@ -511,9 +576,9 @@ module BrandDev :ge, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - GF = + DE = T.let( - :gf, + :de, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) GH = @@ -526,19 +591,19 @@ module BrandDev :gi, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - GL = + GR = T.let( - :gl, + :gr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - GM = + GL = T.let( - :gm, + :gl, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - GN = + GD = T.let( - :gn, + :gd, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) GP = @@ -546,19 +611,9 @@ module BrandDev :gp, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - GQ = - T.let( - :gq, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - GR = - T.let( - :gr, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - GS = + GU = T.let( - :gs, + :gu, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) GT = @@ -566,9 +621,9 @@ module BrandDev :gt, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - GU = + GN = T.let( - :gu, + :gn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) GW = @@ -581,9 +636,9 @@ module BrandDev :gy, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - HK = + HT = T.let( - :hk, + :ht, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) HM = @@ -591,19 +646,19 @@ module BrandDev :hm, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - HN = + VA = T.let( - :hn, + :va, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - HR = + HN = T.let( - :hr, + :hn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - HT = + HK = T.let( - :ht, + :hk, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) HU = @@ -611,29 +666,24 @@ module BrandDev :hu, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - ID = - T.let( - :id, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - IE = + IS = T.let( - :ie, + :is, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - IL = + IN = T.let( - :il, + :in, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - IN = + ID = T.let( - :in, + :id, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - IO = + IR = T.let( - :io, + :ir, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) IQ = @@ -641,14 +691,14 @@ module BrandDev :iq, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - IR = + IE = T.let( - :ir, + :ie, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - IS = + IL = T.let( - :is, + :il, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) IT = @@ -661,29 +711,24 @@ module BrandDev :jm, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - JO = - T.let( - :jo, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) JP = T.let( :jp, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - KE = + JO = T.let( - :ke, + :jo, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - KG = + KZ = T.let( - :kg, + :kz, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - KH = + KE = T.let( - :kh, + :ke, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) KI = @@ -691,16 +736,6 @@ module BrandDev :ki, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - KM = - T.let( - :km, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - KN = - T.let( - :kn, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) KP = T.let( :kp, @@ -716,14 +751,9 @@ module BrandDev :kw, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - KY = - T.let( - :ky, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - KZ = + KG = T.let( - :kz, + :kg, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) LA = @@ -731,34 +761,34 @@ module BrandDev :la, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - LB = + LV = T.let( - :lb, + :lv, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - LC = + LB = T.let( - :lc, + :lb, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - LI = + LS = T.let( - :li, + :ls, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - LK = + LR = T.let( - :lk, + :lr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - LR = + LY = T.let( - :lr, + :ly, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - LS = + LI = T.let( - :ls, + :li, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) LT = @@ -771,44 +801,34 @@ module BrandDev :lu, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - LV = - T.let( - :lv, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - LY = - T.let( - :ly, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - MA = + MO = T.let( - :ma, + :mo, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MC = + MK = T.let( - :mc, + :mk, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MD = + MG = T.let( - :md, + :mg, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MG = + MW = T.let( - :mg, + :mw, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MH = + MY = T.let( - :mh, + :my, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MK = + MV = T.let( - :mk, + :mv, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) ML = @@ -816,69 +836,69 @@ module BrandDev :ml, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MM = + MT = T.let( - :mm, + :mt, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MN = + MH = T.let( - :mn, + :mh, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MO = + MQ = T.let( - :mo, + :mq, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MP = + MR = T.let( - :mp, + :mr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MQ = + MU = T.let( - :mq, + :mu, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MR = + YT = T.let( - :mr, + :yt, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MS = + MX = T.let( - :ms, + :mx, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MT = + FM = T.let( - :mt, + :fm, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MU = + MD = T.let( - :mu, + :md, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MV = + MC = T.let( - :mv, + :mc, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MW = + MN = T.let( - :mw, + :mn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MX = + MS = T.let( - :mx, + :ms, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - MY = + MA = T.let( - :my, + :ma, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) MZ = @@ -886,54 +906,59 @@ module BrandDev :mz, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) + MM = + T.let( + :mm, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) NA = T.let( :na, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NC = + NR = T.let( - :nc, + :nr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NE = + NP = T.let( - :ne, + :np, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NF = + NL = T.let( - :nf, + :nl, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NG = + AN = T.let( - :ng, + :an, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NI = + NC = T.let( - :ni, + :nc, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NL = + NZ = T.let( - :nl, + :nz, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NO = + NI = T.let( - :no, + :ni, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NP = + NE = T.let( - :np, + :ne, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NR = + NG = T.let( - :nr, + :ng, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) NU = @@ -941,9 +966,19 @@ module BrandDev :nu, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - NZ = + NF = T.let( - :nz, + :nf, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + MP = + T.let( + :mp, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + NO = + T.let( + :no, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) OM = @@ -951,19 +986,24 @@ module BrandDev :om, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PA = + PK = T.let( - :pa, + :pk, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PE = + PW = T.let( - :pe, + :pw, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PF = + PS = T.let( - :pf, + :ps, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + PA = + T.let( + :pa, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) PG = @@ -971,14 +1011,24 @@ module BrandDev :pg, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) + PY = + T.let( + :py, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + PE = + T.let( + :pe, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) PH = T.let( :ph, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PK = + PN = T.let( - :pk, + :pn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) PL = @@ -986,69 +1036,79 @@ module BrandDev :pl, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PM = + PT = T.let( - :pm, + :pt, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PN = + PR = T.let( - :pn, + :pr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PR = + QA = T.let( - :pr, + :qa, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PS = + RE = T.let( - :ps, + :re, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PT = + RO = T.let( - :pt, + :ro, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PW = + RU = T.let( - :pw, + :ru, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - PY = + RW = T.let( - :py, + :rw, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - QA = + SH = T.let( - :qa, + :sh, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - RE = + KN = T.let( - :re, + :kn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - RO = + LC = T.let( - :ro, + :lc, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - RS = + PM = T.let( - :rs, + :pm, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - RU = + VC = T.let( - :ru, + :vc, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - RW = + WS = T.let( - :rw, + :ws, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + SM = + T.let( + :sm, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + ST = + T.let( + :st, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) SA = @@ -1056,24 +1116,24 @@ module BrandDev :sa, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SB = + SN = T.let( - :sb, + :sn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SC = + RS = T.let( - :sc, + :rs, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SD = + SC = T.let( - :sd, + :sc, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SE = + SL = T.let( - :se, + :sl, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) SG = @@ -1081,9 +1141,9 @@ module BrandDev :sg, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SH = + SK = T.let( - :sh, + :sk, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) SI = @@ -1091,34 +1151,39 @@ module BrandDev :si, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SJ = + SB = T.let( - :sj, + :sb, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SK = + SO = T.let( - :sk, + :so, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SL = + ZA = T.let( - :sl, + :za, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SM = + GS = T.let( - :sm, + :gs, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SN = + ES = T.let( - :sn, + :es, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SO = + LK = T.let( - :so, + :lk, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + SD = + T.let( + :sd, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) SR = @@ -1126,44 +1191,44 @@ module BrandDev :sr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - ST = + SJ = T.let( - :st, + :sj, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SV = + SZ = T.let( - :sv, + :sz, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SY = + SE = T.let( - :sy, + :se, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - SZ = + CH = T.let( - :sz, + :ch, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TC = + SY = T.let( - :tc, + :sy, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TD = + TW = T.let( - :td, + :tw, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TF = + TJ = T.let( - :tf, + :tj, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TG = + TZ = T.let( - :tg, + :tz, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) TH = @@ -1171,9 +1236,14 @@ module BrandDev :th, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TJ = + TL = T.let( - :tj, + :tl, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) + TG = + T.let( + :tg, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) TK = @@ -1181,14 +1251,14 @@ module BrandDev :tk, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TL = + TO = T.let( - :tl, + :to, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TM = + TT = T.let( - :tm, + :tt, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) TN = @@ -1196,34 +1266,29 @@ module BrandDev :tn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TO = - T.let( - :to, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) TR = T.let( :tr, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TT = + TM = T.let( - :tt, + :tm, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TV = + TC = T.let( - :tv, + :tc, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TW = + TV = T.let( - :tw, + :tv, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - TZ = + UG = T.let( - :tz, + :ug, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) UA = @@ -1231,14 +1296,14 @@ module BrandDev :ua, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - UG = + AE = T.let( - :ug, + :ae, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - UM = + GB = T.let( - :um, + :gb, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) US = @@ -1246,6 +1311,11 @@ module BrandDev :us, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) + UM = + T.let( + :um, + BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol + ) UY = T.let( :uy, @@ -1256,19 +1326,19 @@ module BrandDev :uz, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - VA = + VU = T.let( - :va, + :vu, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - VC = + VE = T.let( - :vc, + :ve, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - VE = + VN = T.let( - :ve, + :vn, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) VG = @@ -1281,24 +1351,14 @@ module BrandDev :vi, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - VN = - T.let( - :vn, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - VU = - T.let( - :vu, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) WF = T.let( :wf, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - WS = + EH = T.let( - :ws, + :eh, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) YE = @@ -1306,16 +1366,6 @@ module BrandDev :ye, BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol ) - YT = - T.let( - :yt, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) - ZA = - T.let( - :za, - BrandDev::BrandRetrieveByNameParams::CountryGl::TaggedSymbol - ) ZM = T.let( :zm, @@ -1338,7 +1388,7 @@ module BrandDev end end - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum @@ -1348,41 +1398,101 @@ module BrandDev end OrSymbol = T.type_alias { T.any(Symbol, String) } + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) ALBANIAN = T.let( :albanian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + AMHARIC = + T.let( + :amharic, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) ARABIC = T.let( :arabic, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + ARMENIAN = + T.let( + :armenian, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) AZERI = T.let( :azeri, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + BASQUE = + T.let( + :basque, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) BENGALI = T.let( :bengali, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) BULGARIAN = T.let( :bulgarian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + BURMESE = + T.let( + :burmese, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) CANTONESE = T.let( :cantonese, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + CATALAN = + T.let( + :catalan, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) CEBUANO = T.let( :cebuano, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + CHINESE = + T.let( + :chinese, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) CROATIAN = T.let( :croatian, @@ -1408,6 +1518,11 @@ module BrandDev :english, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) ESTONIAN = T.let( :estonian, @@ -1418,6 +1533,11 @@ module BrandDev :farsi, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + FIJIAN = + T.let( + :fijian, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) FINNISH = T.let( :finnish, @@ -1428,11 +1548,41 @@ module BrandDev :french, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + GALICIAN = + T.let( + :galician, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) GERMAN = T.let( :german, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + GREEK = + T.let( + :greek, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) HAUSA = T.let( :hausa, @@ -1443,11 +1593,21 @@ module BrandDev :hawaiian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + HEBREW = + T.let( + :hebrew, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) HINDI = T.let( :hindi, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + HMONG = + T.let( + :hmong, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) HUNGARIAN = T.let( :hungarian, @@ -1458,31 +1618,76 @@ module BrandDev :icelandic, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + IGBO = + T.let( + :igbo, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) INDONESIAN = T.let( :indonesian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + IRISH = + T.let( + :irish, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) ITALIAN = T.let( :italian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + JAPANESE = + T.let( + :japanese, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) KAZAKH = T.let( :kazakh, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + KHMER = + T.let( + :khmer, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) KOREAN = T.let( :korean, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + KURDISH = + T.let( + :kurdish, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) KYRGYZ = T.let( :kyrgyz, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + LAO = + T.let( + :lao, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) LATIN = T.let( :latin, @@ -1493,16 +1698,56 @@ module BrandDev :latvian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + LINGALA = + T.let( + :lingala, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) LITHUANIAN = T.let( :lithuanian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) MACEDONIAN = T.let( :macedonian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + MALAGASY = + T.let( + :malagasy, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) MONGOLIAN = T.let( :mongolian, @@ -1518,6 +1763,16 @@ module BrandDev :norwegian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + ODIA = + T.let( + :odia, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) PASHTO = T.let( :pashto, @@ -1538,6 +1793,16 @@ module BrandDev :portuguese, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + PUNJABI = + T.let( + :punjabi, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) ROMANIAN = T.let( :romanian, @@ -1548,11 +1813,41 @@ module BrandDev :russian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + SAMOAN = + T.let( + :samoan, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) SERBIAN = T.let( :serbian, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + SESOTHO = + T.let( + :sesotho, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) SLOVAK = T.let( :slovak, @@ -1573,6 +1868,11 @@ module BrandDev :spanish, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) SWAHILI = T.let( :swahili, @@ -1588,16 +1888,61 @@ module BrandDev :tagalog, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + TAJIK = + T.let( + :tajik, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) THAI = T.let( :thai, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + TIBETAN = + T.let( + :tibetan, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) TURKISH = T.let( :turkish, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + TURKMEN = + T.let( + :turkmen, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) UKRAINIAN = T.let( :ukrainian, @@ -1608,6 +1953,11 @@ module BrandDev :urdu, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + UYGHUR = + T.let( + :uyghur, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) UZBEK = T.let( :uzbek, @@ -1623,6 +1973,31 @@ module BrandDev :welsh, BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol ) + WOLOF = + T.let( + :wolof, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::BrandRetrieveByNameParams::ForceLanguage::TaggedSymbol + ) sig do override.returns( @@ -1634,6 +2009,46 @@ module BrandDev def self.values end end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandRetrieveByNameParams::MaxSpeed::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandRetrieveByNameParams::MaxSpeed::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandRetrieveByNameParams::MaxSpeed) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandRetrieveByNameParams::MaxSpeed::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandRetrieveByNameParams::MaxSpeed::TaggedSymbol + ) + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_by_name_response.rbi b/rbi/brand_dev/models/brand_retrieve_by_name_response.rbi index c9b9c4eb..a2cfc237 100644 --- a/rbi/brand_dev/models/brand_retrieve_by_name_response.rbi +++ b/rbi/brand_dev/models/brand_retrieve_by_name_response.rbi @@ -31,6 +31,23 @@ module BrandDev sig { params(code: Integer).void } attr_writer :code + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -42,6 +59,8 @@ module BrandDev params( brand: BrandDev::Models::BrandRetrieveByNameResponse::Brand::OrHash, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata::OrHash, status: String ).returns(T.attached_class) end @@ -50,6 +69,9 @@ module BrandDev brand: nil, # HTTP status code code: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil ) @@ -60,6 +82,8 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveByNameResponse::Brand, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata, status: String } ) @@ -231,6 +255,16 @@ module BrandDev sig { params(phone: String).void } attr_writer :phone + # Language to force for the retrieved brand data. + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ) + end + attr_accessor :primary_language + # The brand's slogan sig { returns(T.nilable(String)) } attr_reader :slogan @@ -312,6 +346,10 @@ module BrandDev BrandDev::Models::BrandRetrieveByNameResponse::Brand::Logo::OrHash ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::OrSymbol + ), slogan: String, socials: T::Array[ @@ -345,6 +383,8 @@ module BrandDev logos: nil, # Company phone number phone: nil, + # Language to force for the retrieved brand data. + primary_language: nil, # The brand's slogan slogan: nil, # An array of social media links for the brand @@ -383,6 +423,10 @@ module BrandDev BrandDev::Models::BrandRetrieveByNameResponse::Brand::Logo ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ), slogan: String, socials: T::Array[ @@ -1248,11 +1292,6 @@ module BrandDev :"Creator Economy & Influencer Platforms", BrandDev::Models::BrandRetrieveByNameResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) - ADVERTISING_ADTECH_MEDIA_BUYING = - T.let( - :"Advertising, Adtech & Media Buying", - BrandDev::Models::BrandRetrieveByNameResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol - ) FILM_TV_PRODUCTION_STUDIOS = T.let( :"Film, TV & Production Studios", @@ -1553,6 +1592,11 @@ module BrandDev :"News Publishing & Journalism", BrandDev::Models::BrandRetrieveByNameResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) + ADVERTISING_ADTECH_MEDIA_BUYING = + T.let( + :"Advertising, Adtech & Media Buying", + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol + ) DIGITAL_MEDIA_CONTENT_PLATFORMS = T.let( :"Digital Media & Content Platforms", @@ -2505,6 +2549,631 @@ module BrandDev end end + # Language to force for the retrieved brand data. + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ALBANIAN = + T.let( + :albanian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AMHARIC = + T.let( + :amharic, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARABIC = + T.let( + :arabic, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARMENIAN = + T.let( + :armenian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AZERI = + T.let( + :azeri, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BASQUE = + T.let( + :basque, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BENGALI = + T.let( + :bengali, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BULGARIAN = + T.let( + :bulgarian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BURMESE = + T.let( + :burmese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CANTONESE = + T.let( + :cantonese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CATALAN = + T.let( + :catalan, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CEBUANO = + T.let( + :cebuano, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CHINESE = + T.let( + :chinese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CROATIAN = + T.let( + :croatian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CZECH = + T.let( + :czech, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DANISH = + T.let( + :danish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DUTCH = + T.let( + :dutch, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ENGLISH = + T.let( + :english, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESTONIAN = + T.let( + :estonian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FARSI = + T.let( + :farsi, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FIJIAN = + T.let( + :fijian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FINNISH = + T.let( + :finnish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FRENCH = + T.let( + :french, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GALICIAN = + T.let( + :galician, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GERMAN = + T.let( + :german, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GREEK = + T.let( + :greek, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAUSA = + T.let( + :hausa, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAWAIIAN = + T.let( + :hawaiian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HEBREW = + T.let( + :hebrew, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HINDI = + T.let( + :hindi, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HMONG = + T.let( + :hmong, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HUNGARIAN = + T.let( + :hungarian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ICELANDIC = + T.let( + :icelandic, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IGBO = + T.let( + :igbo, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + INDONESIAN = + T.let( + :indonesian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IRISH = + T.let( + :irish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ITALIAN = + T.let( + :italian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAPANESE = + T.let( + :japanese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KAZAKH = + T.let( + :kazakh, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KHMER = + T.let( + :khmer, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KOREAN = + T.let( + :korean, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KURDISH = + T.let( + :kurdish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KYRGYZ = + T.let( + :kyrgyz, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LAO = + T.let( + :lao, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATIN = + T.let( + :latin, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATVIAN = + T.let( + :latvian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LINGALA = + T.let( + :lingala, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LITHUANIAN = + T.let( + :lithuanian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MACEDONIAN = + T.let( + :macedonian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAGASY = + T.let( + :malagasy, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MONGOLIAN = + T.let( + :mongolian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NEPALI = + T.let( + :nepali, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NORWEGIAN = + T.let( + :norwegian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ODIA = + T.let( + :odia, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PASHTO = + T.let( + :pashto, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PIDGIN = + T.let( + :pidgin, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + POLISH = + T.let( + :polish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PORTUGUESE = + T.let( + :portuguese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PUNJABI = + T.let( + :punjabi, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ROMANIAN = + T.let( + :romanian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + RUSSIAN = + T.let( + :russian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SAMOAN = + T.let( + :samoan, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SERBIAN = + T.let( + :serbian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SESOTHO = + T.let( + :sesotho, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVAK = + T.let( + :slovak, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVENE = + T.let( + :slovene, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SOMALI = + T.let( + :somali, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SPANISH = + T.let( + :spanish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWAHILI = + T.let( + :swahili, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWEDISH = + T.let( + :swedish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAGALOG = + T.let( + :tagalog, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAJIK = + T.let( + :tajik, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + THAI = + T.let( + :thai, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIBETAN = + T.let( + :tibetan, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKISH = + T.let( + :turkish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKMEN = + T.let( + :turkmen, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UKRAINIAN = + T.let( + :ukrainian, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + URDU = + T.let( + :urdu, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UYGHUR = + T.let( + :uyghur, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UZBEK = + T.let( + :uzbek, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + VIETNAMESE = + T.let( + :vietnamese, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WELSH = + T.let( + :welsh, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WOLOF = + T.let( + :wolof, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveByNameResponse::Brand::PrimaryLanguage::TaggedSymbol + ] + ) + end + def self.values + end + end + class Social < BrandDev::Internal::Type::BaseModel OrHash = T.type_alias do @@ -2514,11 +3183,22 @@ module BrandDev ) end - # Type of social media, e.g., 'facebook', 'twitter' - sig { returns(T.nilable(String)) } + # Type of social media platform + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + ) + end attr_reader :type - sig { params(type: String).void } + sig do + params( + type: + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::OrSymbol + ).void + end attr_writer :type # URL of the social media page @@ -2528,18 +3208,212 @@ module BrandDev sig { params(url: String).void } attr_writer :url - sig { params(type: String, url: String).returns(T.attached_class) } + sig do + params( + type: + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::OrSymbol, + url: String + ).returns(T.attached_class) + end def self.new( - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform type: nil, # URL of the social media page url: nil ) end - sig { override.returns({ type: String, url: String }) } + sig do + override.returns( + { + type: + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol, + url: String + } + ) + end def to_hash end + + # Type of social media platform + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + X = + T.let( + :x, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + FACEBOOK = + T.let( + :facebook, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + INSTAGRAM = + T.let( + :instagram, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + LINKEDIN = + T.let( + :linkedin, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + YOUTUBE = + T.let( + :youtube, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + PINTEREST = + T.let( + :pinterest, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + DRIBBBLE = + T.let( + :dribbble, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + GITHUB = + T.let( + :github, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + BEHANCE = + T.let( + :behance, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + SNAPCHAT = + T.let( + :snapchat, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + WHATSAPP = + T.let( + :whatsapp, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + TELEGRAM = + T.let( + :telegram, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + LINE = + T.let( + :line, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + DISCORD = + T.let( + :discord, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + TWITCH = + T.let( + :twitch, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + VIMEO = + T.let( + :vimeo, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + IMDB = + T.let( + :imdb, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + TUMBLR = + T.let( + :tumblr, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + FLICKR = + T.let( + :flickr, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + GIPHY = + T.let( + :giphy, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + MEDIUM = + T.let( + :medium, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + SPOTIFY = + T.let( + :spotify, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + SOUNDCLOUD = + T.let( + :soundcloud, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + TRIPADVISOR = + T.let( + :tripadvisor, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + YELP = + T.let( + :yelp, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + PRODUCTHUNT = + T.let( + :producthunt, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + REDDIT = + T.let( + :reddit, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + CRUNCHBASE = + T.let( + :crunchbase, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + APPSTORE = + T.let( + :appstore, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + PLAYSTORE = + T.let( + :playstore, + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::Type::TaggedSymbol + ] + ) + end + def self.values + end + end end class Stock < BrandDev::Internal::Type::BaseModel @@ -2583,6 +3457,47 @@ module BrandDev end end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_by_ticker_params.rbi b/rbi/brand_dev/models/brand_retrieve_by_ticker_params.rbi index addf9cc4..01470c4f 100644 --- a/rbi/brand_dev/models/brand_retrieve_by_ticker_params.rbi +++ b/rbi/brand_dev/models/brand_retrieve_by_ticker_params.rbi @@ -19,7 +19,7 @@ module BrandDev sig { returns(String) } attr_accessor :ticker - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. sig do returns( T.nilable( @@ -27,26 +27,51 @@ module BrandDev ) ) end - attr_reader :force_language + attr_accessor :force_language - sig do - params( - force_language: - BrandDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol - ).void - end - attr_writer :force_language + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandRetrieveByTickerParams::MaxSpeed::OrSymbol + ) + ) + ) + end attr_reader :max_speed - sig { params(max_speed: T::Boolean).void } + sig do + params( + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByTickerParams::MaxSpeed::OrSymbol + ) + ).void + end attr_writer :max_speed - # Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Stock exchange code. sig do returns( T.nilable( @@ -77,8 +102,16 @@ module BrandDev params( ticker: String, force_language: - BrandDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByTickerParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], ticker_exchange: BrandDev::BrandRetrieveByTickerParams::TickerExchange::OrSymbol, timeout_ms: Integer, @@ -89,13 +122,22 @@ module BrandDev # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). # Must be 1-15 characters, letters/numbers/dots only. ticker:, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. max_speed: nil, - # Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Stock exchange code. ticker_exchange: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -110,8 +152,16 @@ module BrandDev { ticker: String, force_language: - BrandDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByTickerParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], ticker_exchange: BrandDev::BrandRetrieveByTickerParams::TickerExchange::OrSymbol, timeout_ms: Integer, @@ -122,7 +172,7 @@ module BrandDev def to_hash end - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum @@ -132,41 +182,101 @@ module BrandDev end OrSymbol = T.type_alias { T.any(Symbol, String) } + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) ALBANIAN = T.let( :albanian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + AMHARIC = + T.let( + :amharic, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) ARABIC = T.let( :arabic, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + ARMENIAN = + T.let( + :armenian, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) AZERI = T.let( :azeri, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + BASQUE = + T.let( + :basque, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) BENGALI = T.let( :bengali, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) BULGARIAN = T.let( :bulgarian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + BURMESE = + T.let( + :burmese, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) CANTONESE = T.let( :cantonese, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + CATALAN = + T.let( + :catalan, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) CEBUANO = T.let( :cebuano, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + CHINESE = + T.let( + :chinese, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) CROATIAN = T.let( :croatian, @@ -192,6 +302,11 @@ module BrandDev :english, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) ESTONIAN = T.let( :estonian, @@ -202,6 +317,11 @@ module BrandDev :farsi, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + FIJIAN = + T.let( + :fijian, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) FINNISH = T.let( :finnish, @@ -212,11 +332,41 @@ module BrandDev :french, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + GALICIAN = + T.let( + :galician, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) GERMAN = T.let( :german, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + GREEK = + T.let( + :greek, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) HAUSA = T.let( :hausa, @@ -227,11 +377,21 @@ module BrandDev :hawaiian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + HEBREW = + T.let( + :hebrew, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) HINDI = T.let( :hindi, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + HMONG = + T.let( + :hmong, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) HUNGARIAN = T.let( :hungarian, @@ -242,31 +402,76 @@ module BrandDev :icelandic, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + IGBO = + T.let( + :igbo, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) INDONESIAN = T.let( :indonesian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + IRISH = + T.let( + :irish, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) ITALIAN = T.let( :italian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + JAPANESE = + T.let( + :japanese, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) KAZAKH = T.let( :kazakh, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + KHMER = + T.let( + :khmer, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) KOREAN = T.let( :korean, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + KURDISH = + T.let( + :kurdish, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) KYRGYZ = T.let( :kyrgyz, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + LAO = + T.let( + :lao, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) LATIN = T.let( :latin, @@ -277,16 +482,56 @@ module BrandDev :latvian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + LINGALA = + T.let( + :lingala, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) LITHUANIAN = T.let( :lithuanian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) MACEDONIAN = T.let( :macedonian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + MALAGASY = + T.let( + :malagasy, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) MONGOLIAN = T.let( :mongolian, @@ -302,6 +547,16 @@ module BrandDev :norwegian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + ODIA = + T.let( + :odia, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) PASHTO = T.let( :pashto, @@ -322,6 +577,16 @@ module BrandDev :portuguese, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + PUNJABI = + T.let( + :punjabi, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) ROMANIAN = T.let( :romanian, @@ -332,11 +597,41 @@ module BrandDev :russian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + SAMOAN = + T.let( + :samoan, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) SERBIAN = T.let( :serbian, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + SESOTHO = + T.let( + :sesotho, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) SLOVAK = T.let( :slovak, @@ -357,6 +652,11 @@ module BrandDev :spanish, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) SWAHILI = T.let( :swahili, @@ -372,16 +672,61 @@ module BrandDev :tagalog, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + TAJIK = + T.let( + :tajik, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) THAI = T.let( :thai, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + TIBETAN = + T.let( + :tibetan, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) TURKISH = T.let( :turkish, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + TURKMEN = + T.let( + :turkmen, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) UKRAINIAN = T.let( :ukrainian, @@ -392,6 +737,11 @@ module BrandDev :urdu, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + UYGHUR = + T.let( + :uyghur, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) UZBEK = T.let( :uzbek, @@ -407,6 +757,31 @@ module BrandDev :welsh, BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol ) + WOLOF = + T.let( + :wolof, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::TaggedSymbol + ) sig do override.returns( @@ -419,7 +794,47 @@ module BrandDev end end - # Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandRetrieveByTickerParams::MaxSpeed::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandRetrieveByTickerParams::MaxSpeed::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandRetrieveByTickerParams::MaxSpeed) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandRetrieveByTickerParams::MaxSpeed::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandRetrieveByTickerParams::MaxSpeed::TaggedSymbol + ) + end + + # Stock exchange code. module TickerExchange extend BrandDev::Internal::Type::Enum diff --git a/rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi b/rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi index e7f80c0a..fc270927 100644 --- a/rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi +++ b/rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi @@ -33,6 +33,25 @@ module BrandDev sig { params(code: Integer).void } attr_writer :code + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata + ) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -44,6 +63,8 @@ module BrandDev params( brand: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::OrHash, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata::OrHash, status: String ).returns(T.attached_class) end @@ -52,6 +73,9 @@ module BrandDev brand: nil, # HTTP status code code: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil ) @@ -62,6 +86,8 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveByTickerResponse::Brand, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata, status: String } ) @@ -233,6 +259,16 @@ module BrandDev sig { params(phone: String).void } attr_writer :phone + # Language to force for the retrieved brand data. + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ) + end + attr_accessor :primary_language + # The brand's slogan sig { returns(T.nilable(String)) } attr_reader :slogan @@ -314,6 +350,10 @@ module BrandDev BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Logo::OrHash ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::OrSymbol + ), slogan: String, socials: T::Array[ @@ -347,6 +387,8 @@ module BrandDev logos: nil, # Company phone number phone: nil, + # Language to force for the retrieved brand data. + primary_language: nil, # The brand's slogan slogan: nil, # An array of social media links for the brand @@ -385,6 +427,10 @@ module BrandDev BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Logo ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ), slogan: String, socials: T::Array[ @@ -1250,11 +1296,6 @@ module BrandDev :"Creator Economy & Influencer Platforms", BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) - ADVERTISING_ADTECH_MEDIA_BUYING = - T.let( - :"Advertising, Adtech & Media Buying", - BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol - ) FILM_TV_PRODUCTION_STUDIOS = T.let( :"Film, TV & Production Studios", @@ -1555,6 +1596,11 @@ module BrandDev :"News Publishing & Journalism", BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) + ADVERTISING_ADTECH_MEDIA_BUYING = + T.let( + :"Advertising, Adtech & Media Buying", + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol + ) DIGITAL_MEDIA_CONTENT_PLATFORMS = T.let( :"Digital Media & Content Platforms", @@ -2507,6 +2553,631 @@ module BrandDev end end + # Language to force for the retrieved brand data. + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ALBANIAN = + T.let( + :albanian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AMHARIC = + T.let( + :amharic, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARABIC = + T.let( + :arabic, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARMENIAN = + T.let( + :armenian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AZERI = + T.let( + :azeri, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BASQUE = + T.let( + :basque, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BENGALI = + T.let( + :bengali, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BULGARIAN = + T.let( + :bulgarian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BURMESE = + T.let( + :burmese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CANTONESE = + T.let( + :cantonese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CATALAN = + T.let( + :catalan, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CEBUANO = + T.let( + :cebuano, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CHINESE = + T.let( + :chinese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CROATIAN = + T.let( + :croatian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CZECH = + T.let( + :czech, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DANISH = + T.let( + :danish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DUTCH = + T.let( + :dutch, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ENGLISH = + T.let( + :english, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESTONIAN = + T.let( + :estonian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FARSI = + T.let( + :farsi, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FIJIAN = + T.let( + :fijian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FINNISH = + T.let( + :finnish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FRENCH = + T.let( + :french, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GALICIAN = + T.let( + :galician, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GERMAN = + T.let( + :german, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GREEK = + T.let( + :greek, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAUSA = + T.let( + :hausa, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAWAIIAN = + T.let( + :hawaiian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HEBREW = + T.let( + :hebrew, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HINDI = + T.let( + :hindi, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HMONG = + T.let( + :hmong, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HUNGARIAN = + T.let( + :hungarian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ICELANDIC = + T.let( + :icelandic, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IGBO = + T.let( + :igbo, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + INDONESIAN = + T.let( + :indonesian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IRISH = + T.let( + :irish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ITALIAN = + T.let( + :italian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAPANESE = + T.let( + :japanese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KAZAKH = + T.let( + :kazakh, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KHMER = + T.let( + :khmer, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KOREAN = + T.let( + :korean, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KURDISH = + T.let( + :kurdish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KYRGYZ = + T.let( + :kyrgyz, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LAO = + T.let( + :lao, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATIN = + T.let( + :latin, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATVIAN = + T.let( + :latvian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LINGALA = + T.let( + :lingala, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LITHUANIAN = + T.let( + :lithuanian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MACEDONIAN = + T.let( + :macedonian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAGASY = + T.let( + :malagasy, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MONGOLIAN = + T.let( + :mongolian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NEPALI = + T.let( + :nepali, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NORWEGIAN = + T.let( + :norwegian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ODIA = + T.let( + :odia, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PASHTO = + T.let( + :pashto, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PIDGIN = + T.let( + :pidgin, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + POLISH = + T.let( + :polish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PORTUGUESE = + T.let( + :portuguese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PUNJABI = + T.let( + :punjabi, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ROMANIAN = + T.let( + :romanian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + RUSSIAN = + T.let( + :russian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SAMOAN = + T.let( + :samoan, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SERBIAN = + T.let( + :serbian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SESOTHO = + T.let( + :sesotho, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVAK = + T.let( + :slovak, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVENE = + T.let( + :slovene, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SOMALI = + T.let( + :somali, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SPANISH = + T.let( + :spanish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWAHILI = + T.let( + :swahili, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWEDISH = + T.let( + :swedish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAGALOG = + T.let( + :tagalog, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAJIK = + T.let( + :tajik, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + THAI = + T.let( + :thai, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIBETAN = + T.let( + :tibetan, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKISH = + T.let( + :turkish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKMEN = + T.let( + :turkmen, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UKRAINIAN = + T.let( + :ukrainian, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + URDU = + T.let( + :urdu, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UYGHUR = + T.let( + :uyghur, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UZBEK = + T.let( + :uzbek, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + VIETNAMESE = + T.let( + :vietnamese, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WELSH = + T.let( + :welsh, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WOLOF = + T.let( + :wolof, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::PrimaryLanguage::TaggedSymbol + ] + ) + end + def self.values + end + end + class Social < BrandDev::Internal::Type::BaseModel OrHash = T.type_alias do @@ -2516,11 +3187,22 @@ module BrandDev ) end - # Type of social media, e.g., 'facebook', 'twitter' - sig { returns(T.nilable(String)) } + # Type of social media platform + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + ) + end attr_reader :type - sig { params(type: String).void } + sig do + params( + type: + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::OrSymbol + ).void + end attr_writer :type # URL of the social media page @@ -2530,18 +3212,212 @@ module BrandDev sig { params(url: String).void } attr_writer :url - sig { params(type: String, url: String).returns(T.attached_class) } + sig do + params( + type: + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::OrSymbol, + url: String + ).returns(T.attached_class) + end def self.new( - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform type: nil, # URL of the social media page url: nil ) end - sig { override.returns({ type: String, url: String }) } + sig do + override.returns( + { + type: + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol, + url: String + } + ) + end def to_hash end + + # Type of social media platform + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + X = + T.let( + :x, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + FACEBOOK = + T.let( + :facebook, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + INSTAGRAM = + T.let( + :instagram, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + LINKEDIN = + T.let( + :linkedin, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + YOUTUBE = + T.let( + :youtube, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + PINTEREST = + T.let( + :pinterest, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + DRIBBBLE = + T.let( + :dribbble, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + GITHUB = + T.let( + :github, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + BEHANCE = + T.let( + :behance, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + SNAPCHAT = + T.let( + :snapchat, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + WHATSAPP = + T.let( + :whatsapp, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + TELEGRAM = + T.let( + :telegram, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + LINE = + T.let( + :line, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + DISCORD = + T.let( + :discord, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + TWITCH = + T.let( + :twitch, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + VIMEO = + T.let( + :vimeo, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + IMDB = + T.let( + :imdb, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + TUMBLR = + T.let( + :tumblr, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + FLICKR = + T.let( + :flickr, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + GIPHY = + T.let( + :giphy, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + MEDIUM = + T.let( + :medium, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + SPOTIFY = + T.let( + :spotify, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + SOUNDCLOUD = + T.let( + :soundcloud, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + TRIPADVISOR = + T.let( + :tripadvisor, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + YELP = + T.let( + :yelp, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + PRODUCTHUNT = + T.let( + :producthunt, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + REDDIT = + T.let( + :reddit, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + CRUNCHBASE = + T.let( + :crunchbase, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + APPSTORE = + T.let( + :appstore, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + PLAYSTORE = + T.let( + :playstore, + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::Type::TaggedSymbol + ] + ) + end + def self.values + end + end end class Stock < BrandDev::Internal::Type::BaseModel @@ -2585,6 +3461,47 @@ module BrandDev end end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_naics_params.rbi b/rbi/brand_dev/models/brand_retrieve_naics_params.rbi index 7659cff8..f09da839 100644 --- a/rbi/brand_dev/models/brand_retrieve_naics_params.rbi +++ b/rbi/brand_dev/models/brand_retrieve_naics_params.rbi @@ -11,9 +11,9 @@ module BrandDev T.any(BrandDev::BrandRetrieveNaicsParams, BrandDev::Internal::AnyHash) end - # Brand domain or title to retrieve NAICS code for. If a valid domain is provided - # in `input`, it will be used for classification, otherwise, we will search for - # the brand using the provided title. + # Brand domain or title to retrieve NAICS code for. If a valid domain is provided, + # it will be used for classification, otherwise, we will search for the brand + # using the provided title. sig { returns(String) } attr_accessor :input @@ -32,6 +32,15 @@ module BrandDev sig { params(min_results: Integer).void } attr_writer :min_results + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -46,20 +55,25 @@ module BrandDev input: String, max_results: Integer, min_results: Integer, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( - # Brand domain or title to retrieve NAICS code for. If a valid domain is provided - # in `input`, it will be used for classification, otherwise, we will search for - # the brand using the provided title. + # Brand domain or title to retrieve NAICS code for. If a valid domain is provided, + # it will be used for classification, otherwise, we will search for the brand + # using the provided title. input:, # Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults # to 5. max_results: nil, # Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1. min_results: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -74,6 +88,7 @@ module BrandDev input: String, max_results: Integer, min_results: Integer, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/rbi/brand_dev/models/brand_retrieve_naics_response.rbi b/rbi/brand_dev/models/brand_retrieve_naics_response.rbi index 4af6011c..780d917e 100644 --- a/rbi/brand_dev/models/brand_retrieve_naics_response.rbi +++ b/rbi/brand_dev/models/brand_retrieve_naics_response.rbi @@ -36,6 +36,23 @@ module BrandDev sig { params(domain: String).void } attr_writer :domain + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -57,6 +74,8 @@ module BrandDev BrandDev::Models::BrandRetrieveNaicsResponse::Code::OrHash ], domain: String, + key_metadata: + BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata::OrHash, status: String, type: String ).returns(T.attached_class) @@ -66,6 +85,9 @@ module BrandDev codes: nil, # Domain found for the brand domain: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil, # Industry classification type, for naics api it will be `naics` @@ -78,6 +100,8 @@ module BrandDev { codes: T::Array[BrandDev::Models::BrandRetrieveNaicsResponse::Code], domain: String, + key_metadata: + BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata, status: String, type: String } @@ -182,6 +206,47 @@ module BrandDev end end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_params.rbi b/rbi/brand_dev/models/brand_retrieve_params.rbi index 49194fff..f17dd5ea 100644 --- a/rbi/brand_dev/models/brand_retrieve_params.rbi +++ b/rbi/brand_dev/models/brand_retrieve_params.rbi @@ -13,34 +13,88 @@ module BrandDev # Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). # Cannot be used with name or ticker parameters. - sig { returns(String) } - attr_accessor :domain + sig { returns(T.nilable(String)) } + attr_reader :domain - # Optional parameter to force the language of the retrieved brand data. Works with - # all three lookup methods. + sig { params(domain: String).void } + attr_writer :domain + + # Language to force for the retrieved brand data. sig do returns( T.nilable(BrandDev::BrandRetrieveParams::ForceLanguage::OrSymbol) ) end - attr_reader :force_language + attr_accessor :force_language - sig do - params( - force_language: BrandDev::BrandRetrieveParams::ForceLanguage::OrSymbol - ).void - end - attr_writer :force_language + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. Works with all three lookup methods. - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any(T::Boolean, BrandDev::BrandRetrieveParams::MaxSpeed::OrSymbol) + ) + ) + end attr_reader :max_speed - sig { params(max_speed: T::Boolean).void } + sig do + params( + max_speed: + T.any(T::Boolean, BrandDev::BrandRetrieveParams::MaxSpeed::OrSymbol) + ).void + end attr_writer :max_speed + # Company name to retrieve brand data for (e.g., 'Apple Inc'). Cannot be used with + # domain or ticker parameters. + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL'). Cannot be used + # with domain or name parameters. + sig { returns(T.nilable(String)) } + attr_reader :ticker + + sig { params(ticker: String).void } + attr_writer :ticker + + # Stock exchange code. + sig do + returns( + T.nilable(BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol) + ) + end + attr_reader :ticker_exchange + + sig do + params( + ticker_exchange: + BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol + ).void + end + attr_writer :ticker_exchange + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -54,8 +108,18 @@ module BrandDev params( domain: String, force_language: - BrandDev::BrandRetrieveParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable(BrandDev::BrandRetrieveParams::ForceLanguage::OrSymbol), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveParams::MaxSpeed::OrSymbol + ), + name: String, + tags: T::Array[String], + ticker: String, + ticker_exchange: + BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol, timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -63,14 +127,30 @@ module BrandDev def self.new( # Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). # Cannot be used with name or ticker parameters. - domain:, - # Optional parameter to force the language of the retrieved brand data. Works with - # all three lookup methods. + domain: nil, + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. Works with all three lookup methods. max_speed: nil, + # Company name to retrieve brand data for (e.g., 'Apple Inc'). Cannot be used with + # domain or ticker parameters. + name: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL'). Cannot be used + # with domain or name parameters. + ticker: nil, + # Stock exchange code. + ticker_exchange: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -84,8 +164,18 @@ module BrandDev { domain: String, force_language: - BrandDev::BrandRetrieveParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable(BrandDev::BrandRetrieveParams::ForceLanguage::OrSymbol), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveParams::MaxSpeed::OrSymbol + ), + name: String, + tags: T::Array[String], + ticker: String, + ticker_exchange: + BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol, timeout_ms: Integer, request_options: BrandDev::RequestOptions } @@ -94,8 +184,7 @@ module BrandDev def to_hash end - # Optional parameter to force the language of the retrieved brand data. Works with - # all three lookup methods. + # Language to force for the retrieved brand data. module ForceLanguage extend BrandDev::Internal::Type::Enum @@ -105,41 +194,101 @@ module BrandDev end OrSymbol = T.type_alias { T.any(Symbol, String) } + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) ALBANIAN = T.let( :albanian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + AMHARIC = + T.let( + :amharic, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) ARABIC = T.let( :arabic, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + ARMENIAN = + T.let( + :armenian, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) AZERI = T.let( :azeri, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + BASQUE = + T.let( + :basque, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) BENGALI = T.let( :bengali, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) BULGARIAN = T.let( :bulgarian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + BURMESE = + T.let( + :burmese, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) CANTONESE = T.let( :cantonese, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + CATALAN = + T.let( + :catalan, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) CEBUANO = T.let( :cebuano, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + CHINESE = + T.let( + :chinese, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) CROATIAN = T.let( :croatian, @@ -165,6 +314,11 @@ module BrandDev :english, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) ESTONIAN = T.let( :estonian, @@ -175,6 +329,11 @@ module BrandDev :farsi, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + FIJIAN = + T.let( + :fijian, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) FINNISH = T.let( :finnish, @@ -185,11 +344,41 @@ module BrandDev :french, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + GALICIAN = + T.let( + :galician, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) GERMAN = T.let( :german, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + GREEK = + T.let( + :greek, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) HAUSA = T.let( :hausa, @@ -200,11 +389,21 @@ module BrandDev :hawaiian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + HEBREW = + T.let( + :hebrew, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) HINDI = T.let( :hindi, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + HMONG = + T.let( + :hmong, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) HUNGARIAN = T.let( :hungarian, @@ -215,31 +414,76 @@ module BrandDev :icelandic, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + IGBO = + T.let( + :igbo, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) INDONESIAN = T.let( :indonesian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + IRISH = + T.let( + :irish, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) ITALIAN = T.let( :italian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + JAPANESE = + T.let( + :japanese, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) KAZAKH = T.let( :kazakh, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + KHMER = + T.let( + :khmer, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) KOREAN = T.let( :korean, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + KURDISH = + T.let( + :kurdish, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) KYRGYZ = T.let( :kyrgyz, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + LAO = + T.let( + :lao, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) LATIN = T.let( :latin, @@ -250,16 +494,56 @@ module BrandDev :latvian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + LINGALA = + T.let( + :lingala, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) LITHUANIAN = T.let( :lithuanian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) MACEDONIAN = T.let( :macedonian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + MALAGASY = + T.let( + :malagasy, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) MONGOLIAN = T.let( :mongolian, @@ -275,6 +559,16 @@ module BrandDev :norwegian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + ODIA = + T.let( + :odia, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) PASHTO = T.let( :pashto, @@ -295,6 +589,16 @@ module BrandDev :portuguese, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + PUNJABI = + T.let( + :punjabi, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) ROMANIAN = T.let( :romanian, @@ -305,11 +609,41 @@ module BrandDev :russian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + SAMOAN = + T.let( + :samoan, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) SERBIAN = T.let( :serbian, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + SESOTHO = + T.let( + :sesotho, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) SLOVAK = T.let( :slovak, @@ -330,6 +664,11 @@ module BrandDev :spanish, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) SWAHILI = T.let( :swahili, @@ -345,16 +684,61 @@ module BrandDev :tagalog, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + TAJIK = + T.let( + :tajik, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) THAI = T.let( :thai, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + TIBETAN = + T.let( + :tibetan, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) TURKISH = T.let( :turkish, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + TURKMEN = + T.let( + :turkmen, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) UKRAINIAN = T.let( :ukrainian, @@ -365,6 +749,11 @@ module BrandDev :urdu, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + UYGHUR = + T.let( + :uyghur, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) UZBEK = T.let( :uzbek, @@ -380,6 +769,31 @@ module BrandDev :welsh, BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol ) + WOLOF = + T.let( + :wolof, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::BrandRetrieveParams::ForceLanguage::TaggedSymbol + ) sig do override.returns( @@ -389,6 +803,422 @@ module BrandDev def self.values end end + + # Optional parameter to optimize the API call for maximum speed. When set to true, + # the API will skip time-consuming operations for faster response at the cost of + # less comprehensive data. Works with all three lookup methods. + module MaxSpeed + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandRetrieveParams::MaxSpeed::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandRetrieveParams::MaxSpeed::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandRetrieveParams::MaxSpeed) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let(:true, BrandDev::BrandRetrieveParams::MaxSpeed::TaggedSymbol) + FALSE = + T.let(:false, BrandDev::BrandRetrieveParams::MaxSpeed::TaggedSymbol) + end + + # Stock exchange code. + module TickerExchange + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandRetrieveParams::TickerExchange) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AMEX = + T.let( + :AMEX, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + AMS = + T.let( + :AMS, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + AQS = + T.let( + :AQS, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + ASX = + T.let( + :ASX, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + ATH = + T.let( + :ATH, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + BER = + T.let( + :BER, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + BME = + T.let( + :BME, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + BRU = + T.let( + :BRU, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + BSE = + T.let( + :BSE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + BUD = + T.let( + :BUD, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + BUE = + T.let( + :BUE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + BVC = + T.let( + :BVC, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + CBOE = + T.let( + :CBOE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + CNQ = + T.let( + :CNQ, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + CPH = + T.let( + :CPH, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + DFM = + T.let( + :DFM, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + DOH = + T.let( + :DOH, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + DUB = + T.let( + :DUB, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + DUS = + T.let( + :DUS, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + DXE = + T.let( + :DXE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + EGX = + T.let( + :EGX, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + FSX = + T.let( + :FSX, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + HAM = + T.let( + :HAM, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + HEL = + T.let( + :HEL, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + HKSE = + T.let( + :HKSE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + HOSE = + T.let( + :HOSE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + ICE = + T.let( + :ICE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + IOB = + T.let( + :IOB, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + IST = + T.let( + :IST, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + JKT = + T.let( + :JKT, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + JNB = + T.let( + :JNB, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + JPX = + T.let( + :JPX, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + KLS = + T.let( + :KLS, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + KOE = + T.let( + :KOE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + KSC = + T.let( + :KSC, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + KUW = + T.let( + :KUW, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + LIS = + T.let( + :LIS, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + LSE = + T.let( + :LSE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + MCX = + T.let( + :MCX, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + MEX = + T.let( + :MEX, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + MIL = + T.let( + :MIL, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + MUN = + T.let( + :MUN, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + NASDAQ = + T.let( + :NASDAQ, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + NEO = + T.let( + :NEO, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + NSE = + T.let( + :NSE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + NYSE = + T.let( + :NYSE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + NZE = + T.let( + :NZE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + OSL = + T.let( + :OSL, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + OTC = + T.let( + :OTC, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + PAR = + T.let( + :PAR, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + PNK = + T.let( + :PNK, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + PRA = + T.let( + :PRA, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + RIS = + T.let( + :RIS, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + SAO = + T.let( + :SAO, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + SAU = + T.let( + :SAU, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + SES = + T.let( + :SES, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + SET = + T.let( + :SET, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + SGO = + T.let( + :SGO, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + SHH = + T.let( + :SHH, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + SHZ = + T.let( + :SHZ, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + SIX = + T.let( + :SIX, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + STO = + T.let( + :STO, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + STU = + T.let( + :STU, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + TAI = + T.let( + :TAI, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + TAL = + T.let( + :TAL, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + TLV = + T.let( + :TLV, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + TSX = + T.let( + :TSX, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + TSXV = + T.let( + :TSXV, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + TWO = + T.let( + :TWO, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + VIE = + T.let( + :VIE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + WSE = + T.let( + :WSE, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + XETRA = + T.let( + :XETRA, + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::BrandRetrieveParams::TickerExchange::TaggedSymbol + ] + ) + end + def self.values + end + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_response.rbi b/rbi/brand_dev/models/brand_retrieve_response.rbi index 89c59033..ea870977 100644 --- a/rbi/brand_dev/models/brand_retrieve_response.rbi +++ b/rbi/brand_dev/models/brand_retrieve_response.rbi @@ -29,6 +29,21 @@ module BrandDev sig { params(code: Integer).void } attr_writer :code + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns(T.nilable(BrandDev::Models::BrandRetrieveResponse::KeyMetadata)) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandRetrieveResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -40,6 +55,8 @@ module BrandDev params( brand: BrandDev::Models::BrandRetrieveResponse::Brand::OrHash, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveResponse::KeyMetadata::OrHash, status: String ).returns(T.attached_class) end @@ -48,6 +65,9 @@ module BrandDev brand: nil, # HTTP status code code: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil ) @@ -58,6 +78,7 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveResponse::KeyMetadata, status: String } ) @@ -218,6 +239,16 @@ module BrandDev sig { params(phone: String).void } attr_writer :phone + # Language to force for the retrieved brand data. + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ) + end + attr_accessor :primary_language + # The brand's slogan sig { returns(T.nilable(String)) } attr_reader :slogan @@ -294,6 +325,10 @@ module BrandDev BrandDev::Models::BrandRetrieveResponse::Brand::Logo::OrHash ], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::OrSymbol + ), slogan: String, socials: T::Array[ @@ -327,6 +362,8 @@ module BrandDev logos: nil, # Company phone number phone: nil, + # Language to force for the retrieved brand data. + primary_language: nil, # The brand's slogan slogan: nil, # An array of social media links for the brand @@ -359,6 +396,10 @@ module BrandDev logos: T::Array[BrandDev::Models::BrandRetrieveResponse::Brand::Logo], phone: String, + primary_language: + T.nilable( + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ), slogan: String, socials: T::Array[ @@ -1223,11 +1264,6 @@ module BrandDev :"Creator Economy & Influencer Platforms", BrandDev::Models::BrandRetrieveResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) - ADVERTISING_ADTECH_MEDIA_BUYING = - T.let( - :"Advertising, Adtech & Media Buying", - BrandDev::Models::BrandRetrieveResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol - ) FILM_TV_PRODUCTION_STUDIOS = T.let( :"Film, TV & Production Studios", @@ -1528,6 +1564,11 @@ module BrandDev :"News Publishing & Journalism", BrandDev::Models::BrandRetrieveResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol ) + ADVERTISING_ADTECH_MEDIA_BUYING = + T.let( + :"Advertising, Adtech & Media Buying", + BrandDev::Models::BrandRetrieveResponse::Brand::Industries::Eic::Subindustry::TaggedSymbol + ) DIGITAL_MEDIA_CONTENT_PLATFORMS = T.let( :"Digital Media & Content Platforms", @@ -2480,6 +2521,631 @@ module BrandDev end end + # Language to force for the retrieved brand data. + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AFRIKAANS = + T.let( + :afrikaans, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ALBANIAN = + T.let( + :albanian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AMHARIC = + T.let( + :amharic, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARABIC = + T.let( + :arabic, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ARMENIAN = + T.let( + :armenian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ASSAMESE = + T.let( + :assamese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AYMARA = + T.let( + :aymara, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + AZERI = + T.let( + :azeri, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BASQUE = + T.let( + :basque, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BELARUSIAN = + T.let( + :belarusian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BENGALI = + T.let( + :bengali, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BOSNIAN = + T.let( + :bosnian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BULGARIAN = + T.let( + :bulgarian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + BURMESE = + T.let( + :burmese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CANTONESE = + T.let( + :cantonese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CATALAN = + T.let( + :catalan, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CEBUANO = + T.let( + :cebuano, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CHINESE = + T.let( + :chinese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CORSICAN = + T.let( + :corsican, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CROATIAN = + T.let( + :croatian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + CZECH = + T.let( + :czech, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DANISH = + T.let( + :danish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + DUTCH = + T.let( + :dutch, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ENGLISH = + T.let( + :english, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESPERANTO = + T.let( + :esperanto, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ESTONIAN = + T.let( + :estonian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FARSI = + T.let( + :farsi, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FIJIAN = + T.let( + :fijian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FINNISH = + T.let( + :finnish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + FRENCH = + T.let( + :french, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GALICIAN = + T.let( + :galician, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GEORGIAN = + T.let( + :georgian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GERMAN = + T.let( + :german, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GREEK = + T.let( + :greek, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUARANI = + T.let( + :guarani, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + GUJARATI = + T.let( + :gujarati, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAITIAN_CREOLE = + T.let( + :"haitian-creole", + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAUSA = + T.let( + :hausa, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HAWAIIAN = + T.let( + :hawaiian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HEBREW = + T.let( + :hebrew, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HINDI = + T.let( + :hindi, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HMONG = + T.let( + :hmong, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + HUNGARIAN = + T.let( + :hungarian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ICELANDIC = + T.let( + :icelandic, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IGBO = + T.let( + :igbo, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + INDONESIAN = + T.let( + :indonesian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + IRISH = + T.let( + :irish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ITALIAN = + T.let( + :italian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAPANESE = + T.let( + :japanese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + JAVANESE = + T.let( + :javanese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KANNADA = + T.let( + :kannada, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KAZAKH = + T.let( + :kazakh, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KHMER = + T.let( + :khmer, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KINYARWANDA = + T.let( + :kinyarwanda, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KOREAN = + T.let( + :korean, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KURDISH = + T.let( + :kurdish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + KYRGYZ = + T.let( + :kyrgyz, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LAO = + T.let( + :lao, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATIN = + T.let( + :latin, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LATVIAN = + T.let( + :latvian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LINGALA = + T.let( + :lingala, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LITHUANIAN = + T.let( + :lithuanian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + LUXEMBOURGISH = + T.let( + :luxembourgish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MACEDONIAN = + T.let( + :macedonian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAGASY = + T.let( + :malagasy, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAY = + T.let( + :malay, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALAYALAM = + T.let( + :malayalam, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MALTESE = + T.let( + :maltese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MAORI = + T.let( + :maori, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MARATHI = + T.let( + :marathi, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + MONGOLIAN = + T.let( + :mongolian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NEPALI = + T.let( + :nepali, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + NORWEGIAN = + T.let( + :norwegian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ODIA = + T.let( + :odia, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + OROMO = + T.let( + :oromo, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PASHTO = + T.let( + :pashto, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PIDGIN = + T.let( + :pidgin, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + POLISH = + T.let( + :polish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PORTUGUESE = + T.let( + :portuguese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + PUNJABI = + T.let( + :punjabi, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + QUECHUA = + T.let( + :quechua, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ROMANIAN = + T.let( + :romanian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + RUSSIAN = + T.let( + :russian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SAMOAN = + T.let( + :samoan, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SCOTTISH_GAELIC = + T.let( + :"scottish-gaelic", + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SERBIAN = + T.let( + :serbian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SESOTHO = + T.let( + :sesotho, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SHONA = + T.let( + :shona, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINDHI = + T.let( + :sindhi, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SINHALA = + T.let( + :sinhala, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVAK = + T.let( + :slovak, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SLOVENE = + T.let( + :slovene, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SOMALI = + T.let( + :somali, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SPANISH = + T.let( + :spanish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SUNDANESE = + T.let( + :sundanese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWAHILI = + T.let( + :swahili, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + SWEDISH = + T.let( + :swedish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAGALOG = + T.let( + :tagalog, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAJIK = + T.let( + :tajik, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TAMIL = + T.let( + :tamil, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TATAR = + T.let( + :tatar, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TELUGU = + T.let( + :telugu, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + THAI = + T.let( + :thai, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIBETAN = + T.let( + :tibetan, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TIGRINYA = + T.let( + :tigrinya, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TONGAN = + T.let( + :tongan, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TSWANA = + T.let( + :tswana, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKISH = + T.let( + :turkish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + TURKMEN = + T.let( + :turkmen, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UKRAINIAN = + T.let( + :ukrainian, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + URDU = + T.let( + :urdu, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UYGHUR = + T.let( + :uyghur, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + UZBEK = + T.let( + :uzbek, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + VIETNAMESE = + T.let( + :vietnamese, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WELSH = + T.let( + :welsh, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + WOLOF = + T.let( + :wolof, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + XHOSA = + T.let( + :xhosa, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YIDDISH = + T.let( + :yiddish, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + YORUBA = + T.let( + :yoruba, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + ZULU = + T.let( + :zulu, + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveResponse::Brand::PrimaryLanguage::TaggedSymbol + ] + ) + end + def self.values + end + end + class Social < BrandDev::Internal::Type::BaseModel OrHash = T.type_alias do @@ -2489,11 +3155,22 @@ module BrandDev ) end - # Type of social media, e.g., 'facebook', 'twitter' - sig { returns(T.nilable(String)) } + # Type of social media platform + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + ) + end attr_reader :type - sig { params(type: String).void } + sig do + params( + type: + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::OrSymbol + ).void + end attr_writer :type # URL of the social media page @@ -2503,18 +3180,212 @@ module BrandDev sig { params(url: String).void } attr_writer :url - sig { params(type: String, url: String).returns(T.attached_class) } + sig do + params( + type: + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::OrSymbol, + url: String + ).returns(T.attached_class) + end def self.new( - # Type of social media, e.g., 'facebook', 'twitter' + # Type of social media platform type: nil, # URL of the social media page url: nil ) end - sig { override.returns({ type: String, url: String }) } + sig do + override.returns( + { + type: + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol, + url: String + } + ) + end def to_hash end + + # Type of social media platform + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + X = + T.let( + :x, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + FACEBOOK = + T.let( + :facebook, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + INSTAGRAM = + T.let( + :instagram, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + LINKEDIN = + T.let( + :linkedin, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + YOUTUBE = + T.let( + :youtube, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + PINTEREST = + T.let( + :pinterest, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + DRIBBBLE = + T.let( + :dribbble, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + GITHUB = + T.let( + :github, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + BEHANCE = + T.let( + :behance, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + SNAPCHAT = + T.let( + :snapchat, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + WHATSAPP = + T.let( + :whatsapp, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + TELEGRAM = + T.let( + :telegram, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + LINE = + T.let( + :line, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + DISCORD = + T.let( + :discord, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + TWITCH = + T.let( + :twitch, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + VIMEO = + T.let( + :vimeo, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + IMDB = + T.let( + :imdb, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + TUMBLR = + T.let( + :tumblr, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + FLICKR = + T.let( + :flickr, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + GIPHY = + T.let( + :giphy, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + MEDIUM = + T.let( + :medium, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + SPOTIFY = + T.let( + :spotify, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + SOUNDCLOUD = + T.let( + :soundcloud, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + TRIPADVISOR = + T.let( + :tripadvisor, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + YELP = + T.let( + :yelp, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + PRODUCTHUNT = + T.let( + :producthunt, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + REDDIT = + T.let( + :reddit, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + CRUNCHBASE = + T.let( + :crunchbase, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + APPSTORE = + T.let( + :appstore, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + PLAYSTORE = + T.let( + :playstore, + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandRetrieveResponse::Brand::Social::Type::TaggedSymbol + ] + ) + end + def self.values + end + end end class Stock < BrandDev::Internal::Type::BaseModel @@ -2558,6 +3429,47 @@ module BrandDev end end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandRetrieveResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_simplified_params.rbi b/rbi/brand_dev/models/brand_retrieve_simplified_params.rbi index 25da4293..5c807152 100644 --- a/rbi/brand_dev/models/brand_retrieve_simplified_params.rbi +++ b/rbi/brand_dev/models/brand_retrieve_simplified_params.rbi @@ -18,6 +18,37 @@ module BrandDev sig { returns(String) } attr_accessor :domain + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms + + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Optional theme preference used when selecting brand assets. + sig do + returns( + T.nilable(BrandDev::BrandRetrieveSimplifiedParams::Theme::OrSymbol) + ) + end + attr_reader :theme + + sig do + params( + theme: BrandDev::BrandRetrieveSimplifiedParams::Theme::OrSymbol + ).void + end + attr_writer :theme + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -30,6 +61,9 @@ module BrandDev sig do params( domain: String, + max_age_ms: T.nilable(Integer), + tags: T::Array[String], + theme: BrandDev::BrandRetrieveSimplifiedParams::Theme::OrSymbol, timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -37,6 +71,17 @@ module BrandDev def self.new( # Domain name to retrieve simplified brand data for domain:, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional theme preference used when selecting brand assets. + theme: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -49,6 +94,9 @@ module BrandDev override.returns( { domain: String, + max_age_ms: T.nilable(Integer), + tags: T::Array[String], + theme: BrandDev::BrandRetrieveSimplifiedParams::Theme::OrSymbol, timeout_ms: Integer, request_options: BrandDev::RequestOptions } @@ -56,6 +104,38 @@ module BrandDev end def to_hash end + + # Optional theme preference used when selecting brand assets. + module Theme + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandRetrieveSimplifiedParams::Theme) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LIGHT = + T.let( + :light, + BrandDev::BrandRetrieveSimplifiedParams::Theme::TaggedSymbol + ) + DARK = + T.let( + :dark, + BrandDev::BrandRetrieveSimplifiedParams::Theme::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::BrandRetrieveSimplifiedParams::Theme::TaggedSymbol + ] + ) + end + def self.values + end + end end end end diff --git a/rbi/brand_dev/models/brand_retrieve_simplified_response.rbi b/rbi/brand_dev/models/brand_retrieve_simplified_response.rbi index fa582fda..a52b2b58 100644 --- a/rbi/brand_dev/models/brand_retrieve_simplified_response.rbi +++ b/rbi/brand_dev/models/brand_retrieve_simplified_response.rbi @@ -34,6 +34,25 @@ module BrandDev sig { params(code: Integer).void } attr_writer :code + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable( + BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata + ) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -46,6 +65,8 @@ module BrandDev brand: BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::OrHash, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata::OrHash, status: String ).returns(T.attached_class) end @@ -54,6 +75,9 @@ module BrandDev brand: nil, # HTTP status code of the response code: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil ) @@ -64,6 +88,8 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand, code: Integer, + key_metadata: + BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata, status: String } ) @@ -758,6 +784,47 @@ module BrandDev end end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_screenshot_params.rbi b/rbi/brand_dev/models/brand_screenshot_params.rbi index 73a42ec7..cabdadf3 100644 --- a/rbi/brand_dev/models/brand_screenshot_params.rbi +++ b/rbi/brand_dev/models/brand_screenshot_params.rbi @@ -11,10 +11,51 @@ module BrandDev T.any(BrandDev::BrandScreenshotParams, BrandDev::Internal::AnyHash) end + # Optional parameter to choose the site's visual theme in the screenshot. Use + # 'light' or 'dark' when the site offers both appearances. + sig do + returns( + T.nilable(BrandDev::BrandScreenshotParams::ColorScheme::OrSymbol) + ) + end + attr_reader :color_scheme + + sig do + params( + color_scheme: BrandDev::BrandScreenshotParams::ColorScheme::OrSymbol + ).void + end + attr_writer :color_scheme + + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + sig do + returns(T.nilable(BrandDev::BrandScreenshotParams::Country::OrSymbol)) + end + attr_reader :country + + sig do + params(country: BrandDev::BrandScreenshotParams::Country::OrSymbol).void + end + attr_writer :country + + # A specific URL to screenshot directly, bypassing domain resolution (e.g., + # 'https://example.com/pricing'). When provided, the screenshot is taken of this + # exact URL. You must provide either 'domain' or 'directUrl', but not both. + sig { returns(T.nilable(String)) } + attr_reader :direct_url + + sig { params(direct_url: String).void } + attr_writer :direct_url + # Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. - sig { returns(String) } - attr_accessor :domain + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. + sig { returns(T.nilable(String)) } + attr_reader :domain + + sig { params(domain: String).void } + attr_writer :domain # Optional parameter to determine screenshot type. If 'true', takes a full page # screenshot capturing all content. If 'false' or not provided, takes a viewport @@ -34,10 +75,43 @@ module BrandDev end attr_writer :full_screenshot + # Optional parameter to control cookie/consent popup handling. If 'true', we + # dismiss cookie banner before capture. If 'false' or not provided, captures the + # page without that step. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandScreenshotParams::HandleCookiePopup::OrSymbol + ) + ) + ) + end + attr_reader :handle_cookie_popup + + sig do + params( + handle_cookie_popup: + T.any( + T::Boolean, + BrandDev::BrandScreenshotParams::HandleCookiePopup::OrSymbol + ) + ).void + end + attr_writer :handle_cookie_popup + + # Return a cached screenshot if a prior screenshot for the same parameters exists + # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms + # Optional parameter to specify which page type to screenshot. If provided, the # system will scrape the domain's links and use heuristics to find the most # appropriate URL for the specified page type (30 supported languages). If not - # provided, screenshots the main domain landing page. + # provided, screenshots the main domain landing page. Only applicable when using + # 'domain', not 'directUrl'. sig do returns(T.nilable(BrandDev::BrandScreenshotParams::Page::OrSymbol)) end @@ -46,50 +120,141 @@ module BrandDev sig { params(page: BrandDev::BrandScreenshotParams::Page::OrSymbol).void } attr_writer :page - # Optional parameter to prioritize screenshot capture. If 'speed', optimizes for - # faster capture with basic quality. If 'quality', optimizes for higher quality - # with longer wait times. Defaults to 'quality' if not provided. - sig do - returns( - T.nilable(BrandDev::BrandScreenshotParams::Prioritize::OrSymbol) - ) - end - attr_reader :prioritize + # Optional vertical scroll offset in pixels for capturing a long page in + # viewport-sized chunks. When provided, the full page is captured once and the + # returned image is the viewport-sized slice that begins at this Y offset (e.g. + # request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page + # top to bottom). The final slice may be shorter than the viewport height. Takes + # precedence over fullScreenshot. Max: 100000. + sig { returns(T.nilable(Integer)) } + attr_accessor :scroll_offset + + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + sig { returns(T.nilable(Integer)) } + attr_reader :timeout_ms + + sig { params(timeout_ms: Integer).void } + attr_writer :timeout_ms + + # Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080. + sig { returns(T.nilable(BrandDev::BrandScreenshotParams::Viewport)) } + attr_reader :viewport sig do - params( - prioritize: BrandDev::BrandScreenshotParams::Prioritize::OrSymbol - ).void + params(viewport: BrandDev::BrandScreenshotParams::Viewport::OrHash).void end - attr_writer :prioritize + attr_writer :viewport + + # Optional browser wait time in milliseconds after initial page load before taking + # the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when + # omitted. + sig { returns(T.nilable(Integer)) } + attr_accessor :wait_for_ms + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + sig { returns(T.nilable(BrandDev::BrandScreenshotParams::Zdr::OrSymbol)) } + attr_reader :zdr + + sig { params(zdr: BrandDev::BrandScreenshotParams::Zdr::OrSymbol).void } + attr_writer :zdr sig do params( + color_scheme: BrandDev::BrandScreenshotParams::ColorScheme::OrSymbol, + country: BrandDev::BrandScreenshotParams::Country::OrSymbol, + direct_url: String, domain: String, full_screenshot: BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol, + handle_cookie_popup: + T.any( + T::Boolean, + BrandDev::BrandScreenshotParams::HandleCookiePopup::OrSymbol + ), + max_age_ms: T.nilable(Integer), page: BrandDev::BrandScreenshotParams::Page::OrSymbol, - prioritize: BrandDev::BrandScreenshotParams::Prioritize::OrSymbol, + scroll_offset: T.nilable(Integer), + tags: T::Array[String], + timeout_ms: Integer, + viewport: BrandDev::BrandScreenshotParams::Viewport::OrHash, + wait_for_ms: T.nilable(Integer), + zdr: BrandDev::BrandScreenshotParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # Optional parameter to choose the site's visual theme in the screenshot. Use + # 'light' or 'dark' when the site offers both appearances. + color_scheme: nil, + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + country: nil, + # A specific URL to screenshot directly, bypassing domain resolution (e.g., + # 'https://example.com/pricing'). When provided, the screenshot is taken of this + # exact URL. You must provide either 'domain' or 'directUrl', but not both. + direct_url: nil, # Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. - domain:, + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. + domain: nil, # Optional parameter to determine screenshot type. If 'true', takes a full page # screenshot capturing all content. If 'false' or not provided, takes a viewport # screenshot (standard browser view). full_screenshot: nil, + # Optional parameter to control cookie/consent popup handling. If 'true', we + # dismiss cookie banner before capture. If 'false' or not provided, captures the + # page without that step. + handle_cookie_popup: nil, + # Return a cached screenshot if a prior screenshot for the same parameters exists + # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh. + max_age_ms: nil, # Optional parameter to specify which page type to screenshot. If provided, the # system will scrape the domain's links and use heuristics to find the most # appropriate URL for the specified page type (30 supported languages). If not - # provided, screenshots the main domain landing page. + # provided, screenshots the main domain landing page. Only applicable when using + # 'domain', not 'directUrl'. page: nil, - # Optional parameter to prioritize screenshot capture. If 'speed', optimizes for - # faster capture with basic quality. If 'quality', optimizes for higher quality - # with longer wait times. Defaults to 'quality' if not provided. - prioritize: nil, + # Optional vertical scroll offset in pixels for capturing a long page in + # viewport-sized chunks. When provided, the full page is captured once and the + # returned image is the viewport-sized slice that begins at this Y offset (e.g. + # request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page + # top to bottom). The final slice may be shorter than the viewport height. Takes + # precedence over fullScreenshot. Max: 100000. + scroll_offset: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, + # Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080. + viewport: nil, + # Optional browser wait time in milliseconds after initial page load before taking + # the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when + # omitted. + wait_for_ms: nil, + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + zdr: nil, request_options: {} ) end @@ -97,11 +262,26 @@ module BrandDev sig do override.returns( { + color_scheme: + BrandDev::BrandScreenshotParams::ColorScheme::OrSymbol, + country: BrandDev::BrandScreenshotParams::Country::OrSymbol, + direct_url: String, domain: String, full_screenshot: BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol, + handle_cookie_popup: + T.any( + T::Boolean, + BrandDev::BrandScreenshotParams::HandleCookiePopup::OrSymbol + ), + max_age_ms: T.nilable(Integer), page: BrandDev::BrandScreenshotParams::Page::OrSymbol, - prioritize: BrandDev::BrandScreenshotParams::Prioritize::OrSymbol, + scroll_offset: T.nilable(Integer), + tags: T::Array[String], + timeout_ms: Integer, + viewport: BrandDev::BrandScreenshotParams::Viewport, + wait_for_ms: T.nilable(Integer), + zdr: BrandDev::BrandScreenshotParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions } ) @@ -109,6 +289,262 @@ module BrandDev def to_hash end + # Optional parameter to choose the site's visual theme in the screenshot. Use + # 'light' or 'dark' when the site offers both appearances. + module ColorScheme + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandScreenshotParams::ColorScheme) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LIGHT = + T.let( + :light, + BrandDev::BrandScreenshotParams::ColorScheme::TaggedSymbol + ) + DARK = + T.let( + :dark, + BrandDev::BrandScreenshotParams::ColorScheme::TaggedSymbol + ) + + sig do + override.returns( + T::Array[BrandDev::BrandScreenshotParams::ColorScheme::TaggedSymbol] + ) + end + def self.values + end + end + + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + module Country + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandScreenshotParams::Country) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AD = T.let(:ad, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AE = T.let(:ae, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AF = T.let(:af, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AG = T.let(:ag, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AI = T.let(:ai, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AL = T.let(:al, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AM = T.let(:am, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AO = T.let(:ao, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AR = T.let(:ar, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AT = T.let(:at, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AU = T.let(:au, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AW = T.let(:aw, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + AZ = T.let(:az, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BA = T.let(:ba, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BB = T.let(:bb, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BD = T.let(:bd, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BE = T.let(:be, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BF = T.let(:bf, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BG = T.let(:bg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BH = T.let(:bh, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BI = T.let(:bi, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BJ = T.let(:bj, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BM = T.let(:bm, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BN = T.let(:bn, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BO = T.let(:bo, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BQ = T.let(:bq, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BR = T.let(:br, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BS = T.let(:bs, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BW = T.let(:bw, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BY = T.let(:by, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + BZ = T.let(:bz, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CA = T.let(:ca, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CD = T.let(:cd, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CF = T.let(:cf, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CG = T.let(:cg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CH = T.let(:ch, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CI = T.let(:ci, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CL = T.let(:cl, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CM = T.let(:cm, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CN = T.let(:cn, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CO = T.let(:co, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CR = T.let(:cr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CV = T.let(:cv, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CW = T.let(:cw, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CY = T.let(:cy, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + CZ = T.let(:cz, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + DE = T.let(:de, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + DJ = T.let(:dj, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + DK = T.let(:dk, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + DM = T.let(:dm, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + DO = T.let(:do, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + DZ = T.let(:dz, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + EC = T.let(:ec, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + EE = T.let(:ee, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + EG = T.let(:eg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + ES = T.let(:es, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + ET = T.let(:et, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + FI = T.let(:fi, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + FJ = T.let(:fj, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + FR = T.let(:fr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GA = T.let(:ga, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GB = T.let(:gb, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GD = T.let(:gd, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GE = T.let(:ge, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GF = T.let(:gf, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GG = T.let(:gg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GH = T.let(:gh, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GM = T.let(:gm, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GN = T.let(:gn, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GP = T.let(:gp, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GQ = T.let(:gq, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GR = T.let(:gr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GT = T.let(:gt, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GU = T.let(:gu, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GW = T.let(:gw, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + GY = T.let(:gy, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + HK = T.let(:hk, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + HN = T.let(:hn, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + HR = T.let(:hr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + HT = T.let(:ht, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + HU = T.let(:hu, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + ID = T.let(:id, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + IE = T.let(:ie, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + IL = T.let(:il, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + IM = T.let(:im, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + IN = T.let(:in, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + IQ = T.let(:iq, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + IR = T.let(:ir, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + IS = T.let(:is, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + IT = T.let(:it, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + JE = T.let(:je, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + JM = T.let(:jm, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + JO = T.let(:jo, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + JP = T.let(:jp, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + KE = T.let(:ke, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + KG = T.let(:kg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + KH = T.let(:kh, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + KN = T.let(:kn, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + KR = T.let(:kr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + KW = T.let(:kw, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + KY = T.let(:ky, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + KZ = T.let(:kz, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LA = T.let(:la, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LB = T.let(:lb, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LC = T.let(:lc, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LK = T.let(:lk, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LR = T.let(:lr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LS = T.let(:ls, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LT = T.let(:lt, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LU = T.let(:lu, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LV = T.let(:lv, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + LY = T.let(:ly, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MA = T.let(:ma, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MC = T.let(:mc, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MD = T.let(:md, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + ME = T.let(:me, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MF = T.let(:mf, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MG = T.let(:mg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MK = T.let(:mk, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + ML = T.let(:ml, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MM = T.let(:mm, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MN = T.let(:mn, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MO = T.let(:mo, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MQ = T.let(:mq, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MR = T.let(:mr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MT = T.let(:mt, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MU = T.let(:mu, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MV = T.let(:mv, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MW = T.let(:mw, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MX = T.let(:mx, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MY = T.let(:my, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + MZ = T.let(:mz, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + NA = T.let(:na, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + NC = T.let(:nc, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + NE = T.let(:ne, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + NG = T.let(:ng, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + NI = T.let(:ni, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + NL = T.let(:nl, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + NO = T.let(:no, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + NP = T.let(:np, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + NZ = T.let(:nz, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + OM = T.let(:om, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PA = T.let(:pa, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PE = T.let(:pe, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PF = T.let(:pf, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PG = T.let(:pg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PH = T.let(:ph, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PK = T.let(:pk, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PL = T.let(:pl, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PR = T.let(:pr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PS = T.let(:ps, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PT = T.let(:pt, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + PY = T.let(:py, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + QA = T.let(:qa, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + RE = T.let(:re, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + RO = T.let(:ro, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + RS = T.let(:rs, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + RU = T.let(:ru, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + RW = T.let(:rw, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SA = T.let(:sa, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SC = T.let(:sc, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SD = T.let(:sd, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SE = T.let(:se, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SG = T.let(:sg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SI = T.let(:si, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SK = T.let(:sk, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SL = T.let(:sl, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SM = T.let(:sm, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SN = T.let(:sn, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SO = T.let(:so, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SR = T.let(:sr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SS = T.let(:ss, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + ST = T.let(:st, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SV = T.let(:sv, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SX = T.let(:sx, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SY = T.let(:sy, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + SZ = T.let(:sz, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TC = T.let(:tc, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TD = T.let(:td, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TG = T.let(:tg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TH = T.let(:th, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TJ = T.let(:tj, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TL = T.let(:tl, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TM = T.let(:tm, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TN = T.let(:tn, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TR = T.let(:tr, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TT = T.let(:tt, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TW = T.let(:tw, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + TZ = T.let(:tz, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + UA = T.let(:ua, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + UG = T.let(:ug, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + US = T.let(:us, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + UY = T.let(:uy, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + UZ = T.let(:uz, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + VC = T.let(:vc, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + VE = T.let(:ve, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + VG = T.let(:vg, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + VI = T.let(:vi, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + VN = T.let(:vn, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + YE = T.let(:ye, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + YT = T.let(:yt, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + ZA = T.let(:za, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + ZM = T.let(:zm, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + ZW = T.let(:zw, BrandDev::BrandScreenshotParams::Country::TaggedSymbol) + + sig do + override.returns( + T::Array[BrandDev::BrandScreenshotParams::Country::TaggedSymbol] + ) + end + def self.values + end + end + # Optional parameter to determine screenshot type. If 'true', takes a full page # screenshot capturing all content. If 'false' or not provided, takes a viewport # screenshot (standard browser view). @@ -143,10 +579,53 @@ module BrandDev end end + # Optional parameter to control cookie/consent popup handling. If 'true', we + # dismiss cookie banner before capture. If 'false' or not provided, captures the + # page without that step. + module HandleCookiePopup + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandScreenshotParams::HandleCookiePopup::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandScreenshotParams::HandleCookiePopup::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandScreenshotParams::HandleCookiePopup) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandScreenshotParams::HandleCookiePopup::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandScreenshotParams::HandleCookiePopup::TaggedSymbol + ) + end + # Optional parameter to specify which page type to screenshot. If provided, the # system will scrape the domain's links and use heuristics to find the most # appropriate URL for the specified page type (30 supported languages). If not - # provided, screenshots the main domain landing page. + # provided, screenshots the main domain landing page. Only applicable when using + # 'domain', not 'directUrl'. module Page extend BrandDev::Internal::Type::Enum @@ -179,32 +658,65 @@ module BrandDev end end - # Optional parameter to prioritize screenshot capture. If 'speed', optimizes for - # faster capture with basic quality. If 'quality', optimizes for higher quality - # with longer wait times. Defaults to 'quality' if not provided. - module Prioritize + class Viewport < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandScreenshotParams::Viewport, + BrandDev::Internal::AnyHash + ) + end + + # Viewport height in pixels. + sig { returns(T.nilable(Integer)) } + attr_reader :height + + sig { params(height: Integer).void } + attr_writer :height + + # Viewport width in pixels. + sig { returns(T.nilable(Integer)) } + attr_reader :width + + sig { params(width: Integer).void } + attr_writer :width + + # Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080. + sig do + params(height: Integer, width: Integer).returns(T.attached_class) + end + def self.new( + # Viewport height in pixels. + height: nil, + # Viewport width in pixels. + width: nil + ) + end + + sig { override.returns({ height: Integer, width: Integer }) } + def to_hash + end + end + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + module Zdr extend BrandDev::Internal::Type::Enum TaggedSymbol = - T.type_alias do - T.all(Symbol, BrandDev::BrandScreenshotParams::Prioritize) - end + T.type_alias { T.all(Symbol, BrandDev::BrandScreenshotParams::Zdr) } OrSymbol = T.type_alias { T.any(Symbol, String) } - SPEED = - T.let( - :speed, - BrandDev::BrandScreenshotParams::Prioritize::TaggedSymbol - ) - QUALITY = - T.let( - :quality, - BrandDev::BrandScreenshotParams::Prioritize::TaggedSymbol - ) + ENABLED = + T.let(:enabled, BrandDev::BrandScreenshotParams::Zdr::TaggedSymbol) + DISABLED = + T.let(:disabled, BrandDev::BrandScreenshotParams::Zdr::TaggedSymbol) sig do override.returns( - T::Array[BrandDev::BrandScreenshotParams::Prioritize::TaggedSymbol] + T::Array[BrandDev::BrandScreenshotParams::Zdr::TaggedSymbol] ) end def self.values diff --git a/rbi/brand_dev/models/brand_screenshot_response.rbi b/rbi/brand_dev/models/brand_screenshot_response.rbi index 8e20c388..45bc72f5 100644 --- a/rbi/brand_dev/models/brand_screenshot_response.rbi +++ b/rbi/brand_dev/models/brand_screenshot_response.rbi @@ -25,7 +25,32 @@ module BrandDev sig { params(domain: String).void } attr_writer :domain - # Public URL of the uploaded screenshot image + # Height in pixels of the returned screenshot image + sig { returns(T.nilable(Integer)) } + attr_reader :height + + sig { params(height: Integer).void } + attr_writer :height + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandScreenshotResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandScreenshotResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + + # Public image URL for standard requests, or an in-memory data URL when ZDR is + # enabled. sig { returns(T.nilable(String)) } attr_reader :screenshot @@ -57,14 +82,25 @@ module BrandDev sig { params(status: String).void } attr_writer :status + # Width in pixels of the returned screenshot image + sig { returns(T.nilable(Integer)) } + attr_reader :width + + sig { params(width: Integer).void } + attr_writer :width + sig do params( code: Integer, domain: String, + height: Integer, + key_metadata: + BrandDev::Models::BrandScreenshotResponse::KeyMetadata::OrHash, screenshot: String, screenshot_type: BrandDev::Models::BrandScreenshotResponse::ScreenshotType::OrSymbol, - status: String + status: String, + width: Integer ).returns(T.attached_class) end def self.new( @@ -72,12 +108,20 @@ module BrandDev code: nil, # The normalized domain that was processed domain: nil, - # Public URL of the uploaded screenshot image + # Height in pixels of the returned screenshot image + height: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, + # Public image URL for standard requests, or an in-memory data URL when ZDR is + # enabled. screenshot: nil, # Type of screenshot that was captured screenshot_type: nil, # Status of the response, e.g., 'ok' - status: nil + status: nil, + # Width in pixels of the returned screenshot image + width: nil ) end @@ -86,16 +130,61 @@ module BrandDev { code: Integer, domain: String, + height: Integer, + key_metadata: + BrandDev::Models::BrandScreenshotResponse::KeyMetadata, screenshot: String, screenshot_type: BrandDev::Models::BrandScreenshotResponse::ScreenshotType::TaggedSymbol, - status: String + status: String, + width: Integer } ) end def to_hash end + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandScreenshotResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end + # Type of screenshot that was captured module ScreenshotType extend BrandDev::Internal::Type::Enum diff --git a/rbi/brand_dev/models/brand_styleguide_params.rbi b/rbi/brand_dev/models/brand_styleguide_params.rbi index d38bf669..9398416a 100644 --- a/rbi/brand_dev/models/brand_styleguide_params.rbi +++ b/rbi/brand_dev/models/brand_styleguide_params.rbi @@ -11,8 +11,26 @@ module BrandDev T.any(BrandDev::BrandStyleguideParams, BrandDev::Internal::AnyHash) end + # Optional browser color scheme to emulate for websites that respond to + # prefers-color-scheme. This value is part of the styleguide cache key. + sig do + returns( + T.nilable(BrandDev::BrandStyleguideParams::ColorScheme::OrSymbol) + ) + end + attr_reader :color_scheme + + sig do + params( + color_scheme: BrandDev::BrandStyleguideParams::ColorScheme::OrSymbol + ).void + end + attr_writer :color_scheme + # A specific URL to fetch the styleguide from directly, bypassing domain - # resolution (e.g., 'https://example.com/design-system'). + # resolution (e.g., 'https://example.com/design-system'). When provided, the + # styleguide is extracted from this exact URL. You must provide either 'domain' or + # 'directUrl', but not both. sig { returns(T.nilable(String)) } attr_reader :direct_url @@ -20,13 +38,30 @@ module BrandDev attr_writer :direct_url # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. sig { returns(T.nilable(String)) } attr_reader :domain sig { params(domain: String).void } attr_writer :domain + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms + + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -38,19 +73,37 @@ module BrandDev sig do params( + color_scheme: BrandDev::BrandStyleguideParams::ColorScheme::OrSymbol, direct_url: String, domain: String, + max_age_ms: T.nilable(Integer), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # Optional browser color scheme to emulate for websites that respond to + # prefers-color-scheme. This value is part of the styleguide cache key. + color_scheme: nil, # A specific URL to fetch the styleguide from directly, bypassing domain - # resolution (e.g., 'https://example.com/design-system'). + # resolution (e.g., 'https://example.com/design-system'). When provided, the + # styleguide is extracted from this exact URL. You must provide either 'domain' or + # 'directUrl', but not both. direct_url: nil, # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. domain: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -62,8 +115,12 @@ module BrandDev sig do override.returns( { + color_scheme: + BrandDev::BrandStyleguideParams::ColorScheme::OrSymbol, direct_url: String, domain: String, + max_age_ms: T.nilable(Integer), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } @@ -71,6 +128,37 @@ module BrandDev end def to_hash end + + # Optional browser color scheme to emulate for websites that respond to + # prefers-color-scheme. This value is part of the styleguide cache key. + module ColorScheme + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandStyleguideParams::ColorScheme) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LIGHT = + T.let( + :light, + BrandDev::BrandStyleguideParams::ColorScheme::TaggedSymbol + ) + DARK = + T.let( + :dark, + BrandDev::BrandStyleguideParams::ColorScheme::TaggedSymbol + ) + + sig do + override.returns( + T::Array[BrandDev::BrandStyleguideParams::ColorScheme::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/rbi/brand_dev/models/brand_styleguide_response.rbi b/rbi/brand_dev/models/brand_styleguide_response.rbi index 7b8bfda0..b191abd9 100644 --- a/rbi/brand_dev/models/brand_styleguide_response.rbi +++ b/rbi/brand_dev/models/brand_styleguide_response.rbi @@ -25,6 +25,23 @@ module BrandDev sig { params(domain: String).void } attr_writer :domain + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandStyleguideResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandStyleguideResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + # Status of the response, e.g., 'ok' sig { returns(T.nilable(String)) } attr_reader :status @@ -52,6 +69,8 @@ module BrandDev params( code: Integer, domain: String, + key_metadata: + BrandDev::Models::BrandStyleguideResponse::KeyMetadata::OrHash, status: String, styleguide: BrandDev::Models::BrandStyleguideResponse::Styleguide::OrHash @@ -62,6 +81,9 @@ module BrandDev code: nil, # The normalized domain that was processed domain: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil, # Status of the response, e.g., 'ok' status: nil, # Comprehensive styleguide data extracted from the website @@ -74,6 +96,8 @@ module BrandDev { code: Integer, domain: String, + key_metadata: + BrandDev::Models::BrandStyleguideResponse::KeyMetadata, status: String, styleguide: BrandDev::Models::BrandStyleguideResponse::Styleguide } @@ -82,6 +106,47 @@ module BrandDev def to_hash end + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandStyleguideResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end + class Styleguide < BrandDev::Internal::Type::BaseModel OrHash = T.type_alias do @@ -137,6 +202,19 @@ module BrandDev end attr_writer :element_spacing + # Font assets keyed by family name as it appears in fontFamily/fontFallbacks + # (non-generic names only). Clients match typography.fontFamily / fontWeight or + # button styles to pick a file URL from files. + sig do + returns( + T::Hash[ + Symbol, + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink + ] + ) + end + attr_accessor :font_links + # The primary color mode of the website design sig do returns( @@ -186,6 +264,11 @@ module BrandDev BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::OrHash, element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing::OrHash, + font_links: + T::Hash[ + Symbol, + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::OrHash + ], mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode::OrSymbol, shadows: @@ -201,6 +284,10 @@ module BrandDev components:, # Spacing system used on the website element_spacing:, + # Font assets keyed by family name as it appears in fontFamily/fontFallbacks + # (non-generic names only). Clients match typography.fontFamily / fontWeight or + # button styles to pick a file URL from files. + font_links:, # The primary color mode of the website design mode:, # Shadow styles used on the website @@ -219,6 +306,11 @@ module BrandDev BrandDev::Models::BrandStyleguideResponse::Styleguide::Components, element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing, + font_links: + T::Hash[ + Symbol, + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink + ], mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode::TaggedSymbol, shadows: @@ -1043,6 +1135,117 @@ module BrandDev end end + class FontLink < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink, + BrandDev::Internal::AnyHash + ) + end + + # Upright font files keyed by weight string (e.g. "400" for regular, "500", + # "700"). Values are absolute URLs. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :files + + sig do + returns( + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Google Fonts category when type is google (e.g. sans-serif, serif, monospace, + # display, handwriting). Omitted for custom fonts when unknown. + sig { returns(T.nilable(String)) } + attr_reader :category + + sig { params(category: String).void } + attr_writer :category + + # Present when type is custom: human-readable name derived from the fontLinks key + # (strip build/hash suffixes, split camelCase / PascalCase, normalize separators). + # Google entries omit this. + sig { returns(T.nilable(String)) } + attr_reader :display_name + + sig { params(display_name: String).void } + attr_writer :display_name + + sig do + params( + files: T::Hash[Symbol, String], + type: + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type::OrSymbol, + category: String, + display_name: String + ).returns(T.attached_class) + end + def self.new( + # Upright font files keyed by weight string (e.g. "400" for regular, "500", + # "700"). Values are absolute URLs. + files:, + type:, + # Google Fonts category when type is google (e.g. sans-serif, serif, monospace, + # display, handwriting). Omitted for custom fonts when unknown. + category: nil, + # Present when type is custom: human-readable name derived from the fontLinks key + # (strip build/hash suffixes, split camelCase / PascalCase, normalize separators). + # Google entries omit this. + display_name: nil + ) + end + + sig do + override.returns( + { + files: T::Hash[Symbol, String], + type: + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type::TaggedSymbol, + category: String, + display_name: String + } + ) + end + def to_hash + end + + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + GOOGLE = + T.let( + :google, + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + # The primary color mode of the website design module Mode extend BrandDev::Internal::Type::Enum diff --git a/rbi/brand_dev/models/brand_web_scrape_html_params.rbi b/rbi/brand_dev/models/brand_web_scrape_html_params.rbi index 042cf8b5..53fdcd00 100644 --- a/rbi/brand_dev/models/brand_web_scrape_html_params.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_html_params.rbi @@ -15,26 +15,1202 @@ module BrandDev sig { returns(String) } attr_accessor :url + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + sig do + returns( + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeHTMLParams::Action::Wait, + BrandDev::BrandWebScrapeHTMLParams::Action::Perform + ) + ] + ) + ) + end + attr_accessor :actions + + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + sig do + returns( + T.nilable(BrandDev::BrandWebScrapeHTMLParams::Country::OrSymbol) + ) + end + attr_reader :country + + sig do + params( + country: BrandDev::BrandWebScrapeHTMLParams::Country::OrSymbol + ).void + end + attr_writer :country + + # CSS selectors to remove from the result. Applied after includeSelectors. + # Exclusion takes precedence: an element matching both is removed. Examples: + # "nav", "footer", ".ad-banner", "[aria-hidden=true]". + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_selectors + + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_reader :headers + + sig { params(headers: T::Hash[Symbol, String]).void } + attr_writer :headers + + # When true, iframes are rendered inline into the returned HTML. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::OrSymbol + ) + ) + ) + end + attr_reader :include_frames + + sig do + params( + include_frames: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::OrSymbol + ) + ).void + end + attr_writer :include_frames + + # CSS selectors. When provided, only matching subtrees (and their descendants) are + # kept and everything else is dropped. When omitted, the entire document is kept. + # Examples: "article.main", "#content", "[role=main]". + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_selectors + + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms + + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + sig { returns(T.nilable(BrandDev::BrandWebScrapeHTMLParams::Pdf)) } + attr_reader :pdf + + sig { params(pdf: BrandDev::BrandWebScrapeHTMLParams::Pdf::OrHash).void } + attr_writer :pdf + + # When true, waits briefly for CSS and transition animations to settle before + # extracting HTML. Defaults to false. This adds a bit of latency in exchange for + # more stable output on animated pages. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::OrSymbol + ) + ) + ) + end + attr_reader :settle_animations + + sig do + params( + settle_animations: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::OrSymbol + ) + ).void + end + attr_writer :settle_animations + + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + sig { returns(T.nilable(Integer)) } + attr_reader :timeout_ms + + sig { params(timeout_ms: Integer).void } + attr_writer :timeout_ms + + # When true, return only the page's main content in the HTML response, excluding + # headers, footers, sidebars, and navigation when detectable. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::OrSymbol + ) + ) + ) + end + attr_reader :use_main_content_only + + sig do + params( + use_main_content_only: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::OrSymbol + ) + ).void + end + attr_writer :use_main_content_only + + # Optional browser wait time in milliseconds after initial page load. Min: 0. Max: + # 30000 (30 seconds). + sig { returns(T.nilable(Integer)) } + attr_accessor :wait_for_ms + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + sig do + returns(T.nilable(BrandDev::BrandWebScrapeHTMLParams::Zdr::OrSymbol)) + end + attr_reader :zdr + + sig do + params(zdr: BrandDev::BrandWebScrapeHTMLParams::Zdr::OrSymbol).void + end + attr_writer :zdr + sig do params( url: String, + actions: + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeHTMLParams::Action::Wait::OrHash, + BrandDev::BrandWebScrapeHTMLParams::Action::Perform::OrHash + ) + ] + ), + country: BrandDev::BrandWebScrapeHTMLParams::Country::OrSymbol, + exclude_selectors: T.nilable(T::Array[String]), + headers: T::Hash[Symbol, String], + include_frames: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::OrSymbol + ), + include_selectors: T.nilable(T::Array[String]), + max_age_ms: T.nilable(Integer), + pdf: BrandDev::BrandWebScrapeHTMLParams::Pdf::OrHash, + settle_animations: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::OrSymbol + ), + tags: T::Array[String], + timeout_ms: Integer, + use_main_content_only: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::OrSymbol + ), + wait_for_ms: T.nilable(Integer), + zdr: BrandDev::BrandWebScrapeHTMLParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( # Full URL to scrape (must include http:// or https:// protocol) url:, + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + actions: nil, + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + country: nil, + # CSS selectors to remove from the result. Applied after includeSelectors. + # Exclusion takes precedence: an element matching both is removed. Examples: + # "nav", "footer", ".ad-banner", "[aria-hidden=true]". + exclude_selectors: nil, + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + headers: nil, + # When true, iframes are rendered inline into the returned HTML. + include_frames: nil, + # CSS selectors. When provided, only matching subtrees (and their descendants) are + # kept and everything else is dropped. When omitted, the entire document is kept. + # Examples: "article.main", "#content", "[role=main]". + include_selectors: nil, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + pdf: nil, + # When true, waits briefly for CSS and transition animations to settle before + # extracting HTML. Defaults to false. This adds a bit of latency in exchange for + # more stable output on animated pages. + settle_animations: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, + # When true, return only the page's main content in the HTML response, excluding + # headers, footers, sidebars, and navigation when detectable. + use_main_content_only: nil, + # Optional browser wait time in milliseconds after initial page load. Min: 0. Max: + # 30000 (30 seconds). + wait_for_ms: nil, + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + zdr: nil, request_options: {} ) end sig do override.returns( - { url: String, request_options: BrandDev::RequestOptions } + { + url: String, + actions: + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeHTMLParams::Action::Wait, + BrandDev::BrandWebScrapeHTMLParams::Action::Perform + ) + ] + ), + country: BrandDev::BrandWebScrapeHTMLParams::Country::OrSymbol, + exclude_selectors: T.nilable(T::Array[String]), + headers: T::Hash[Symbol, String], + include_frames: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::OrSymbol + ), + include_selectors: T.nilable(T::Array[String]), + max_age_ms: T.nilable(Integer), + pdf: BrandDev::BrandWebScrapeHTMLParams::Pdf, + settle_animations: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::OrSymbol + ), + tags: T::Array[String], + timeout_ms: Integer, + use_main_content_only: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::OrSymbol + ), + wait_for_ms: T.nilable(Integer), + zdr: BrandDev::BrandWebScrapeHTMLParams::Zdr::OrSymbol, + request_options: BrandDev::RequestOptions + } ) end def to_hash end + + # Browser action discriminated by `do`. Each variant exposes only its applicable + # fields. + module Action + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeHTMLParams::Action::Wait, + BrandDev::BrandWebScrapeHTMLParams::Action::Perform + ) + end + + class Wait < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeHTMLParams::Action::Wait, + BrandDev::Internal::AnyHash + ) + end + + sig { returns(Symbol) } + attr_accessor :do_ + + sig { returns(Integer) } + attr_accessor :time_ms + + # Pause for a fixed number of milliseconds before continuing to the next action. + sig do + params(time_ms: Integer, do_: Symbol).returns(T.attached_class) + end + def self.new(time_ms:, do_: :wait) + end + + sig { override.returns({ do_: Symbol, time_ms: Integer }) } + def to_hash + end + end + + class Perform < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeHTMLParams::Action::Perform, + BrandDev::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :action + + sig { returns(Symbol) } + attr_accessor :do_ + + # Resolve and perform one natural-language browser action. + sig { params(action: String, do_: Symbol).returns(T.attached_class) } + def self.new(action:, do_: :perform) + end + + sig { override.returns({ action: String, do_: Symbol }) } + def to_hash + end + end + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeHTMLParams::Action::Variants] + ) + end + def self.variants + end + end + + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + module Country + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeHTMLParams::Country) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AD = + T.let(:ad, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AE = + T.let(:ae, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AF = + T.let(:af, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AG = + T.let(:ag, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AI = + T.let(:ai, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AL = + T.let(:al, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AM = + T.let(:am, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AO = + T.let(:ao, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AR = + T.let(:ar, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AT = + T.let(:at, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AU = + T.let(:au, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AW = + T.let(:aw, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + AZ = + T.let(:az, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BA = + T.let(:ba, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BB = + T.let(:bb, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BD = + T.let(:bd, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BE = + T.let(:be, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BF = + T.let(:bf, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BG = + T.let(:bg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BH = + T.let(:bh, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BI = + T.let(:bi, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BJ = + T.let(:bj, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BM = + T.let(:bm, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BN = + T.let(:bn, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BO = + T.let(:bo, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BQ = + T.let(:bq, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BR = + T.let(:br, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BS = + T.let(:bs, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BW = + T.let(:bw, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BY = + T.let(:by, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + BZ = + T.let(:bz, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CA = + T.let(:ca, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CD = + T.let(:cd, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CF = + T.let(:cf, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CG = + T.let(:cg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CH = + T.let(:ch, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CI = + T.let(:ci, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CL = + T.let(:cl, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CM = + T.let(:cm, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CN = + T.let(:cn, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CO = + T.let(:co, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CR = + T.let(:cr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CV = + T.let(:cv, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CW = + T.let(:cw, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CY = + T.let(:cy, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + CZ = + T.let(:cz, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + DE = + T.let(:de, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + DJ = + T.let(:dj, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + DK = + T.let(:dk, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + DM = + T.let(:dm, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + DO = + T.let(:do, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + DZ = + T.let(:dz, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + EC = + T.let(:ec, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + EE = + T.let(:ee, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + EG = + T.let(:eg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + ES = + T.let(:es, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + ET = + T.let(:et, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + FI = + T.let(:fi, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + FJ = + T.let(:fj, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + FR = + T.let(:fr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GA = + T.let(:ga, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GB = + T.let(:gb, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GD = + T.let(:gd, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GE = + T.let(:ge, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GF = + T.let(:gf, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GG = + T.let(:gg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GH = + T.let(:gh, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GM = + T.let(:gm, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GN = + T.let(:gn, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GP = + T.let(:gp, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GQ = + T.let(:gq, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GR = + T.let(:gr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GT = + T.let(:gt, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GU = + T.let(:gu, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GW = + T.let(:gw, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + GY = + T.let(:gy, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + HK = + T.let(:hk, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + HN = + T.let(:hn, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + HR = + T.let(:hr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + HT = + T.let(:ht, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + HU = + T.let(:hu, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + ID = + T.let(:id, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + IE = + T.let(:ie, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + IL = + T.let(:il, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + IM = + T.let(:im, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + IN = + T.let(:in, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + IQ = + T.let(:iq, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + IR = + T.let(:ir, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + IS = + T.let(:is, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + IT = + T.let(:it, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + JE = + T.let(:je, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + JM = + T.let(:jm, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + JO = + T.let(:jo, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + JP = + T.let(:jp, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + KE = + T.let(:ke, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + KG = + T.let(:kg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + KH = + T.let(:kh, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + KN = + T.let(:kn, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + KR = + T.let(:kr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + KW = + T.let(:kw, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + KY = + T.let(:ky, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + KZ = + T.let(:kz, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LA = + T.let(:la, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LB = + T.let(:lb, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LC = + T.let(:lc, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LK = + T.let(:lk, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LR = + T.let(:lr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LS = + T.let(:ls, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LT = + T.let(:lt, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LU = + T.let(:lu, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LV = + T.let(:lv, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + LY = + T.let(:ly, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MA = + T.let(:ma, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MC = + T.let(:mc, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MD = + T.let(:md, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + ME = + T.let(:me, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MF = + T.let(:mf, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MG = + T.let(:mg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MK = + T.let(:mk, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + ML = + T.let(:ml, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MM = + T.let(:mm, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MN = + T.let(:mn, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MO = + T.let(:mo, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MQ = + T.let(:mq, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MR = + T.let(:mr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MT = + T.let(:mt, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MU = + T.let(:mu, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MV = + T.let(:mv, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MW = + T.let(:mw, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MX = + T.let(:mx, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MY = + T.let(:my, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + MZ = + T.let(:mz, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + NA = + T.let(:na, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + NC = + T.let(:nc, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + NE = + T.let(:ne, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + NG = + T.let(:ng, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + NI = + T.let(:ni, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + NL = + T.let(:nl, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + NO = + T.let(:no, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + NP = + T.let(:np, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + NZ = + T.let(:nz, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + OM = + T.let(:om, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PA = + T.let(:pa, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PE = + T.let(:pe, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PF = + T.let(:pf, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PG = + T.let(:pg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PH = + T.let(:ph, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PK = + T.let(:pk, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PL = + T.let(:pl, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PR = + T.let(:pr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PS = + T.let(:ps, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PT = + T.let(:pt, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + PY = + T.let(:py, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + QA = + T.let(:qa, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + RE = + T.let(:re, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + RO = + T.let(:ro, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + RS = + T.let(:rs, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + RU = + T.let(:ru, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + RW = + T.let(:rw, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SA = + T.let(:sa, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SC = + T.let(:sc, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SD = + T.let(:sd, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SE = + T.let(:se, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SG = + T.let(:sg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SI = + T.let(:si, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SK = + T.let(:sk, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SL = + T.let(:sl, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SM = + T.let(:sm, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SN = + T.let(:sn, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SO = + T.let(:so, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SR = + T.let(:sr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SS = + T.let(:ss, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + ST = + T.let(:st, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SV = + T.let(:sv, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SX = + T.let(:sx, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SY = + T.let(:sy, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + SZ = + T.let(:sz, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TC = + T.let(:tc, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TD = + T.let(:td, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TG = + T.let(:tg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TH = + T.let(:th, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TJ = + T.let(:tj, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TL = + T.let(:tl, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TM = + T.let(:tm, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TN = + T.let(:tn, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TR = + T.let(:tr, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TT = + T.let(:tt, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TW = + T.let(:tw, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + TZ = + T.let(:tz, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + UA = + T.let(:ua, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + UG = + T.let(:ug, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + US = + T.let(:us, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + UY = + T.let(:uy, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + UZ = + T.let(:uz, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + VC = + T.let(:vc, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + VE = + T.let(:ve, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + VG = + T.let(:vg, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + VI = + T.let(:vi, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + VN = + T.let(:vn, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + YE = + T.let(:ye, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + YT = + T.let(:yt, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + ZA = + T.let(:za, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + ZM = + T.let(:zm, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + ZW = + T.let(:zw, BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol) + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeHTMLParams::Country::TaggedSymbol] + ) + end + def self.values + end + end + + # When true, iframes are rendered inline into the returned HTML. + module IncludeFrames + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeHTMLParams::IncludeFrames) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::TaggedSymbol + ) + end + + class Pdf < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeHTMLParams::Pdf, + BrandDev::Internal::AnyHash + ) + end + + # Last 1-based PDF page to parse. When omitted, parsing ends at the last page. + # Must be greater than or equal to start when both are provided. + sig { returns(T.nilable(Integer)) } + attr_reader :end_ + + sig { params(end_: Integer).void } + attr_writer :end_ + + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr::OrSymbol + ) + ) + ) + end + attr_reader :ocr + + sig do + params( + ocr: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr::OrSymbol + ) + ).void + end + attr_writer :ocr + + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse::OrSymbol + ) + ) + ) + end + attr_reader :should_parse + + sig do + params( + should_parse: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse::OrSymbol + ) + ).void + end + attr_writer :should_parse + + # First 1-based PDF page to parse. When omitted, parsing starts at the first page. + sig { returns(T.nilable(Integer)) } + attr_reader :start + + sig { params(start: Integer).void } + attr_writer :start + + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + sig do + params( + end_: Integer, + ocr: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr::OrSymbol + ), + should_parse: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse::OrSymbol + ), + start: Integer + ).returns(T.attached_class) + end + def self.new( + # Last 1-based PDF page to parse. When omitted, parsing ends at the last page. + # Must be greater than or equal to start when both are provided. + end_: nil, + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + ocr: nil, + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + should_parse: nil, + # First 1-based PDF page to parse. When omitted, parsing starts at the first page. + start: nil + ) + end + + sig do + override.returns( + { + end_: Integer, + ocr: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr::OrSymbol + ), + should_parse: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse::OrSymbol + ), + start: Integer + } + ) + end + def to_hash + end + + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + module Ocr + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeHTMLParams::Pdf::Ocr::TaggedSymbol + ) + end + + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + module ShouldParse + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeHTMLParams::Pdf::ShouldParse::TaggedSymbol + ) + end + end + + # When true, waits briefly for CSS and transition animations to settle before + # extracting HTML. Defaults to false. This adds a bit of latency in exchange for + # more stable output on animated pages. + module SettleAnimations + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeHTMLParams::SettleAnimations) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::TaggedSymbol + ) + end + + # When true, return only the page's main content in the HTML response, excluding + # headers, footers, sidebars, and navigation when detectable. + module UseMainContentOnly + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::TaggedSymbol + ) + end + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + module Zdr + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeHTMLParams::Zdr) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLED = + T.let(:enabled, BrandDev::BrandWebScrapeHTMLParams::Zdr::TaggedSymbol) + DISABLED = + T.let( + :disabled, + BrandDev::BrandWebScrapeHTMLParams::Zdr::TaggedSymbol + ) + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeHTMLParams::Zdr::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/rbi/brand_dev/models/brand_web_scrape_html_response.rbi b/rbi/brand_dev/models/brand_web_scrape_html_response.rbi index 62e0ea6e..82b6da82 100644 --- a/rbi/brand_dev/models/brand_web_scrape_html_response.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_html_response.rbi @@ -11,10 +11,24 @@ module BrandDev ) end - # Raw HTML content of the page + # The scraped content of the page. For normal pages this is the raw HTML. When the + # page is a sitemap or feed served behind an XSL stylesheet (which browsers render + # into HTML), this is the underlying XML instead — see the `type` field. sig { returns(String) } attr_accessor :html + # Metadata extracted from the scraped page HTML. + sig { returns(BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata) } + attr_reader :metadata + + sig do + params( + metadata: + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::OrHash + ).void + end + attr_writer :metadata + # Indicates success sig do returns( @@ -23,25 +37,110 @@ module BrandDev end attr_accessor :success + # Detected content type of the returned `html` field. Sitemaps and feeds are + # surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as + # `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations + # are surfaced as `pptx`/`ppt` with the extracted slides as HTML. + sig do + returns( + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + end + attr_accessor :type + # The URL that was scraped sig { returns(String) } attr_accessor :url + # One verified outcome per requested browser action, in request order. + sig do + returns( + T.nilable( + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied + ] + ) + ) + end + attr_reader :actions_applied + + sig do + params( + actions_applied: + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::OrHash + ] + ).void + end + attr_writer :actions_applied + + # True when an action was applied but the returned content could not be refreshed + # afterward. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :actions_html_stale + + sig { params(actions_html_stale: T::Boolean).void } + attr_writer :actions_html_stale + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + sig do params( html: String, + metadata: + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::OrHash, success: BrandDev::Models::BrandWebScrapeHTMLResponse::Success::OrBoolean, - url: String + type: BrandDev::Models::BrandWebScrapeHTMLResponse::Type::OrSymbol, + url: String, + actions_applied: + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::OrHash + ], + actions_html_stale: T::Boolean, + key_metadata: + BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata::OrHash ).returns(T.attached_class) end def self.new( - # Raw HTML content of the page + # The scraped content of the page. For normal pages this is the raw HTML. When the + # page is a sitemap or feed served behind an XSL stylesheet (which browsers render + # into HTML), this is the underlying XML instead — see the `type` field. html:, + # Metadata extracted from the scraped page HTML. + metadata:, # Indicates success success:, + # Detected content type of the returned `html` field. Sitemaps and feeds are + # surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as + # `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations + # are surfaced as `pptx`/`ppt` with the extracted slides as HTML. + type:, # The URL that was scraped - url: + url:, + # One verified outcome per requested browser action, in request order. + actions_applied: nil, + # True when an action was applied but the returned content could not be refreshed + # afterward. + actions_html_stale: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil ) end @@ -49,15 +148,483 @@ module BrandDev override.returns( { html: String, + metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata, success: BrandDev::Models::BrandWebScrapeHTMLResponse::Success::TaggedBoolean, - url: String + type: + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol, + url: String, + actions_applied: + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied + ], + actions_html_stale: T::Boolean, + key_metadata: + BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata } ) end def to_hash end + class Metadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata, + BrandDev::Internal::AnyHash + ) + end + + # Final URL scraped after redirects or scraper fallback, when known. Falls back to + # sourceUrl when unavailable. + sig { returns(String) } + attr_accessor :final_url + + # Original URL requested by the caller. + sig { returns(String) } + attr_accessor :source_url + + # Additional non-social meta tags not promoted to top-level metadata fields. + sig do + returns( + T.nilable( + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::AdditionalMeta::Variants + ] + ) + ) + end + attr_reader :additional_meta + + sig do + params( + additional_meta: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::AdditionalMeta::Variants + ] + ).void + end + attr_writer :additional_meta + + # Resolved alternate links from link rel=alternate tags. + sig do + returns( + T.nilable( + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate + ] + ) + ) + end + attr_reader :alternates + + sig do + params( + alternates: + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate::OrHash + ] + ).void + end + attr_writer :alternates + + # Author metadata, when present. + sig { returns(T.nilable(String)) } + attr_reader :author + + sig { params(author: String).void } + attr_writer :author + + # Resolved canonical URL, when present. + sig { returns(T.nilable(String)) } + attr_reader :canonical_url + + sig { params(canonical_url: String).void } + attr_writer :canonical_url + + # Best description extracted from standard, Open Graph, or Twitter metadata. + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + # Resolved favicon URL, when present. + sig { returns(T.nilable(String)) } + attr_reader :favicon + + sig { params(favicon: String).void } + attr_writer :favicon + + # Primary resolved preview image from Open Graph, Twitter, or image metadata. + sig { returns(T.nilable(String)) } + attr_reader :image + + sig { params(image: String).void } + attr_writer :image + + # JSON-LD structured data blocks parsed from the page. + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_reader :json_ld + + sig { params(json_ld: T::Array[T::Hash[Symbol, T.anything]]).void } + attr_writer :json_ld + + # Keywords extracted from the page's keywords meta tag. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :keywords + + sig { params(keywords: T::Array[String]).void } + attr_writer :keywords + + # Language extracted from html lang or language meta tags. + sig { returns(T.nilable(String)) } + attr_reader :language + + sig { params(language: String).void } + attr_writer :language + + # Modified timestamp/date from page metadata, when present. + sig { returns(T.nilable(String)) } + attr_reader :modified_time + + sig { params(modified_time: String).void } + attr_writer :modified_time + + # Open Graph metadata with the og: prefix removed and keys camel-cased. + sig do + returns( + T.nilable( + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::OpenGraph::Variants + ] + ) + ) + end + attr_reader :open_graph + + sig do + params( + open_graph: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::OpenGraph::Variants + ] + ).void + end + attr_writer :open_graph + + # Published timestamp/date from page metadata, when present. + sig { returns(T.nilable(String)) } + attr_reader :published_time + + sig { params(published_time: String).void } + attr_writer :published_time + + # Robots meta directive, when present. + sig { returns(T.nilable(String)) } + attr_reader :robots + + sig { params(robots: String).void } + attr_writer :robots + + # Site or application name from page metadata. + sig { returns(T.nilable(String)) } + attr_reader :site_name + + sig { params(site_name: String).void } + attr_writer :site_name + + # Best title extracted from the page. + sig { returns(T.nilable(String)) } + attr_reader :title + + sig { params(title: String).void } + attr_writer :title + + # Twitter card metadata with the twitter: prefix removed and keys camel-cased. + sig do + returns( + T.nilable( + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Twitter::Variants + ] + ) + ) + end + attr_reader :twitter + + sig do + params( + twitter: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Twitter::Variants + ] + ).void + end + attr_writer :twitter + + # Metadata extracted from the scraped page HTML. + sig do + params( + final_url: String, + source_url: String, + additional_meta: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::AdditionalMeta::Variants + ], + alternates: + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate::OrHash + ], + author: String, + canonical_url: String, + description: String, + favicon: String, + image: String, + json_ld: T::Array[T::Hash[Symbol, T.anything]], + keywords: T::Array[String], + language: String, + modified_time: String, + open_graph: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::OpenGraph::Variants + ], + published_time: String, + robots: String, + site_name: String, + title: String, + twitter: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Twitter::Variants + ] + ).returns(T.attached_class) + end + def self.new( + # Final URL scraped after redirects or scraper fallback, when known. Falls back to + # sourceUrl when unavailable. + final_url:, + # Original URL requested by the caller. + source_url:, + # Additional non-social meta tags not promoted to top-level metadata fields. + additional_meta: nil, + # Resolved alternate links from link rel=alternate tags. + alternates: nil, + # Author metadata, when present. + author: nil, + # Resolved canonical URL, when present. + canonical_url: nil, + # Best description extracted from standard, Open Graph, or Twitter metadata. + description: nil, + # Resolved favicon URL, when present. + favicon: nil, + # Primary resolved preview image from Open Graph, Twitter, or image metadata. + image: nil, + # JSON-LD structured data blocks parsed from the page. + json_ld: nil, + # Keywords extracted from the page's keywords meta tag. + keywords: nil, + # Language extracted from html lang or language meta tags. + language: nil, + # Modified timestamp/date from page metadata, when present. + modified_time: nil, + # Open Graph metadata with the og: prefix removed and keys camel-cased. + open_graph: nil, + # Published timestamp/date from page metadata, when present. + published_time: nil, + # Robots meta directive, when present. + robots: nil, + # Site or application name from page metadata. + site_name: nil, + # Best title extracted from the page. + title: nil, + # Twitter card metadata with the twitter: prefix removed and keys camel-cased. + twitter: nil + ) + end + + sig do + override.returns( + { + final_url: String, + source_url: String, + additional_meta: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::AdditionalMeta::Variants + ], + alternates: + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate + ], + author: String, + canonical_url: String, + description: String, + favicon: String, + image: String, + json_ld: T::Array[T::Hash[Symbol, T.anything]], + keywords: T::Array[String], + language: String, + modified_time: String, + open_graph: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::OpenGraph::Variants + ], + published_time: String, + robots: String, + site_name: String, + title: String, + twitter: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Twitter::Variants + ] + } + ) + end + def to_hash + end + + module AdditionalMeta + extend BrandDev::Internal::Type::Union + + Variants = T.type_alias { T.any(String, T::Array[String]) } + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::AdditionalMeta::Variants + ] + ) + end + def self.variants + end + + StringArray = + T.let( + BrandDev::Internal::Type::ArrayOf[String], + BrandDev::Internal::Type::Converter + ) + end + + class Alternate < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate, + BrandDev::Internal::AnyHash + ) + end + + # Resolved alternate URL. + sig { returns(String) } + attr_accessor :href + + # Language or locale for the alternate URL, when present. + sig { returns(T.nilable(String)) } + attr_reader :hreflang + + sig { params(hreflang: String).void } + attr_writer :hreflang + + # Alternate resource title, when present. + sig { returns(T.nilable(String)) } + attr_reader :title + + sig { params(title: String).void } + attr_writer :title + + # Alternate resource MIME type, when present. + sig { returns(T.nilable(String)) } + attr_reader :type + + sig { params(type: String).void } + attr_writer :type + + sig do + params( + href: String, + hreflang: String, + title: String, + type: String + ).returns(T.attached_class) + end + def self.new( + # Resolved alternate URL. + href:, + # Language or locale for the alternate URL, when present. + hreflang: nil, + # Alternate resource title, when present. + title: nil, + # Alternate resource MIME type, when present. + type: nil + ) + end + + sig do + override.returns( + { href: String, hreflang: String, title: String, type: String } + ) + end + def to_hash + end + end + + module OpenGraph + extend BrandDev::Internal::Type::Union + + Variants = T.type_alias { T.any(String, T::Array[String]) } + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::OpenGraph::Variants + ] + ) + end + def self.variants + end + + StringArray = + T.let( + BrandDev::Internal::Type::ArrayOf[String], + BrandDev::Internal::Type::Converter + ) + end + + module Twitter + extend BrandDev::Internal::Type::Union + + Variants = T.type_alias { T.any(String, T::Array[String]) } + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Twitter::Variants + ] + ) + end + def self.variants + end + + StringArray = + T.let( + BrandDev::Internal::Type::ArrayOf[String], + BrandDev::Internal::Type::Converter + ) + end + end + # Indicates success module Success extend BrandDev::Internal::Type::Enum @@ -87,6 +654,279 @@ module BrandDev def self.values end end + + # Detected content type of the returned `html` field. Sitemaps and feeds are + # surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as + # `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations + # are surfaced as `pptx`/`ppt` with the extracted slides as HTML. + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Type) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + HTML = + T.let( + :html, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + XML = + T.let( + :xml, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + JSON = + T.let( + :json, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + TEXT = + T.let( + :text, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + CSV = + T.let( + :csv, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + MARKDOWN = + T.let( + :markdown, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + SVG = + T.let( + :svg, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + PDF = + T.let( + :pdf, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + DOCX = + T.let( + :docx, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + DOC = + T.let( + :doc, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + XLSX = + T.let( + :xlsx, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + XLS = + T.let( + :xls, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + PPTX = + T.let( + :pptx, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + PPT = + T.let( + :ppt, + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + + class ActionsApplied < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied, + BrandDev::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :instruction + + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + sig do + returns( + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol + ) + end + attr_accessor :status + + # Visible page evidence used to verify an applied action. + sig { returns(T.nilable(String)) } + attr_reader :completion_evidence + + sig { params(completion_evidence: String).void } + attr_writer :completion_evidence + + sig { returns(T.nilable(Float)) } + attr_reader :duration_ms + + sig { params(duration_ms: Float).void } + attr_writer :duration_ms + + sig { returns(T.nilable(String)) } + attr_reader :error + + sig { params(error: String).void } + attr_writer :error + + sig { returns(T.nilable(String)) } + attr_reader :method_ + + sig { params(method_: String).void } + attr_writer :method_ + + sig { returns(T.nilable(String)) } + attr_reader :target_description + + sig { params(target_description: String).void } + attr_writer :target_description + + sig do + params( + instruction: String, + status: + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status::OrSymbol, + completion_evidence: String, + duration_ms: Float, + error: String, + method_: String, + target_description: String + ).returns(T.attached_class) + end + def self.new( + instruction:, + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + status:, + # Visible page evidence used to verify an applied action. + completion_evidence: nil, + duration_ms: nil, + error: nil, + method_: nil, + target_description: nil + ) + end + + sig do + override.returns( + { + instruction: String, + status: + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol, + completion_evidence: String, + duration_ms: Float, + error: String, + method_: String, + target_description: String + } + ) + end + def to_hash + end + + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + module Status + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPLIED = + T.let( + :applied, + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol + ) + FAILED = + T.let( + :failed, + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol + ) + SKIPPED = + T.let( + :skipped, + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_web_scrape_images_params.rbi b/rbi/brand_dev/models/brand_web_scrape_images_params.rbi index 23a06541..9cc350bb 100644 --- a/rbi/brand_dev/models/brand_web_scrape_images_params.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_images_params.rbi @@ -14,30 +14,596 @@ module BrandDev ) end - # Full URL to scrape images from (must include http:// or https:// protocol) + # Page URL to inspect. Must include http:// or https://. sig { returns(String) } attr_accessor :url + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + sig do + returns( + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeImagesParams::Action::Wait, + BrandDev::BrandWebScrapeImagesParams::Action::Perform + ) + ] + ) + ) + end + attr_accessor :actions + + # When true, visually duplicate images are removed: every image is loaded and + # perceptually hashed, and only the highest-resolution copy of each duplicate + # group is kept. Images that cannot be downloaded or hashed are kept. Default: + # false. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Dedupe::OrSymbol + ) + ) + ) + end + attr_reader :dedupe + + sig do + params( + dedupe: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Dedupe::OrSymbol + ) + ).void + end + attr_writer :dedupe + + # Optional per-image processing, sent as deep-object query params such as + # enrichment[resolution]=true. + sig do + returns(T.nilable(BrandDev::BrandWebScrapeImagesParams::Enrichment)) + end + attr_reader :enrichment + + sig do + params( + enrichment: + T.nilable(BrandDev::BrandWebScrapeImagesParams::Enrichment::OrHash) + ).void + end + attr_writer :enrichment + + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_reader :headers + + sig { params(headers: T::Hash[Symbol, String]).void } + attr_writer :headers + + # Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 + # day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days). + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms + + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + sig { returns(T.nilable(Integer)) } + attr_reader :timeout_ms + + sig { params(timeout_ms: Integer).void } + attr_writer :timeout_ms + + # Optional browser wait time in milliseconds after initial page load before + # collecting images. Min: 0. Max: 30000 (30 seconds). + sig { returns(T.nilable(Integer)) } + attr_accessor :wait_for_ms + sig do params( url: String, + actions: + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeImagesParams::Action::Wait::OrHash, + BrandDev::BrandWebScrapeImagesParams::Action::Perform::OrHash + ) + ] + ), + dedupe: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Dedupe::OrSymbol + ), + enrichment: + T.nilable(BrandDev::BrandWebScrapeImagesParams::Enrichment::OrHash), + headers: T::Hash[Symbol, String], + max_age_ms: T.nilable(Integer), + tags: T::Array[String], + timeout_ms: Integer, + wait_for_ms: T.nilable(Integer), request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( - # Full URL to scrape images from (must include http:// or https:// protocol) + # Page URL to inspect. Must include http:// or https://. url:, + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + actions: nil, + # When true, visually duplicate images are removed: every image is loaded and + # perceptually hashed, and only the highest-resolution copy of each duplicate + # group is kept. Images that cannot be downloaded or hashed are kept. Default: + # false. + dedupe: nil, + # Optional per-image processing, sent as deep-object query params such as + # enrichment[resolution]=true. + enrichment: nil, + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + headers: nil, + # Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 + # day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days). + max_age_ms: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, + # Optional browser wait time in milliseconds after initial page load before + # collecting images. Min: 0. Max: 30000 (30 seconds). + wait_for_ms: nil, request_options: {} ) end sig do override.returns( - { url: String, request_options: BrandDev::RequestOptions } + { + url: String, + actions: + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeImagesParams::Action::Wait, + BrandDev::BrandWebScrapeImagesParams::Action::Perform + ) + ] + ), + dedupe: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Dedupe::OrSymbol + ), + enrichment: + T.nilable(BrandDev::BrandWebScrapeImagesParams::Enrichment), + headers: T::Hash[Symbol, String], + max_age_ms: T.nilable(Integer), + tags: T::Array[String], + timeout_ms: Integer, + wait_for_ms: T.nilable(Integer), + request_options: BrandDev::RequestOptions + } ) end def to_hash end + + # Browser action discriminated by `do`. Each variant exposes only its applicable + # fields. + module Action + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeImagesParams::Action::Wait, + BrandDev::BrandWebScrapeImagesParams::Action::Perform + ) + end + + class Wait < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeImagesParams::Action::Wait, + BrandDev::Internal::AnyHash + ) + end + + sig { returns(Symbol) } + attr_accessor :do_ + + sig { returns(Integer) } + attr_accessor :time_ms + + # Pause for a fixed number of milliseconds before continuing to the next action. + sig do + params(time_ms: Integer, do_: Symbol).returns(T.attached_class) + end + def self.new(time_ms:, do_: :wait) + end + + sig { override.returns({ do_: Symbol, time_ms: Integer }) } + def to_hash + end + end + + class Perform < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeImagesParams::Action::Perform, + BrandDev::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :action + + sig { returns(Symbol) } + attr_accessor :do_ + + # Resolve and perform one natural-language browser action. + sig { params(action: String, do_: Symbol).returns(T.attached_class) } + def self.new(action:, do_: :perform) + end + + sig { override.returns({ action: String, do_: Symbol }) } + def to_hash + end + end + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeImagesParams::Action::Variants] + ) + end + def self.variants + end + end + + # When true, visually duplicate images are removed: every image is loaded and + # perceptually hashed, and only the highest-resolution copy of each duplicate + # group is kept. Images that cannot be downloaded or hashed are kept. Default: + # false. + module Dedupe + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Dedupe::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeImagesParams::Dedupe::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeImagesParams::Dedupe) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeImagesParams::Dedupe::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeImagesParams::Dedupe::TaggedSymbol + ) + end + + class Enrichment < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeImagesParams::Enrichment, + BrandDev::Internal::AnyHash + ) + end + + # Classify each image by visual asset type. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification::OrSymbol + ) + ) + ) + end + attr_reader :classification + + sig do + params( + classification: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification::OrSymbol + ) + ).void + end + attr_writer :classification + + # Host materializable images on the Brand.dev CDN and return their URL and MIME + # type. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL::OrSymbol + ) + ) + ) + end + attr_reader :hosted_url + + sig do + params( + hosted_url: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL::OrSymbol + ) + ).void + end + attr_writer :hosted_url + + # Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000. + sig { returns(T.nilable(Integer)) } + attr_reader :max_time_per_ms + + sig { params(max_time_per_ms: Integer).void } + attr_writer :max_time_per_ms + + # Measure image width and height when possible. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution::OrSymbol + ) + ) + ) + end + attr_reader :resolution + + sig do + params( + resolution: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution::OrSymbol + ) + ).void + end + attr_writer :resolution + + # Optional per-image processing, sent as deep-object query params such as + # enrichment[resolution]=true. + sig do + params( + classification: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification::OrSymbol + ), + hosted_url: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL::OrSymbol + ), + max_time_per_ms: Integer, + resolution: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Classify each image by visual asset type. + classification: nil, + # Host materializable images on the Brand.dev CDN and return their URL and MIME + # type. + hosted_url: nil, + # Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000. + max_time_per_ms: nil, + # Measure image width and height when possible. + resolution: nil + ) + end + + sig do + override.returns( + { + classification: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification::OrSymbol + ), + hosted_url: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL::OrSymbol + ), + max_time_per_ms: Integer, + resolution: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution::OrSymbol + ) + } + ) + end + def to_hash + end + + # Classify each image by visual asset type. + module Classification + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Classification::TaggedSymbol + ) + end + + # Host materializable images on the Brand.dev CDN and return their URL and MIME + # type. + module HostedURL + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeImagesParams::Enrichment::HostedURL::TaggedSymbol + ) + end + + # Measure image width and height when possible. + module Resolution + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeImagesParams::Enrichment::Resolution::TaggedSymbol + ) + end + end end end end diff --git a/rbi/brand_dev/models/brand_web_scrape_images_response.rbi b/rbi/brand_dev/models/brand_web_scrape_images_response.rbi index 6700b0ac..b42906b2 100644 --- a/rbi/brand_dev/models/brand_web_scrape_images_response.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_images_response.rbi @@ -11,13 +11,13 @@ module BrandDev ) end - # Array of scraped images + # Images found on the page. sig do returns(T::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image]) end attr_accessor :images - # Indicates success + # Always true on success. sig do returns( BrandDev::Models::BrandWebScrapeImagesResponse::Success::TaggedBoolean @@ -25,10 +25,27 @@ module BrandDev end attr_accessor :success - # The URL that was scraped + # Page URL that was scraped. sig { returns(String) } attr_accessor :url + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + sig do params( images: @@ -37,16 +54,21 @@ module BrandDev ], success: BrandDev::Models::BrandWebScrapeImagesResponse::Success::OrBoolean, - url: String + url: String, + key_metadata: + BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata::OrHash ).returns(T.attached_class) end def self.new( - # Array of scraped images + # Images found on the page. images:, - # Indicates success + # Always true on success. success:, - # The URL that was scraped - url: + # Page URL that was scraped. + url:, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil ) end @@ -57,7 +79,9 @@ module BrandDev T::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image], success: BrandDev::Models::BrandWebScrapeImagesResponse::Success::TaggedBoolean, - url: String + url: String, + key_metadata: + BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata } ) end @@ -73,11 +97,11 @@ module BrandDev ) end - # Alt text of the image, or null if not present + # Image alt text, or null when unavailable. sig { returns(T.nilable(String)) } attr_accessor :alt - # The HTML element the image was found in + # Where the image was found. sig do returns( BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol @@ -85,11 +109,11 @@ module BrandDev end attr_accessor :element - # The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI + # Original image value: URL, inline SVG or HTML, or base64 data URI. sig { returns(String) } attr_accessor :src - # The type/format of the src value + # Format of src. sig do returns( BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::TaggedSymbol @@ -97,6 +121,24 @@ module BrandDev end attr_accessor :type + # Requested metadata for images that could be processed. + sig do + returns( + T.nilable( + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment + ) + ) + end + attr_reader :enrichment + + sig do + params( + enrichment: + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::OrHash + ).void + end + attr_writer :enrichment + sig do params( alt: T.nilable(String), @@ -104,18 +146,22 @@ module BrandDev BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::OrSymbol, src: String, type: - BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::OrSymbol + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::OrSymbol, + enrichment: + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::OrHash ).returns(T.attached_class) end def self.new( - # Alt text of the image, or null if not present + # Image alt text, or null when unavailable. alt:, - # The HTML element the image was found in + # Where the image was found. element:, - # The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI + # Original image value: URL, inline SVG or HTML, or base64 data URI. src:, - # The type/format of the src value - type: + # Format of src. + type:, + # Requested metadata for images that could be processed. + enrichment: nil ) end @@ -127,14 +173,16 @@ module BrandDev BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol, src: String, type: - BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::TaggedSymbol + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::TaggedSymbol, + enrichment: + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment } ) end def to_hash end - # The HTML element the image was found in + # Where the image was found. module Element extend BrandDev::Internal::Type::Enum @@ -204,7 +252,7 @@ module BrandDev end end - # The type/format of the src value + # Format of src. module Type extend BrandDev::Internal::Type::Enum @@ -243,9 +291,170 @@ module BrandDev def self.values end end + + class Enrichment < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment, + BrandDev::Internal::AnyHash + ) + end + + # Image height in pixels, when measured. + sig { returns(T.nilable(Integer)) } + attr_reader :height + + sig { params(height: Integer).void } + attr_writer :height + + # Detected MIME type, when hosted. + sig { returns(T.nilable(String)) } + attr_reader :mimetype + + sig { params(mimetype: String).void } + attr_writer :mimetype + + # Visual asset category, when classified. + sig do + returns( + T.nilable( + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ) + ) + end + attr_reader :type + + sig do + params( + type: + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::OrSymbol + ).void + end + attr_writer :type + + # Brand.dev CDN URL, when hosted. + sig { returns(T.nilable(String)) } + attr_reader :url + + sig { params(url: String).void } + attr_writer :url + + # Image width in pixels, when measured. + sig { returns(T.nilable(Integer)) } + attr_reader :width + + sig { params(width: Integer).void } + attr_writer :width + + # Requested metadata for images that could be processed. + sig do + params( + height: Integer, + mimetype: String, + type: + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::OrSymbol, + url: String, + width: Integer + ).returns(T.attached_class) + end + def self.new( + # Image height in pixels, when measured. + height: nil, + # Detected MIME type, when hosted. + mimetype: nil, + # Visual asset category, when classified. + type: nil, + # Brand.dev CDN URL, when hosted. + url: nil, + # Image width in pixels, when measured. + width: nil + ) + end + + sig do + override.returns( + { + height: Integer, + mimetype: String, + type: + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol, + url: String, + width: Integer + } + ) + end + def to_hash + end + + # Visual asset category, when classified. + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PHOTOGRAPHY = + T.let( + :photography, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ) + ILLUSTRATION = + T.let( + :illustration, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ) + LOGO = + T.let( + :logo, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ) + WORDMARK = + T.let( + :wordmark, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ) + ICON = + T.let( + :icon, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ) + PATTERN = + T.let( + :pattern, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ) + GRAPHIC = + T.let( + :graphic, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ) + OTHER = + T.let( + :other, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end end - # Indicates success + # Always true on success. module Success extend BrandDev::Internal::Type::Enum @@ -274,6 +483,47 @@ module BrandDev def self.values end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_web_scrape_md_params.rbi b/rbi/brand_dev/models/brand_web_scrape_md_params.rbi index 8f945d29..01eeb66b 100644 --- a/rbi/brand_dev/models/brand_web_scrape_md_params.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_md_params.rbi @@ -11,63 +11,375 @@ module BrandDev T.any(BrandDev::BrandWebScrapeMdParams, BrandDev::Internal::AnyHash) end - # Full URL to scrape and convert to markdown (must include http:// or https:// + # Full URL to scrape into LLM usable Markdown (must include http:// or https:// # protocol) sig { returns(String) } attr_accessor :url + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + sig do + returns( + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeMdParams::Action::Wait, + BrandDev::BrandWebScrapeMdParams::Action::Perform + ) + ] + ) + ) + end + attr_accessor :actions + + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + sig do + returns(T.nilable(BrandDev::BrandWebScrapeMdParams::Country::OrSymbol)) + end + attr_reader :country + + sig do + params( + country: BrandDev::BrandWebScrapeMdParams::Country::OrSymbol + ).void + end + attr_writer :country + + # CSS selectors to remove before conversion to Markdown. Applied after + # includeSelectors. Exclusion takes precedence: an element matching both is + # removed. Examples: "nav", "footer", ".ad-banner", "[aria-hidden=true]". + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_selectors + + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_reader :headers + + sig { params(headers: T::Hash[Symbol, String]).void } + attr_writer :headers + + # When true, the contents of iframes are rendered to Markdown. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeFrames::OrSymbol + ) + ) + ) + end + attr_reader :include_frames + + sig do + params( + include_frames: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeFrames::OrSymbol + ) + ).void + end + attr_writer :include_frames + # Include image references in Markdown output - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeImages::OrSymbol + ) + ) + ) + end attr_reader :include_images - sig { params(include_images: T::Boolean).void } + sig do + params( + include_images: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeImages::OrSymbol + ) + ).void + end attr_writer :include_images # Preserve hyperlinks in Markdown output - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeLinks::OrSymbol + ) + ) + ) + end attr_reader :include_links - sig { params(include_links: T::Boolean).void } + sig do + params( + include_links: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeLinks::OrSymbol + ) + ).void + end attr_writer :include_links + # CSS selectors. When provided, only matching HTML subtrees (and their + # descendants) are kept before conversion to Markdown. When omitted, the entire + # document is kept. Examples: "article.main", "#content", "[role=main]". + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_selectors + + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_age_ms + + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + sig { returns(T.nilable(BrandDev::BrandWebScrapeMdParams::Pdf)) } + attr_reader :pdf + + sig { params(pdf: BrandDev::BrandWebScrapeMdParams::Pdf::OrHash).void } + attr_writer :pdf + + # When true, waits briefly for CSS and transition animations to settle before + # converting to Markdown. Defaults to false. This adds a bit of latency in + # exchange for more stable output on animated pages. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::SettleAnimations::OrSymbol + ) + ) + ) + end + attr_reader :settle_animations + + sig do + params( + settle_animations: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::SettleAnimations::OrSymbol + ) + ).void + end + attr_writer :settle_animations + # Shorten base64-encoded image data in the Markdown output - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::OrSymbol + ) + ) + ) + end attr_reader :shorten_base64_images - sig { params(shorten_base64_images: T::Boolean).void } + sig do + params( + shorten_base64_images: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::OrSymbol + ) + ).void + end attr_writer :shorten_base64_images + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + sig { returns(T.nilable(Integer)) } + attr_reader :timeout_ms + + sig { params(timeout_ms: Integer).void } + attr_writer :timeout_ms + # Extract only the main content of the page, excluding headers, footers, sidebars, # and navigation - sig { returns(T.nilable(T::Boolean)) } + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::OrSymbol + ) + ) + ) + end attr_reader :use_main_content_only - sig { params(use_main_content_only: T::Boolean).void } + sig do + params( + use_main_content_only: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::OrSymbol + ) + ).void + end attr_writer :use_main_content_only + # Optional browser wait time in milliseconds after initial page load before + # converting the page to Markdown. Min: 0. Max: 30000 (30 seconds). + sig { returns(T.nilable(Integer)) } + attr_accessor :wait_for_ms + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + sig do + returns(T.nilable(BrandDev::BrandWebScrapeMdParams::Zdr::OrSymbol)) + end + attr_reader :zdr + + sig { params(zdr: BrandDev::BrandWebScrapeMdParams::Zdr::OrSymbol).void } + attr_writer :zdr + sig do params( url: String, - include_images: T::Boolean, - include_links: T::Boolean, - shorten_base64_images: T::Boolean, - use_main_content_only: T::Boolean, + actions: + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeMdParams::Action::Wait::OrHash, + BrandDev::BrandWebScrapeMdParams::Action::Perform::OrHash + ) + ] + ), + country: BrandDev::BrandWebScrapeMdParams::Country::OrSymbol, + exclude_selectors: T.nilable(T::Array[String]), + headers: T::Hash[Symbol, String], + include_frames: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeFrames::OrSymbol + ), + include_images: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeImages::OrSymbol + ), + include_links: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeLinks::OrSymbol + ), + include_selectors: T.nilable(T::Array[String]), + max_age_ms: T.nilable(Integer), + pdf: BrandDev::BrandWebScrapeMdParams::Pdf::OrHash, + settle_animations: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::SettleAnimations::OrSymbol + ), + shorten_base64_images: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::OrSymbol + ), + tags: T::Array[String], + timeout_ms: Integer, + use_main_content_only: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::OrSymbol + ), + wait_for_ms: T.nilable(Integer), + zdr: BrandDev::BrandWebScrapeMdParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( - # Full URL to scrape and convert to markdown (must include http:// or https:// + # Full URL to scrape into LLM usable Markdown (must include http:// or https:// # protocol) url:, + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + actions: nil, + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + country: nil, + # CSS selectors to remove before conversion to Markdown. Applied after + # includeSelectors. Exclusion takes precedence: an element matching both is + # removed. Examples: "nav", "footer", ".ad-banner", "[aria-hidden=true]". + exclude_selectors: nil, + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + headers: nil, + # When true, the contents of iframes are rendered to Markdown. + include_frames: nil, # Include image references in Markdown output include_images: nil, # Preserve hyperlinks in Markdown output include_links: nil, + # CSS selectors. When provided, only matching HTML subtrees (and their + # descendants) are kept before conversion to Markdown. When omitted, the entire + # document is kept. Examples: "article.main", "#content", "[role=main]". + include_selectors: nil, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + pdf: nil, + # When true, waits briefly for CSS and transition animations to settle before + # converting to Markdown. Defaults to false. This adds a bit of latency in + # exchange for more stable output on animated pages. + settle_animations: nil, # Shorten base64-encoded image data in the Markdown output shorten_base64_images: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, # Extract only the main content of the page, excluding headers, footers, sidebars, # and navigation use_main_content_only: nil, + # Optional browser wait time in milliseconds after initial page load before + # converting the page to Markdown. Min: 0. Max: 30000 (30 seconds). + wait_for_ms: nil, + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + zdr: nil, request_options: {} ) end @@ -76,16 +388,834 @@ module BrandDev override.returns( { url: String, - include_images: T::Boolean, - include_links: T::Boolean, - shorten_base64_images: T::Boolean, - use_main_content_only: T::Boolean, + actions: + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeMdParams::Action::Wait, + BrandDev::BrandWebScrapeMdParams::Action::Perform + ) + ] + ), + country: BrandDev::BrandWebScrapeMdParams::Country::OrSymbol, + exclude_selectors: T.nilable(T::Array[String]), + headers: T::Hash[Symbol, String], + include_frames: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeFrames::OrSymbol + ), + include_images: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeImages::OrSymbol + ), + include_links: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeLinks::OrSymbol + ), + include_selectors: T.nilable(T::Array[String]), + max_age_ms: T.nilable(Integer), + pdf: BrandDev::BrandWebScrapeMdParams::Pdf, + settle_animations: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::SettleAnimations::OrSymbol + ), + shorten_base64_images: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::OrSymbol + ), + tags: T::Array[String], + timeout_ms: Integer, + use_main_content_only: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::OrSymbol + ), + wait_for_ms: T.nilable(Integer), + zdr: BrandDev::BrandWebScrapeMdParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions } ) end def to_hash end + + # Browser action discriminated by `do`. Each variant exposes only its applicable + # fields. + module Action + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeMdParams::Action::Wait, + BrandDev::BrandWebScrapeMdParams::Action::Perform + ) + end + + class Wait < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeMdParams::Action::Wait, + BrandDev::Internal::AnyHash + ) + end + + sig { returns(Symbol) } + attr_accessor :do_ + + sig { returns(Integer) } + attr_accessor :time_ms + + # Pause for a fixed number of milliseconds before continuing to the next action. + sig do + params(time_ms: Integer, do_: Symbol).returns(T.attached_class) + end + def self.new(time_ms:, do_: :wait) + end + + sig { override.returns({ do_: Symbol, time_ms: Integer }) } + def to_hash + end + end + + class Perform < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeMdParams::Action::Perform, + BrandDev::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :action + + sig { returns(Symbol) } + attr_accessor :do_ + + # Resolve and perform one natural-language browser action. + sig { params(action: String, do_: Symbol).returns(T.attached_class) } + def self.new(action:, do_: :perform) + end + + sig { override.returns({ action: String, do_: Symbol }) } + def to_hash + end + end + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeMdParams::Action::Variants] + ) + end + def self.variants + end + end + + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + module Country + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeMdParams::Country) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AD = T.let(:ad, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AE = T.let(:ae, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AF = T.let(:af, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AG = T.let(:ag, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AI = T.let(:ai, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AL = T.let(:al, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AM = T.let(:am, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AO = T.let(:ao, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AR = T.let(:ar, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AT = T.let(:at, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AU = T.let(:au, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AW = T.let(:aw, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + AZ = T.let(:az, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BA = T.let(:ba, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BB = T.let(:bb, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BD = T.let(:bd, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BE = T.let(:be, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BF = T.let(:bf, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BG = T.let(:bg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BH = T.let(:bh, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BI = T.let(:bi, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BJ = T.let(:bj, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BM = T.let(:bm, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BN = T.let(:bn, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BO = T.let(:bo, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BQ = T.let(:bq, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BR = T.let(:br, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BS = T.let(:bs, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BW = T.let(:bw, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BY = T.let(:by, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + BZ = T.let(:bz, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CA = T.let(:ca, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CD = T.let(:cd, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CF = T.let(:cf, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CG = T.let(:cg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CH = T.let(:ch, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CI = T.let(:ci, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CL = T.let(:cl, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CM = T.let(:cm, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CN = T.let(:cn, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CO = T.let(:co, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CR = T.let(:cr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CV = T.let(:cv, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CW = T.let(:cw, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CY = T.let(:cy, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + CZ = T.let(:cz, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + DE = T.let(:de, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + DJ = T.let(:dj, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + DK = T.let(:dk, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + DM = T.let(:dm, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + DO = T.let(:do, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + DZ = T.let(:dz, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + EC = T.let(:ec, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + EE = T.let(:ee, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + EG = T.let(:eg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + ES = T.let(:es, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + ET = T.let(:et, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + FI = T.let(:fi, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + FJ = T.let(:fj, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + FR = T.let(:fr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GA = T.let(:ga, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GB = T.let(:gb, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GD = T.let(:gd, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GE = T.let(:ge, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GF = T.let(:gf, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GG = T.let(:gg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GH = T.let(:gh, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GM = T.let(:gm, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GN = T.let(:gn, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GP = T.let(:gp, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GQ = T.let(:gq, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GR = T.let(:gr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GT = T.let(:gt, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GU = T.let(:gu, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GW = T.let(:gw, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + GY = T.let(:gy, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + HK = T.let(:hk, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + HN = T.let(:hn, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + HR = T.let(:hr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + HT = T.let(:ht, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + HU = T.let(:hu, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + ID = T.let(:id, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + IE = T.let(:ie, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + IL = T.let(:il, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + IM = T.let(:im, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + IN = T.let(:in, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + IQ = T.let(:iq, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + IR = T.let(:ir, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + IS = T.let(:is, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + IT = T.let(:it, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + JE = T.let(:je, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + JM = T.let(:jm, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + JO = T.let(:jo, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + JP = T.let(:jp, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + KE = T.let(:ke, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + KG = T.let(:kg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + KH = T.let(:kh, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + KN = T.let(:kn, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + KR = T.let(:kr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + KW = T.let(:kw, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + KY = T.let(:ky, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + KZ = T.let(:kz, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LA = T.let(:la, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LB = T.let(:lb, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LC = T.let(:lc, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LK = T.let(:lk, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LR = T.let(:lr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LS = T.let(:ls, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LT = T.let(:lt, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LU = T.let(:lu, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LV = T.let(:lv, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + LY = T.let(:ly, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MA = T.let(:ma, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MC = T.let(:mc, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MD = T.let(:md, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + ME = T.let(:me, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MF = T.let(:mf, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MG = T.let(:mg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MK = T.let(:mk, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + ML = T.let(:ml, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MM = T.let(:mm, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MN = T.let(:mn, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MO = T.let(:mo, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MQ = T.let(:mq, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MR = T.let(:mr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MT = T.let(:mt, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MU = T.let(:mu, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MV = T.let(:mv, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MW = T.let(:mw, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MX = T.let(:mx, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MY = T.let(:my, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + MZ = T.let(:mz, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + NA = T.let(:na, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + NC = T.let(:nc, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + NE = T.let(:ne, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + NG = T.let(:ng, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + NI = T.let(:ni, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + NL = T.let(:nl, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + NO = T.let(:no, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + NP = T.let(:np, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + NZ = T.let(:nz, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + OM = T.let(:om, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PA = T.let(:pa, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PE = T.let(:pe, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PF = T.let(:pf, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PG = T.let(:pg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PH = T.let(:ph, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PK = T.let(:pk, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PL = T.let(:pl, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PR = T.let(:pr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PS = T.let(:ps, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PT = T.let(:pt, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + PY = T.let(:py, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + QA = T.let(:qa, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + RE = T.let(:re, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + RO = T.let(:ro, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + RS = T.let(:rs, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + RU = T.let(:ru, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + RW = T.let(:rw, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SA = T.let(:sa, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SC = T.let(:sc, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SD = T.let(:sd, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SE = T.let(:se, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SG = T.let(:sg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SI = T.let(:si, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SK = T.let(:sk, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SL = T.let(:sl, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SM = T.let(:sm, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SN = T.let(:sn, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SO = T.let(:so, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SR = T.let(:sr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SS = T.let(:ss, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + ST = T.let(:st, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SV = T.let(:sv, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SX = T.let(:sx, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SY = T.let(:sy, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + SZ = T.let(:sz, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TC = T.let(:tc, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TD = T.let(:td, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TG = T.let(:tg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TH = T.let(:th, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TJ = T.let(:tj, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TL = T.let(:tl, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TM = T.let(:tm, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TN = T.let(:tn, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TR = T.let(:tr, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TT = T.let(:tt, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TW = T.let(:tw, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + TZ = T.let(:tz, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + UA = T.let(:ua, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + UG = T.let(:ug, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + US = T.let(:us, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + UY = T.let(:uy, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + UZ = T.let(:uz, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + VC = T.let(:vc, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + VE = T.let(:ve, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + VG = T.let(:vg, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + VI = T.let(:vi, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + VN = T.let(:vn, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + YE = T.let(:ye, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + YT = T.let(:yt, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + ZA = T.let(:za, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + ZM = T.let(:zm, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + ZW = T.let(:zw, BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol) + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeMdParams::Country::TaggedSymbol] + ) + end + def self.values + end + end + + # When true, the contents of iframes are rendered to Markdown. + module IncludeFrames + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeFrames::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeMdParams::IncludeFrames::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeMdParams::IncludeFrames) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeMdParams::IncludeFrames::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeMdParams::IncludeFrames::TaggedSymbol + ) + end + + # Include image references in Markdown output + module IncludeImages + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeImages::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeMdParams::IncludeImages::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeMdParams::IncludeImages) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeMdParams::IncludeImages::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeMdParams::IncludeImages::TaggedSymbol + ) + end + + # Preserve hyperlinks in Markdown output + module IncludeLinks + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeLinks::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeMdParams::IncludeLinks::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeMdParams::IncludeLinks) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeMdParams::IncludeLinks::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeMdParams::IncludeLinks::TaggedSymbol + ) + end + + class Pdf < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::BrandWebScrapeMdParams::Pdf, + BrandDev::Internal::AnyHash + ) + end + + # Last 1-based PDF page to parse. When omitted, parsing ends at the last page. + # Must be greater than or equal to start when both are provided. + sig { returns(T.nilable(Integer)) } + attr_reader :end_ + + sig { params(end_: Integer).void } + attr_writer :end_ + + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::Ocr::OrSymbol + ) + ) + ) + end + attr_reader :ocr + + sig do + params( + ocr: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::Ocr::OrSymbol + ) + ).void + end + attr_writer :ocr + + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + sig do + returns( + T.nilable( + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse::OrSymbol + ) + ) + ) + end + attr_reader :should_parse + + sig do + params( + should_parse: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse::OrSymbol + ) + ).void + end + attr_writer :should_parse + + # First 1-based PDF page to parse. When omitted, parsing starts at the first page. + sig { returns(T.nilable(Integer)) } + attr_reader :start + + sig { params(start: Integer).void } + attr_writer :start + + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + sig do + params( + end_: Integer, + ocr: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::Ocr::OrSymbol + ), + should_parse: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse::OrSymbol + ), + start: Integer + ).returns(T.attached_class) + end + def self.new( + # Last 1-based PDF page to parse. When omitted, parsing ends at the last page. + # Must be greater than or equal to start when both are provided. + end_: nil, + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + ocr: nil, + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + should_parse: nil, + # First 1-based PDF page to parse. When omitted, parsing starts at the first page. + start: nil + ) + end + + sig do + override.returns( + { + end_: Integer, + ocr: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::Ocr::OrSymbol + ), + should_parse: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse::OrSymbol + ), + start: Integer + } + ) + end + def to_hash + end + + # When true, detect and OCR images embedded in the selected PDF pages, inserting + # recognized text at each image's position in page reading order while preserving + # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback. + module Ocr + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::Ocr::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeMdParams::Pdf::Ocr::Variants] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeMdParams::Pdf::Ocr) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeMdParams::Pdf::Ocr::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeMdParams::Pdf::Ocr::TaggedSymbol + ) + end + + # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and + # a 400 WEBSITE_ACCESS_ERROR is returned. + module ShouldParse + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeMdParams::Pdf::ShouldParse::TaggedSymbol + ) + end + end + + # When true, waits briefly for CSS and transition animations to settle before + # converting to Markdown. Defaults to false. This adds a bit of latency in + # exchange for more stable output on animated pages. + module SettleAnimations + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::SettleAnimations::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeMdParams::SettleAnimations::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeMdParams::SettleAnimations) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeMdParams::SettleAnimations::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeMdParams::SettleAnimations::TaggedSymbol + ) + end + + # Shorten base64-encoded image data in the Markdown output + module ShortenBase64Images + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeMdParams::ShortenBase64Images) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::TaggedSymbol + ) + end + + # Extract only the main content of the page, excluding headers, footers, sidebars, + # and navigation + module UseMainContentOnly + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::TaggedSymbol + ) + end + + sig do + override.returns( + T::Array[ + BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::Variants + ] + ) + end + def self.variants + end + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeMdParams::UseMainContentOnly) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRUE = + T.let( + :true, + BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::TaggedSymbol + ) + FALSE = + T.let( + :false, + BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::TaggedSymbol + ) + end + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + module Zdr + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, BrandDev::BrandWebScrapeMdParams::Zdr) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLED = + T.let(:enabled, BrandDev::BrandWebScrapeMdParams::Zdr::TaggedSymbol) + DISABLED = + T.let(:disabled, BrandDev::BrandWebScrapeMdParams::Zdr::TaggedSymbol) + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeMdParams::Zdr::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/rbi/brand_dev/models/brand_web_scrape_md_response.rbi b/rbi/brand_dev/models/brand_web_scrape_md_response.rbi index b5ab6e86..d20d253e 100644 --- a/rbi/brand_dev/models/brand_web_scrape_md_response.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_md_response.rbi @@ -11,10 +11,27 @@ module BrandDev ) end + # UTF-8 byte length of the returned Markdown. Use 0 to identify an empty result + # and compare small values against your workload's minimum useful-content + # threshold. + sig { returns(Integer) } + attr_accessor :content_length + # Page content converted to GitHub Flavored Markdown sig { returns(String) } attr_accessor :markdown + # Metadata extracted from the scraped page HTML. + sig { returns(BrandDev::Models::BrandWebScrapeMdResponse::Metadata) } + attr_reader :metadata + + sig do + params( + metadata: BrandDev::Models::BrandWebScrapeMdResponse::Metadata::OrHash + ).void + end + attr_writer :metadata + # Indicates success sig do returns( @@ -27,37 +44,573 @@ module BrandDev sig { returns(String) } attr_accessor :url + # One verified outcome per requested browser action, in request order. + sig do + returns( + T.nilable( + T::Array[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied] + ) + ) + end + attr_reader :actions_applied + sig do params( + actions_applied: + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::OrHash + ] + ).void + end + attr_writer :actions_applied + + # True when an action was applied but the returned content could not be refreshed + # afterward. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :actions_html_stale + + sig { params(actions_html_stale: T::Boolean).void } + attr_writer :actions_html_stale + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable(BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + + sig do + params( + content_length: Integer, markdown: String, + metadata: + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::OrHash, success: BrandDev::Models::BrandWebScrapeMdResponse::Success::OrBoolean, - url: String + url: String, + actions_applied: + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::OrHash + ], + actions_html_stale: T::Boolean, + key_metadata: + BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata::OrHash ).returns(T.attached_class) end def self.new( + # UTF-8 byte length of the returned Markdown. Use 0 to identify an empty result + # and compare small values against your workload's minimum useful-content + # threshold. + content_length:, # Page content converted to GitHub Flavored Markdown markdown:, + # Metadata extracted from the scraped page HTML. + metadata:, # Indicates success success:, # The URL that was scraped - url: + url:, + # One verified outcome per requested browser action, in request order. + actions_applied: nil, + # True when an action was applied but the returned content could not be refreshed + # afterward. + actions_html_stale: nil, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil ) end sig do override.returns( { + content_length: Integer, markdown: String, + metadata: BrandDev::Models::BrandWebScrapeMdResponse::Metadata, success: BrandDev::Models::BrandWebScrapeMdResponse::Success::TaggedBoolean, - url: String + url: String, + actions_applied: + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied + ], + actions_html_stale: T::Boolean, + key_metadata: + BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata } ) end def to_hash end + class Metadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeMdResponse::Metadata, + BrandDev::Internal::AnyHash + ) + end + + # Final URL scraped after redirects or scraper fallback, when known. Falls back to + # sourceUrl when unavailable. + sig { returns(String) } + attr_accessor :final_url + + # Original URL requested by the caller. + sig { returns(String) } + attr_accessor :source_url + + # Additional non-social meta tags not promoted to top-level metadata fields. + sig do + returns( + T.nilable( + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::AdditionalMeta::Variants + ] + ) + ) + end + attr_reader :additional_meta + + sig do + params( + additional_meta: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::AdditionalMeta::Variants + ] + ).void + end + attr_writer :additional_meta + + # Resolved alternate links from link rel=alternate tags. + sig do + returns( + T.nilable( + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate + ] + ) + ) + end + attr_reader :alternates + + sig do + params( + alternates: + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate::OrHash + ] + ).void + end + attr_writer :alternates + + # Author metadata, when present. + sig { returns(T.nilable(String)) } + attr_reader :author + + sig { params(author: String).void } + attr_writer :author + + # Resolved canonical URL, when present. + sig { returns(T.nilable(String)) } + attr_reader :canonical_url + + sig { params(canonical_url: String).void } + attr_writer :canonical_url + + # Best description extracted from standard, Open Graph, or Twitter metadata. + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + # Resolved favicon URL, when present. + sig { returns(T.nilable(String)) } + attr_reader :favicon + + sig { params(favicon: String).void } + attr_writer :favicon + + # Primary resolved preview image from Open Graph, Twitter, or image metadata. + sig { returns(T.nilable(String)) } + attr_reader :image + + sig { params(image: String).void } + attr_writer :image + + # JSON-LD structured data blocks parsed from the page. + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_reader :json_ld + + sig { params(json_ld: T::Array[T::Hash[Symbol, T.anything]]).void } + attr_writer :json_ld + + # Keywords extracted from the page's keywords meta tag. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :keywords + + sig { params(keywords: T::Array[String]).void } + attr_writer :keywords + + # Language extracted from html lang or language meta tags. + sig { returns(T.nilable(String)) } + attr_reader :language + + sig { params(language: String).void } + attr_writer :language + + # Modified timestamp/date from page metadata, when present. + sig { returns(T.nilable(String)) } + attr_reader :modified_time + + sig { params(modified_time: String).void } + attr_writer :modified_time + + # Open Graph metadata with the og: prefix removed and keys camel-cased. + sig do + returns( + T.nilable( + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::OpenGraph::Variants + ] + ) + ) + end + attr_reader :open_graph + + sig do + params( + open_graph: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::OpenGraph::Variants + ] + ).void + end + attr_writer :open_graph + + # Published timestamp/date from page metadata, when present. + sig { returns(T.nilable(String)) } + attr_reader :published_time + + sig { params(published_time: String).void } + attr_writer :published_time + + # Robots meta directive, when present. + sig { returns(T.nilable(String)) } + attr_reader :robots + + sig { params(robots: String).void } + attr_writer :robots + + # Site or application name from page metadata. + sig { returns(T.nilable(String)) } + attr_reader :site_name + + sig { params(site_name: String).void } + attr_writer :site_name + + # Best title extracted from the page. + sig { returns(T.nilable(String)) } + attr_reader :title + + sig { params(title: String).void } + attr_writer :title + + # Twitter card metadata with the twitter: prefix removed and keys camel-cased. + sig do + returns( + T.nilable( + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Twitter::Variants + ] + ) + ) + end + attr_reader :twitter + + sig do + params( + twitter: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Twitter::Variants + ] + ).void + end + attr_writer :twitter + + # Metadata extracted from the scraped page HTML. + sig do + params( + final_url: String, + source_url: String, + additional_meta: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::AdditionalMeta::Variants + ], + alternates: + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate::OrHash + ], + author: String, + canonical_url: String, + description: String, + favicon: String, + image: String, + json_ld: T::Array[T::Hash[Symbol, T.anything]], + keywords: T::Array[String], + language: String, + modified_time: String, + open_graph: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::OpenGraph::Variants + ], + published_time: String, + robots: String, + site_name: String, + title: String, + twitter: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Twitter::Variants + ] + ).returns(T.attached_class) + end + def self.new( + # Final URL scraped after redirects or scraper fallback, when known. Falls back to + # sourceUrl when unavailable. + final_url:, + # Original URL requested by the caller. + source_url:, + # Additional non-social meta tags not promoted to top-level metadata fields. + additional_meta: nil, + # Resolved alternate links from link rel=alternate tags. + alternates: nil, + # Author metadata, when present. + author: nil, + # Resolved canonical URL, when present. + canonical_url: nil, + # Best description extracted from standard, Open Graph, or Twitter metadata. + description: nil, + # Resolved favicon URL, when present. + favicon: nil, + # Primary resolved preview image from Open Graph, Twitter, or image metadata. + image: nil, + # JSON-LD structured data blocks parsed from the page. + json_ld: nil, + # Keywords extracted from the page's keywords meta tag. + keywords: nil, + # Language extracted from html lang or language meta tags. + language: nil, + # Modified timestamp/date from page metadata, when present. + modified_time: nil, + # Open Graph metadata with the og: prefix removed and keys camel-cased. + open_graph: nil, + # Published timestamp/date from page metadata, when present. + published_time: nil, + # Robots meta directive, when present. + robots: nil, + # Site or application name from page metadata. + site_name: nil, + # Best title extracted from the page. + title: nil, + # Twitter card metadata with the twitter: prefix removed and keys camel-cased. + twitter: nil + ) + end + + sig do + override.returns( + { + final_url: String, + source_url: String, + additional_meta: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::AdditionalMeta::Variants + ], + alternates: + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate + ], + author: String, + canonical_url: String, + description: String, + favicon: String, + image: String, + json_ld: T::Array[T::Hash[Symbol, T.anything]], + keywords: T::Array[String], + language: String, + modified_time: String, + open_graph: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::OpenGraph::Variants + ], + published_time: String, + robots: String, + site_name: String, + title: String, + twitter: + T::Hash[ + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Twitter::Variants + ] + } + ) + end + def to_hash + end + + module AdditionalMeta + extend BrandDev::Internal::Type::Union + + Variants = T.type_alias { T.any(String, T::Array[String]) } + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::AdditionalMeta::Variants + ] + ) + end + def self.variants + end + + StringArray = + T.let( + BrandDev::Internal::Type::ArrayOf[String], + BrandDev::Internal::Type::Converter + ) + end + + class Alternate < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate, + BrandDev::Internal::AnyHash + ) + end + + # Resolved alternate URL. + sig { returns(String) } + attr_accessor :href + + # Language or locale for the alternate URL, when present. + sig { returns(T.nilable(String)) } + attr_reader :hreflang + + sig { params(hreflang: String).void } + attr_writer :hreflang + + # Alternate resource title, when present. + sig { returns(T.nilable(String)) } + attr_reader :title + + sig { params(title: String).void } + attr_writer :title + + # Alternate resource MIME type, when present. + sig { returns(T.nilable(String)) } + attr_reader :type + + sig { params(type: String).void } + attr_writer :type + + sig do + params( + href: String, + hreflang: String, + title: String, + type: String + ).returns(T.attached_class) + end + def self.new( + # Resolved alternate URL. + href:, + # Language or locale for the alternate URL, when present. + hreflang: nil, + # Alternate resource title, when present. + title: nil, + # Alternate resource MIME type, when present. + type: nil + ) + end + + sig do + override.returns( + { href: String, hreflang: String, title: String, type: String } + ) + end + def to_hash + end + end + + module OpenGraph + extend BrandDev::Internal::Type::Union + + Variants = T.type_alias { T.any(String, T::Array[String]) } + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::OpenGraph::Variants + ] + ) + end + def self.variants + end + + StringArray = + T.let( + BrandDev::Internal::Type::ArrayOf[String], + BrandDev::Internal::Type::Converter + ) + end + + module Twitter + extend BrandDev::Internal::Type::Union + + Variants = T.type_alias { T.any(String, T::Array[String]) } + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Twitter::Variants + ] + ) + end + def self.variants + end + + StringArray = + T.let( + BrandDev::Internal::Type::ArrayOf[String], + BrandDev::Internal::Type::Converter + ) + end + end + # Indicates success module Success extend BrandDev::Internal::Type::Enum @@ -87,6 +640,184 @@ module BrandDev def self.values end end + + class ActionsApplied < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied, + BrandDev::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :instruction + + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + sig do + returns( + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status::TaggedSymbol + ) + end + attr_accessor :status + + # Visible page evidence used to verify an applied action. + sig { returns(T.nilable(String)) } + attr_reader :completion_evidence + + sig { params(completion_evidence: String).void } + attr_writer :completion_evidence + + sig { returns(T.nilable(Float)) } + attr_reader :duration_ms + + sig { params(duration_ms: Float).void } + attr_writer :duration_ms + + sig { returns(T.nilable(String)) } + attr_reader :error + + sig { params(error: String).void } + attr_writer :error + + sig { returns(T.nilable(String)) } + attr_reader :method_ + + sig { params(method_: String).void } + attr_writer :method_ + + sig { returns(T.nilable(String)) } + attr_reader :target_description + + sig { params(target_description: String).void } + attr_writer :target_description + + sig do + params( + instruction: String, + status: + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status::OrSymbol, + completion_evidence: String, + duration_ms: Float, + error: String, + method_: String, + target_description: String + ).returns(T.attached_class) + end + def self.new( + instruction:, + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + status:, + # Visible page evidence used to verify an applied action. + completion_evidence: nil, + duration_ms: nil, + error: nil, + method_: nil, + target_description: nil + ) + end + + sig do + override.returns( + { + instruction: String, + status: + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status::TaggedSymbol, + completion_evidence: String, + duration_ms: Float, + error: String, + method_: String, + target_description: String + } + ) + end + def to_hash + end + + # Applied means the requested page state was visibly verified. Failed means it was + # not verified. Skipped means it was not attempted. + module Status + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPLIED = + T.let( + :applied, + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status::TaggedSymbol + ) + FAILED = + T.let( + :failed, + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status::TaggedSymbol + ) + SKIPPED = + T.let( + :skipped, + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/brand_web_scrape_sitemap_params.rbi b/rbi/brand_dev/models/brand_web_scrape_sitemap_params.rbi index 8de97892..4b2b3fe9 100644 --- a/rbi/brand_dev/models/brand_web_scrape_sitemap_params.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_sitemap_params.rbi @@ -14,11 +14,19 @@ module BrandDev ) end - # Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be - # automatically normalized and validated. + # Domain to build a sitemap for sig { returns(String) } attr_accessor :domain + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_reader :headers + + sig { params(headers: T::Hash[Symbol, String]).void } + attr_writer :headers + # Maximum number of links to return from the sitemap crawl. Defaults to 10,000. # Minimum is 1, maximum is 100,000. sig { returns(T.nilable(Integer)) } @@ -27,20 +35,96 @@ module BrandDev sig { params(max_links: Integer).void } attr_writer :max_links + # Optional explicit sitemap URL. When provided, exactly this sitemap is crawled + # instead of discovering the domain's sitemaps. + sig { returns(T.nilable(String)) } + attr_reader :sitemap_url + + sig { params(sitemap_url: String).void } + attr_writer :sitemap_url + + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :tags + + sig { params(tags: T::Array[String]).void } + attr_writer :tags + + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + sig { returns(T.nilable(Integer)) } + attr_reader :timeout_ms + + sig { params(timeout_ms: Integer).void } + attr_writer :timeout_ms + + # Optional RE2-compatible regex pattern. Only URLs matching this pattern are + # returned and counted against maxLinks. + sig { returns(T.nilable(String)) } + attr_reader :url_regex + + sig { params(url_regex: String).void } + attr_writer :url_regex + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + sig do + returns(T.nilable(BrandDev::BrandWebScrapeSitemapParams::Zdr::OrSymbol)) + end + attr_reader :zdr + + sig do + params(zdr: BrandDev::BrandWebScrapeSitemapParams::Zdr::OrSymbol).void + end + attr_writer :zdr + sig do params( domain: String, + headers: T::Hash[Symbol, String], max_links: Integer, + sitemap_url: String, + tags: T::Array[String], + timeout_ms: Integer, + url_regex: String, + zdr: BrandDev::BrandWebScrapeSitemapParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( - # Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be - # automatically normalized and validated. + # Domain to build a sitemap for domain:, + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + headers: nil, # Maximum number of links to return from the sitemap crawl. Defaults to 10,000. # Minimum is 1, maximum is 100,000. max_links: nil, + # Optional explicit sitemap URL. When provided, exactly this sitemap is crawled + # instead of discovering the domain's sitemaps. + sitemap_url: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, + # Optional RE2-compatible regex pattern. Only URLs matching this pattern are + # returned and counted against maxLinks. + url_regex: nil, + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + zdr: nil, request_options: {} ) end @@ -49,13 +133,52 @@ module BrandDev override.returns( { domain: String, + headers: T::Hash[Symbol, String], max_links: Integer, + sitemap_url: String, + tags: T::Array[String], + timeout_ms: Integer, + url_regex: String, + zdr: BrandDev::BrandWebScrapeSitemapParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions } ) end def to_hash end + + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + module Zdr + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, BrandDev::BrandWebScrapeSitemapParams::Zdr) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLED = + T.let( + :enabled, + BrandDev::BrandWebScrapeSitemapParams::Zdr::TaggedSymbol + ) + DISABLED = + T.let( + :disabled, + BrandDev::BrandWebScrapeSitemapParams::Zdr::TaggedSymbol + ) + + sig do + override.returns( + T::Array[BrandDev::BrandWebScrapeSitemapParams::Zdr::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/rbi/brand_dev/models/brand_web_scrape_sitemap_response.rbi b/rbi/brand_dev/models/brand_web_scrape_sitemap_response.rbi index 333f297a..c5cc99e1 100644 --- a/rbi/brand_dev/models/brand_web_scrape_sitemap_response.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_sitemap_response.rbi @@ -38,13 +38,34 @@ module BrandDev sig { returns(T::Array[String]) } attr_accessor :urls + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + returns( + T.nilable( + BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata + ) + ) + end + attr_reader :key_metadata + + sig do + params( + key_metadata: + BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata::OrHash + ).void + end + attr_writer :key_metadata + sig do params( domain: String, meta: BrandDev::Models::BrandWebScrapeSitemapResponse::Meta::OrHash, success: BrandDev::Models::BrandWebScrapeSitemapResponse::Success::OrBoolean, - urls: T::Array[String] + urls: T::Array[String], + key_metadata: + BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata::OrHash ).returns(T.attached_class) end def self.new( @@ -55,7 +76,10 @@ module BrandDev # Indicates success success:, # Array of discovered page URLs from the sitemap (max 500) - urls: + urls:, + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + key_metadata: nil ) end @@ -66,7 +90,9 @@ module BrandDev meta: BrandDev::Models::BrandWebScrapeSitemapResponse::Meta, success: BrandDev::Models::BrandWebScrapeSitemapResponse::Success::TaggedBoolean, - urls: T::Array[String] + urls: T::Array[String], + key_metadata: + BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata } ) end @@ -162,6 +188,47 @@ module BrandDev def self.values end end + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata, + BrandDev::Internal::AnyHash + ) + end + + # The number of credits consumed by this request. + sig { returns(Integer) } + attr_accessor :credits_consumed + + # The number of credits remaining for your organization after this request. + sig { returns(Integer) } + attr_accessor :credits_remaining + + # Metadata about the API key used for the request. Included in every response + # whenever a valid API key is provided, even when the response status is not 200. + sig do + params(credits_consumed: Integer, credits_remaining: Integer).returns( + T.attached_class + ) + end + def self.new( + # The number of credits consumed by this request. + credits_consumed:, + # The number of credits remaining for your organization after this request. + credits_remaining: + ) + end + + sig do + override.returns( + { credits_consumed: Integer, credits_remaining: Integer } + ) + end + def to_hash + end + end end end end diff --git a/rbi/brand_dev/models/crawl_controls.rbi b/rbi/brand_dev/models/crawl_controls.rbi new file mode 100644 index 00000000..ca576a9b --- /dev/null +++ b/rbi/brand_dev/models/crawl_controls.rbi @@ -0,0 +1,261 @@ +# typed: strong + +module BrandDev + module Models + class CrawlControls < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(BrandDev::CrawlControls, BrandDev::Internal::AnyHash) + end + + # Whether links to subdomains were followed. Always false for a sitemap crawl. + sig { returns(T::Boolean) } + attr_accessor :follow_subdomains + + # Link depth limit. Always 0 for a sitemap crawl, which never follows links off + # its URLs; null when a `start_url` crawl set no limit. + sig { returns(T.nilable(Integer)) } + attr_accessor :max_depth + + # The `maxUrls` submitted with the crawl. A sitemap crawl scrapes only the URLs + # its sitemap actually lists, up to this many, so `input.reserved` is often lower. + sig { returns(Integer) } + attr_accessor :max_pages + + # Where the crawl started. + sig do + returns( + T.any( + BrandDev::CrawlControls::Source::UnionMember0, + BrandDev::CrawlControls::Source::UnionMember1 + ) + ) + end + attr_accessor :source + + # RE2 pattern URLs had to match to be crawled. Null when the crawl set none. + sig { returns(T.nilable(String)) } + attr_accessor :url_pattern + + # The crawl controls as submitted, so the limits requested can be compared against + # what the crawl reached. + sig do + params( + follow_subdomains: T::Boolean, + max_depth: T.nilable(Integer), + max_pages: Integer, + source: + T.any( + BrandDev::CrawlControls::Source::UnionMember0::OrHash, + BrandDev::CrawlControls::Source::UnionMember1::OrHash + ), + url_pattern: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Whether links to subdomains were followed. Always false for a sitemap crawl. + follow_subdomains:, + # Link depth limit. Always 0 for a sitemap crawl, which never follows links off + # its URLs; null when a `start_url` crawl set no limit. + max_depth:, + # The `maxUrls` submitted with the crawl. A sitemap crawl scrapes only the URLs + # its sitemap actually lists, up to this many, so `input.reserved` is often lower. + max_pages:, + # Where the crawl started. + source:, + # RE2 pattern URLs had to match to be crawled. Null when the crawl set none. + url_pattern: + ) + end + + sig do + override.returns( + { + follow_subdomains: T::Boolean, + max_depth: T.nilable(Integer), + max_pages: Integer, + source: + T.any( + BrandDev::CrawlControls::Source::UnionMember0, + BrandDev::CrawlControls::Source::UnionMember1 + ), + url_pattern: T.nilable(String) + } + ) + end + def to_hash + end + + # Where the crawl started. + module Source + extend BrandDev::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + BrandDev::CrawlControls::Source::UnionMember0, + BrandDev::CrawlControls::Source::UnionMember1 + ) + end + + class UnionMember0 < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::CrawlControls::Source::UnionMember0, + BrandDev::Internal::AnyHash + ) + end + + sig do + returns( + BrandDev::CrawlControls::Source::UnionMember0::Type::OrSymbol + ) + end + attr_accessor :type + + # Page the crawl started from. + sig { returns(String) } + attr_accessor :url + + sig do + params( + type: + BrandDev::CrawlControls::Source::UnionMember0::Type::OrSymbol, + url: String + ).returns(T.attached_class) + end + def self.new( + type:, + # Page the crawl started from. + url: + ) + end + + sig do + override.returns( + { + type: + BrandDev::CrawlControls::Source::UnionMember0::Type::OrSymbol, + url: String + } + ) + end + def to_hash + end + + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::CrawlControls::Source::UnionMember0::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + START_URL = + T.let( + :start_url, + BrandDev::CrawlControls::Source::UnionMember0::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::CrawlControls::Source::UnionMember0::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class UnionMember1 < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + BrandDev::CrawlControls::Source::UnionMember1, + BrandDev::Internal::AnyHash + ) + end + + # Domain whose sitemap supplied the pages. + sig { returns(String) } + attr_accessor :domain + + sig do + returns( + BrandDev::CrawlControls::Source::UnionMember1::Type::OrSymbol + ) + end + attr_accessor :type + + sig do + params( + domain: String, + type: + BrandDev::CrawlControls::Source::UnionMember1::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Domain whose sitemap supplied the pages. + domain:, + type: + ) + end + + sig do + override.returns( + { + domain: String, + type: + BrandDev::CrawlControls::Source::UnionMember1::Type::OrSymbol + } + ) + end + def to_hash + end + + module Type + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + BrandDev::CrawlControls::Source::UnionMember1::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SITEMAP = + T.let( + :sitemap, + BrandDev::CrawlControls::Source::UnionMember1::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + BrandDev::CrawlControls::Source::UnionMember1::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns(T::Array[BrandDev::CrawlControls::Source::Variants]) + end + def self.variants + end + end + end + end +end diff --git a/rbi/brand_dev/models/failure.rbi b/rbi/brand_dev/models/failure.rbi new file mode 100644 index 00000000..3f7e43be --- /dev/null +++ b/rbi/brand_dev/models/failure.rbi @@ -0,0 +1,33 @@ +# typed: strong + +module BrandDev + module Models + class Failure < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias { T.any(BrandDev::Failure, BrandDev::Internal::AnyHash) } + + # Why the batch itself stopped. + sig { returns(String) } + attr_accessor :code + + # Human-readable explanation. + sig { returns(String) } + attr_accessor :message + + # A failure of the batch as a whole, distinct from the per-page failures in + # `page_errors`. + sig { params(code: String, message: String).returns(T.attached_class) } + def self.new( + # Why the batch itself stopped. + code:, + # Human-readable explanation. + message: + ) + end + + sig { override.returns({ code: String, message: String }) } + def to_hash + end + end + end +end diff --git a/rbi/brand_dev/models/intake.rbi b/rbi/brand_dev/models/intake.rbi new file mode 100644 index 00000000..f47a2bce --- /dev/null +++ b/rbi/brand_dev/models/intake.rbi @@ -0,0 +1,86 @@ +# typed: strong + +module BrandDev + module Models + class Intake < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias { T.any(BrandDev::Intake, BrandDev::Internal::AnyHash) } + + # URLs dropped before reserving because another entry resolved to the same page. + # Non-zero for sitemap crawls too, whose sitemaps routinely list a page more than + # once. + sig { returns(Integer) } + attr_accessor :duplicates + + # URLs from your list rejected as unusable; the same ones are itemised in + # `invalid_urls` at submission. Null for a crawl — a crawl that resolves no usable + # page is rejected outright with a 400 rather than accepted with an empty list. + sig { returns(T.nilable(Integer)) } + attr_accessor :invalid + + # Pages credits were reserved for. Everything else — progress, the refund, the + # completion percentage — is measured against this. + sig { returns(Integer) } + attr_accessor :reserved + + # Whether `reserved` is an upper bound the batch may finish under. True only for a + # crawl that follows links, whose reachable page count is unknowable until it + # runs. False for a scrape and for a sitemap crawl, where `reserved` is an exact + # page count. + sig { returns(T::Boolean) } + attr_accessor :reserved_is_ceiling + + # URLs in the list you sent, before validation and de-duplication. Null for a + # crawl, which is given a source rather than a list. + sig { returns(T.nilable(Integer)) } + attr_accessor :submitted + + # What submission took in, and what it charged for. + sig do + params( + duplicates: Integer, + invalid: T.nilable(Integer), + reserved: Integer, + reserved_is_ceiling: T::Boolean, + submitted: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # URLs dropped before reserving because another entry resolved to the same page. + # Non-zero for sitemap crawls too, whose sitemaps routinely list a page more than + # once. + duplicates:, + # URLs from your list rejected as unusable; the same ones are itemised in + # `invalid_urls` at submission. Null for a crawl — a crawl that resolves no usable + # page is rejected outright with a 400 rather than accepted with an empty list. + invalid:, + # Pages credits were reserved for. Everything else — progress, the refund, the + # completion percentage — is measured against this. + reserved:, + # Whether `reserved` is an upper bound the batch may finish under. True only for a + # crawl that follows links, whose reachable page count is unknowable until it + # runs. False for a scrape and for a sitemap crawl, where `reserved` is an exact + # page count. + reserved_is_ceiling:, + # URLs in the list you sent, before validation and de-duplication. Null for a + # crawl, which is given a source rather than a list. + submitted: + ) + end + + sig do + override.returns( + { + duplicates: Integer, + invalid: T.nilable(Integer), + reserved: Integer, + reserved_is_ceiling: T::Boolean, + submitted: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/brand_dev/models/page_error_count.rbi b/rbi/brand_dev/models/page_error_count.rbi new file mode 100644 index 00000000..459e5297 --- /dev/null +++ b/rbi/brand_dev/models/page_error_count.rbi @@ -0,0 +1,34 @@ +# typed: strong + +module BrandDev + module Models + class PageErrorCount < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(BrandDev::PageErrorCount, BrandDev::Internal::AnyHash) + end + + # Error code for these failures. + sig { returns(String) } + attr_accessor :code + + # Pages that failed with this code. + sig { returns(Integer) } + attr_accessor :count + + # Page failures sharing one error code. + sig { params(code: String, count: Integer).returns(T.attached_class) } + def self.new( + # Error code for these failures. + code:, + # Pages that failed with this code. + count: + ) + end + + sig { override.returns({ code: String, count: Integer }) } + def to_hash + end + end + end +end diff --git a/rbi/brand_dev/models/webhook_delivery.rbi b/rbi/brand_dev/models/webhook_delivery.rbi new file mode 100644 index 00000000..d2a970a0 --- /dev/null +++ b/rbi/brand_dev/models/webhook_delivery.rbi @@ -0,0 +1,166 @@ +# typed: strong + +module BrandDev + module Models + class WebhookDelivery < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(BrandDev::WebhookDelivery, BrandDev::Internal::AnyHash) + end + + sig { returns(Time) } + attr_accessor :attempted_at + + sig { returns(T.nilable(BrandDev::WebhookDelivery::Error)) } + attr_reader :error + + sig do + params(error: T.nilable(BrandDev::WebhookDelivery::Error::OrHash)).void + end + attr_writer :error + + # The event this delivery carried. Deliveries recorded before event selection + # existed report change.detected. + sig { returns(BrandDev::WebhookDelivery::Event::OrSymbol) } + attr_accessor :event + + # Identifier sent in the X-Context-Id header. + sig { returns(String) } + attr_accessor :event_id + + # The endpoint's final HTTP response status, or null when no response was + # received. + sig { returns(T.nilable(Integer)) } + attr_accessor :http_status + + # Delivery outcome. delivered means any 2xx response; rejected means a non-2xx + # response; failed means no HTTP response was received; skipped_unsafe_url means + # the URL failed the public-endpoint safety check. + sig { returns(BrandDev::WebhookDelivery::Status::OrSymbol) } + attr_accessor :status + + sig do + params( + attempted_at: Time, + error: T.nilable(BrandDev::WebhookDelivery::Error::OrHash), + event: BrandDev::WebhookDelivery::Event::OrSymbol, + event_id: String, + http_status: T.nilable(Integer), + status: BrandDev::WebhookDelivery::Status::OrSymbol + ).returns(T.attached_class) + end + def self.new( + attempted_at:, + error:, + # The event this delivery carried. Deliveries recorded before event selection + # existed report change.detected. + event:, + # Identifier sent in the X-Context-Id header. + event_id:, + # The endpoint's final HTTP response status, or null when no response was + # received. + http_status:, + # Delivery outcome. delivered means any 2xx response; rejected means a non-2xx + # response; failed means no HTTP response was received; skipped_unsafe_url means + # the URL failed the public-endpoint safety check. + status: + ) + end + + sig do + override.returns( + { + attempted_at: Time, + error: T.nilable(BrandDev::WebhookDelivery::Error), + event: BrandDev::WebhookDelivery::Event::OrSymbol, + event_id: String, + http_status: T.nilable(Integer), + status: BrandDev::WebhookDelivery::Status::OrSymbol + } + ) + end + def to_hash + end + + class Error < BrandDev::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(BrandDev::WebhookDelivery::Error, BrandDev::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :code + + sig { returns(String) } + attr_accessor :message + + sig { params(code: String, message: String).returns(T.attached_class) } + def self.new(code:, message:) + end + + sig { override.returns({ code: String, message: String }) } + def to_hash + end + end + + # The event this delivery carried. Deliveries recorded before event selection + # existed report change.detected. + module Event + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, BrandDev::WebhookDelivery::Event) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CHANGE_DETECTED = + T.let( + :"change.detected", + BrandDev::WebhookDelivery::Event::TaggedSymbol + ) + RUN_COMPLETED = + T.let( + :"run.completed", + BrandDev::WebhookDelivery::Event::TaggedSymbol + ) + + sig do + override.returns( + T::Array[BrandDev::WebhookDelivery::Event::TaggedSymbol] + ) + end + def self.values + end + end + + # Delivery outcome. delivered means any 2xx response; rejected means a non-2xx + # response; failed means no HTTP response was received; skipped_unsafe_url means + # the URL failed the public-endpoint safety check. + module Status + extend BrandDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, BrandDev::WebhookDelivery::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DELIVERED = + T.let(:delivered, BrandDev::WebhookDelivery::Status::TaggedSymbol) + REJECTED = + T.let(:rejected, BrandDev::WebhookDelivery::Status::TaggedSymbol) + FAILED = T.let(:failed, BrandDev::WebhookDelivery::Status::TaggedSymbol) + SKIPPED_UNSAFE_URL = + T.let( + :skipped_unsafe_url, + BrandDev::WebhookDelivery::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[BrandDev::WebhookDelivery::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/brand_dev/resources/batch.rbi b/rbi/brand_dev/resources/batch.rbi new file mode 100644 index 00000000..98309402 --- /dev/null +++ b/rbi/brand_dev/resources/batch.rbi @@ -0,0 +1,12 @@ +# typed: strong + +module BrandDev + module Resources + class Batch + # @api private + sig { params(client: BrandDev::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/brand_dev/resources/brand.rbi b/rbi/brand_dev/resources/brand.rbi index 40f60810..0e58461e 100644 --- a/rbi/brand_dev/resources/brand.rbi +++ b/rbi/brand_dev/resources/brand.rbi @@ -9,8 +9,18 @@ module BrandDev params( domain: String, force_language: - BrandDev::BrandRetrieveParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable(BrandDev::BrandRetrieveParams::ForceLanguage::OrSymbol), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveParams::MaxSpeed::OrSymbol + ), + name: String, + tags: T::Array[String], + ticker: String, + ticker_exchange: + BrandDev::BrandRetrieveParams::TickerExchange::OrSymbol, timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandRetrieveResponse) @@ -18,14 +28,30 @@ module BrandDev def retrieve( # Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). # Cannot be used with name or ticker parameters. - domain:, - # Optional parameter to force the language of the retrieved brand data. Works with - # all three lookup methods. + domain: nil, + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. Works with all three lookup methods. max_speed: nil, + # Company name to retrieve brand data for (e.g., 'Apple Inc'). Cannot be used with + # domain or ticker parameters. + name: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL'). Cannot be used + # with domain or name parameters. + ticker: nil, + # Stock exchange code. + ticker_exchange: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -34,12 +60,13 @@ module BrandDev ) end - # Beta feature: Given a single URL, determines if it is a product detail page, - # classifies the platform/product type, and extracts the product information. - # Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites. + # Given a single URL, determines if it is a product page and extracts the product + # information. sig do params( url: String, + max_age_ms: Integer, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandAIProductResponse) @@ -47,16 +74,23 @@ module BrandDev def ai_product( # The product page URL to extract product data from. url:, - # Optional timeout in milliseconds for the request. Maximum allowed value is - # 300000ms (5 minutes). + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). timeout_ms: nil, request_options: {} ) end - # Beta feature: Extract product information from a brand's website. We will - # analyze the website and return a list of products with details such as name, - # description, image, pricing, features, and more. + # Extract product information from a brand's website. We will analyze the website + # and return a list of products with details such as name, description, image, + # pricing, features, and more. sig do params( body: @@ -79,6 +113,7 @@ module BrandDev T::Array[BrandDev::BrandAIQueryParams::DataToExtract::OrHash], domain: String, specific_pages: BrandDev::BrandAIQueryParams::SpecificPages::OrHash, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandAIQueryResponse) @@ -90,6 +125,8 @@ module BrandDev domain:, # Optional object specifying which pages to analyze specific_pages: nil, + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -98,19 +135,36 @@ module BrandDev ) end - # Extract font information from a brand's website including font families, usage + # Scrape font information from a website including font families, usage # statistics, fallbacks, and element/word counts. sig do params( + direct_url: String, domain: String, + max_age_ms: T.nilable(Integer), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandFontsResponse) end def fonts( + # A specific URL to fetch fonts from directly, bypassing domain resolution (e.g., + # 'https://example.com/design-system'). When provided, fonts are extracted from + # this exact URL. You must provide either 'domain' or 'directUrl', but not both. + direct_url: nil, # Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. - domain:, + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. + domain: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -128,11 +182,22 @@ module BrandDev country_gl: BrandDev::BrandIdentifyFromTransactionParams::CountryGl::OrSymbol, force_language: - BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::OrSymbol, - high_confidence_only: T::Boolean, - max_speed: T::Boolean, - mcc: String, - phone: Float, + T.nilable( + BrandDev::BrandIdentifyFromTransactionParams::ForceLanguage::OrSymbol + ), + high_confidence_only: + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::HighConfidenceOnly::OrSymbol + ), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandIdentifyFromTransactionParams::MaxSpeed::OrSymbol + ), + mcc: BrandDev::BrandIdentifyFromTransactionParams::Mcc::Variants, + phone: BrandDev::BrandIdentifyFromTransactionParams::Phone::Variants, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandIdentifyFromTransactionResponse) @@ -142,14 +207,13 @@ module BrandDev transaction_info:, # Optional city name to prioritize when searching for the brand. city: nil, - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. country_gl: nil, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, # When set to true, the API will perform an additional verification steps to # ensure the identified brand matches the transaction with high confidence. - # Defaults to false. high_confidence_only: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of @@ -160,6 +224,10 @@ module BrandDev mcc: nil, # Optional phone number from the transaction to help verify brand match. phone: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -169,12 +237,11 @@ module BrandDev end # Signal that you may fetch brand data for a particular domain soon to improve - # latency. This endpoint does not charge credits and is available for paid - # customers to optimize future requests. [You must be on a paid plan to use this - # endpoint] + # latency. sig do params( domain: String, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandPrefetchResponse) @@ -182,6 +249,8 @@ module BrandDev def prefetch( # Domain name to prefetch brand data for domain:, + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -193,12 +262,11 @@ module BrandDev # Signal that you may fetch brand data for a particular domain soon to improve # latency. This endpoint accepts an email address, extracts the domain from it, # validates that it's not a disposable or free email provider, and queues the - # domain for prefetching. This endpoint does not charge credits and is available - # for paid customers to optimize future requests. [You must be on a paid plan to - # use this endpoint] + # domain for prefetching. sig do params( email: String, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandPrefetchByEmailResponse) @@ -208,6 +276,8 @@ module BrandDev # email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email # addresses are not allowed. email:, + # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -217,15 +287,22 @@ module BrandDev end # Retrieve brand information using an email address while detecting disposable and - # free email addresses. This endpoint extracts the domain from the email address - # and returns brand data for that domain. Disposable and free email addresses - # (like gmail.com, yahoo.com) will throw a 422 error. + # free email addresses. Disposable and free email addresses (like gmail.com, + # yahoo.com) will throw a 422 error. sig do params( email: String, force_language: - BrandDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByEmailParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandRetrieveByEmailResponse) @@ -235,12 +312,21 @@ module BrandDev # domain will be extracted from the email. Free email providers (gmail.com, # yahoo.com, etc.) and disposable email addresses are not allowed. email:, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. max_speed: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -250,14 +336,21 @@ module BrandDev end # Retrieve brand information using an ISIN (International Securities - # Identification Number). This endpoint looks up the company associated with the - # ISIN and returns its brand data. + # Identification Number). sig do params( isin: String, force_language: - BrandDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByIsinParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandRetrieveByIsinResponse) @@ -267,12 +360,21 @@ module BrandDev # (e.g., 'AU000000IMD5', 'US0378331005'). Must be exactly 12 characters: 2 letters # followed by 9 alphanumeric characters and ending with a digit. isin:, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. max_speed: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -281,15 +383,22 @@ module BrandDev ) end - # Retrieve brand information using a company name. This endpoint searches for the - # company by name and returns its brand data. + # Retrieve brand information using a company name. sig do params( name: String, country_gl: BrandDev::BrandRetrieveByNameParams::CountryGl::OrSymbol, force_language: - BrandDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByNameParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandRetrieveByNameResponse) @@ -298,15 +407,24 @@ module BrandDev # Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft # Corporation'). Must be 3-30 characters. name:, - # Optional country code (GL parameter) to specify the country. This affects the - # geographic location used for search queries. + # Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize + # search. country_gl: nil, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. max_speed: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -315,14 +433,21 @@ module BrandDev ) end - # Retrieve brand information using a stock ticker symbol. This endpoint looks up - # the company associated with the ticker and returns its brand data. + # Retrieve brand information using a stock ticker symbol. sig do params( ticker: String, force_language: - BrandDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol, - max_speed: T::Boolean, + T.nilable( + BrandDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol + ), + max_age_ms: T.nilable(Integer), + max_speed: + T.any( + T::Boolean, + BrandDev::BrandRetrieveByTickerParams::MaxSpeed::OrSymbol + ), + tags: T::Array[String], ticker_exchange: BrandDev::BrandRetrieveByTickerParams::TickerExchange::OrSymbol, timeout_ms: Integer, @@ -333,13 +458,22 @@ module BrandDev # Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). # Must be 1-15 characters, letters/numbers/dots only. ticker:, - # Optional parameter to force the language of the retrieved brand data. + # Language to force for the retrieved brand data. force_language: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, # Optional parameter to optimize the API call for maximum speed. When set to true, # the API will skip time-consuming operations for faster response at the cost of # less comprehensive data. max_speed: nil, - # Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Stock exchange code. ticker_exchange: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -349,26 +483,31 @@ module BrandDev ) end - # Endpoint to classify any brand into a 2022 NAICS code. + # Classify any brand into 2022 NAICS industry codes from its domain or name. sig do params( input: String, max_results: Integer, min_results: Integer, + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandRetrieveNaicsResponse) end def retrieve_naics( - # Brand domain or title to retrieve NAICS code for. If a valid domain is provided - # in `input`, it will be used for classification, otherwise, we will search for - # the brand using the provided title. + # Brand domain or title to retrieve NAICS code for. If a valid domain is provided, + # it will be used for classification, otherwise, we will search for the brand + # using the provided title. input:, # Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults # to 5. max_results: nil, # Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1. min_results: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -378,11 +517,14 @@ module BrandDev end # Returns a simplified version of brand data containing only essential - # information: domain, title, colors, logos, and backdrops. This endpoint is - # optimized for faster responses and reduced data transfer. + # information: domain, title, colors, logos, and backdrops. Optimized for faster + # responses and reduced data transfer. sig do params( domain: String, + max_age_ms: T.nilable(Integer), + tags: T::Array[String], + theme: BrandDev::BrandRetrieveSimplifiedParams::Theme::OrSymbol, timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandRetrieveSimplifiedResponse) @@ -390,6 +532,17 @@ module BrandDev def retrieve_simplified( # Domain name to retrieve simplified brand data for domain:, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional theme preference used when selecting brand assets. + theme: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -398,60 +551,129 @@ module BrandDev ) end - # Capture a screenshot of a website. Supports both viewport (standard browser - # view) and full-page screenshots. Can also screenshot specific page types (login, - # pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to - # the uploaded screenshot image hosted on our CDN. + # Capture a screenshot of a website. sig do params( + color_scheme: BrandDev::BrandScreenshotParams::ColorScheme::OrSymbol, + country: BrandDev::BrandScreenshotParams::Country::OrSymbol, + direct_url: String, domain: String, full_screenshot: BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol, + handle_cookie_popup: + T.any( + T::Boolean, + BrandDev::BrandScreenshotParams::HandleCookiePopup::OrSymbol + ), + max_age_ms: T.nilable(Integer), page: BrandDev::BrandScreenshotParams::Page::OrSymbol, - prioritize: BrandDev::BrandScreenshotParams::Prioritize::OrSymbol, + scroll_offset: T.nilable(Integer), + tags: T::Array[String], + timeout_ms: Integer, + viewport: BrandDev::BrandScreenshotParams::Viewport::OrHash, + wait_for_ms: T.nilable(Integer), + zdr: BrandDev::BrandScreenshotParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandScreenshotResponse) end def screenshot( + # Optional parameter to choose the site's visual theme in the screenshot. Use + # 'light' or 'dark' when the site offers both appearances. + color_scheme: nil, + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + country: nil, + # A specific URL to screenshot directly, bypassing domain resolution (e.g., + # 'https://example.com/pricing'). When provided, the screenshot is taken of this + # exact URL. You must provide either 'domain' or 'directUrl', but not both. + direct_url: nil, # Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. - domain:, + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. + domain: nil, # Optional parameter to determine screenshot type. If 'true', takes a full page # screenshot capturing all content. If 'false' or not provided, takes a viewport # screenshot (standard browser view). full_screenshot: nil, + # Optional parameter to control cookie/consent popup handling. If 'true', we + # dismiss cookie banner before capture. If 'false' or not provided, captures the + # page without that step. + handle_cookie_popup: nil, + # Return a cached screenshot if a prior screenshot for the same parameters exists + # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh. + max_age_ms: nil, # Optional parameter to specify which page type to screenshot. If provided, the # system will scrape the domain's links and use heuristics to find the most # appropriate URL for the specified page type (30 supported languages). If not - # provided, screenshots the main domain landing page. + # provided, screenshots the main domain landing page. Only applicable when using + # 'domain', not 'directUrl'. page: nil, - # Optional parameter to prioritize screenshot capture. If 'speed', optimizes for - # faster capture with basic quality. If 'quality', optimizes for higher quality - # with longer wait times. Defaults to 'quality' if not provided. - prioritize: nil, + # Optional vertical scroll offset in pixels for capturing a long page in + # viewport-sized chunks. When provided, the full page is captured once and the + # returned image is the viewport-sized slice that begins at this Y offset (e.g. + # request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page + # top to bottom). The final slice may be shorter than the viewport height. Takes + # precedence over fullScreenshot. Max: 100000. + scroll_offset: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, + # Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080. + viewport: nil, + # Optional browser wait time in milliseconds after initial page load before taking + # the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when + # omitted. + wait_for_ms: nil, + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + zdr: nil, request_options: {} ) end - # Automatically extract comprehensive design system information from a brand's - # website including colors, typography, spacing, shadows, and UI components. - # Either 'domain' or 'directUrl' must be provided as a query parameter, but not - # both. + # Extract a comprehensive design system from a website including colors, + # typography, spacing, shadows, and UI components. sig do params( + color_scheme: BrandDev::BrandStyleguideParams::ColorScheme::OrSymbol, direct_url: String, domain: String, + max_age_ms: T.nilable(Integer), + tags: T::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandStyleguideResponse) end def styleguide( + # Optional browser color scheme to emulate for websites that respond to + # prefers-color-scheme. This value is part of the styleguide cache key. + color_scheme: nil, # A specific URL to fetch the styleguide from directly, bypassing domain - # resolution (e.g., 'https://example.com/design-system'). + # resolution (e.g., 'https://example.com/design-system'). When provided, the + # styleguide is extracted from this exact URL. You must provide either 'domain' or + # 'directUrl', but not both. direct_url: nil, # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The - # domain will be automatically normalized and validated. + # domain will be automatically normalized and validated. You must provide either + # 'domain' or 'directUrl', but not both. domain: nil, + # Maximum age in milliseconds for cached brand data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -460,82 +682,354 @@ module BrandDev ) end - # Scrapes the given URL and returns the raw HTML content of the page. + # Scrapes the given URL and returns the raw HTML content of the page. The base + # request costs 1 credit; requests with browser actions cost 2 credits. sig do params( url: String, + actions: + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeHTMLParams::Action::Wait::OrHash, + BrandDev::BrandWebScrapeHTMLParams::Action::Perform::OrHash + ) + ] + ), + country: BrandDev::BrandWebScrapeHTMLParams::Country::OrSymbol, + exclude_selectors: T.nilable(T::Array[String]), + headers: T::Hash[Symbol, String], + include_frames: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::IncludeFrames::OrSymbol + ), + include_selectors: T.nilable(T::Array[String]), + max_age_ms: T.nilable(Integer), + pdf: BrandDev::BrandWebScrapeHTMLParams::Pdf::OrHash, + settle_animations: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::SettleAnimations::OrSymbol + ), + tags: T::Array[String], + timeout_ms: Integer, + use_main_content_only: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeHTMLParams::UseMainContentOnly::OrSymbol + ), + wait_for_ms: T.nilable(Integer), + zdr: BrandDev::BrandWebScrapeHTMLParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandWebScrapeHTMLResponse) end def web_scrape_html( # Full URL to scrape (must include http:// or https:// protocol) url:, + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + actions: nil, + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + country: nil, + # CSS selectors to remove from the result. Applied after includeSelectors. + # Exclusion takes precedence: an element matching both is removed. Examples: + # "nav", "footer", ".ad-banner", "[aria-hidden=true]". + exclude_selectors: nil, + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + headers: nil, + # When true, iframes are rendered inline into the returned HTML. + include_frames: nil, + # CSS selectors. When provided, only matching subtrees (and their descendants) are + # kept and everything else is dropped. When omitted, the entire document is kept. + # Examples: "article.main", "#content", "[role=main]". + include_selectors: nil, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + pdf: nil, + # When true, waits briefly for CSS and transition animations to settle before + # extracting HTML. Defaults to false. This adds a bit of latency in exchange for + # more stable output on animated pages. + settle_animations: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, + # When true, return only the page's main content in the HTML response, excluding + # headers, footers, sidebars, and navigation when detectable. + use_main_content_only: nil, + # Optional browser wait time in milliseconds after initial page load. Min: 0. Max: + # 30000 (30 seconds). + wait_for_ms: nil, + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + zdr: nil, request_options: {} ) end - # Scrapes all images from the given URL. Extracts images from img, svg, - # picture/source, link, and video elements including inline SVGs, base64 data - # URIs, and standard URLs. + # Extract image assets from a web page, including standard URLs, inline SVGs, data + # URIs, responsive image sources, metadata, CSS backgrounds, video posters, and + # embeds. The base request costs 1 credit, or 2 credits with browser actions. When + # enrichment is enabled, the entire call costs 5 credits, including requests that + # also use actions. sig do params( url: String, + actions: + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeImagesParams::Action::Wait::OrHash, + BrandDev::BrandWebScrapeImagesParams::Action::Perform::OrHash + ) + ] + ), + dedupe: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeImagesParams::Dedupe::OrSymbol + ), + enrichment: + T.nilable(BrandDev::BrandWebScrapeImagesParams::Enrichment::OrHash), + headers: T::Hash[Symbol, String], + max_age_ms: T.nilable(Integer), + tags: T::Array[String], + timeout_ms: Integer, + wait_for_ms: T.nilable(Integer), request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandWebScrapeImagesResponse) end def web_scrape_images( - # Full URL to scrape images from (must include http:// or https:// protocol) + # Page URL to inspect. Must include http:// or https://. url:, + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + actions: nil, + # When true, visually duplicate images are removed: every image is loaded and + # perceptually hashed, and only the highest-resolution copy of each duplicate + # group is kept. Images that cannot be downloaded or hashed are kept. Default: + # false. + dedupe: nil, + # Optional per-image processing, sent as deep-object query params such as + # enrichment[resolution]=true. + enrichment: nil, + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + headers: nil, + # Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 + # day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days). + max_age_ms: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, + # Optional browser wait time in milliseconds after initial page load before + # collecting images. Min: 0. Max: 30000 (30 seconds). + wait_for_ms: nil, request_options: {} ) end - # Scrapes the given URL, converts the HTML content to Markdown, and returns the - # result. + # Scrapes the given URL into LLM usable Markdown. Inspect key_metadata on JSON + # responses from a recognized API key; use error_code to distinguish stable + # failure categories. + # + # ### Billing & errors + # + # | HTTP status | Billed? | Meaning | + # | ----------- | ----------------------------------------- | ---------------------------------------------------------------------------------------- | + # | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing | + # | 400 | No | Invalid input, skipped PDF, or the page could not be scraped | + # | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code | + # | 404 | No | Target page returned or fingerprinted as not found | + # | 408 | No | Request timed out | + # | 415 | No | Unsupported content type | + # | 429 | No | Per-minute rate limit exceeded; honor Retry-After | + # | 500 | No | Internal error | sig do params( url: String, - include_images: T::Boolean, - include_links: T::Boolean, - shorten_base64_images: T::Boolean, - use_main_content_only: T::Boolean, + actions: + T.nilable( + T::Array[ + T.any( + BrandDev::BrandWebScrapeMdParams::Action::Wait::OrHash, + BrandDev::BrandWebScrapeMdParams::Action::Perform::OrHash + ) + ] + ), + country: BrandDev::BrandWebScrapeMdParams::Country::OrSymbol, + exclude_selectors: T.nilable(T::Array[String]), + headers: T::Hash[Symbol, String], + include_frames: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeFrames::OrSymbol + ), + include_images: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeImages::OrSymbol + ), + include_links: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::IncludeLinks::OrSymbol + ), + include_selectors: T.nilable(T::Array[String]), + max_age_ms: T.nilable(Integer), + pdf: BrandDev::BrandWebScrapeMdParams::Pdf::OrHash, + settle_animations: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::SettleAnimations::OrSymbol + ), + shorten_base64_images: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::ShortenBase64Images::OrSymbol + ), + tags: T::Array[String], + timeout_ms: Integer, + use_main_content_only: + T.any( + T::Boolean, + BrandDev::BrandWebScrapeMdParams::UseMainContentOnly::OrSymbol + ), + wait_for_ms: T.nilable(Integer), + zdr: BrandDev::BrandWebScrapeMdParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandWebScrapeMdResponse) end def web_scrape_md( - # Full URL to scrape and convert to markdown (must include http:// or https:// + # Full URL to scrape into LLM usable Markdown (must include http:// or https:// # protocol) url:, + # Optional browser actions executed in array order after the page loads and before + # content is captured. Requires a paid plan. Send a JSON array in the query + # parameter. Maximum: 5 actions. + actions: nil, + # Fetch the target page through a residential proxy in this country (ISO 3166-1 + # alpha-2). + country: nil, + # CSS selectors to remove before conversion to Markdown. Applied after + # includeSelectors. Exclusion takes precedence: an element matching both is + # removed. Examples: "nav", "footer", ".ad-banner", "[aria-hidden=true]". + exclude_selectors: nil, + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + headers: nil, + # When true, the contents of iframes are rendered to Markdown. + include_frames: nil, # Include image references in Markdown output include_images: nil, # Preserve hyperlinks in Markdown output include_links: nil, + # CSS selectors. When provided, only matching HTML subtrees (and their + # descendants) are kept before conversion to Markdown. When omitted, the entire + # document is kept. Examples: "article.main", "#content", "[role=main]". + include_selectors: nil, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 1 day (86400000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, + # PDF parsing controls. Use start/end to limit text extraction and embedded-image + # detection/OCR to an inclusive 1-based page range. + pdf: nil, + # When true, waits briefly for CSS and transition animations to settle before + # converting to Markdown. Defaults to false. This adds a bit of latency in + # exchange for more stable output on animated pages. + settle_animations: nil, # Shorten base64-encoded image data in the Markdown output shorten_base64_images: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, # Extract only the main content of the page, excluding headers, footers, sidebars, # and navigation use_main_content_only: nil, + # Optional browser wait time in milliseconds after initial page load before + # converting the page to Markdown. Min: 0. Max: 30000 (30 seconds). + wait_for_ms: nil, + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + zdr: nil, request_options: {} ) end - # Crawls the sitemap of the given domain and returns all discovered page URLs. - # Supports sitemap index files (recursive), parallel fetching with concurrency - # control, deduplication, and filters out non-page resources (images, PDFs, etc.). + # Crawl an entire website's sitemap and return all discovered page URLs. sig do params( domain: String, + headers: T::Hash[Symbol, String], max_links: Integer, + sitemap_url: String, + tags: T::Array[String], + timeout_ms: Integer, + url_regex: String, + zdr: BrandDev::BrandWebScrapeSitemapParams::Zdr::OrSymbol, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandWebScrapeSitemapResponse) end def web_scrape_sitemap( - # Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be - # automatically normalized and validated. + # Domain to build a sitemap for domain:, + # Optional outbound HTTP headers forwarded only to the target URL, sent as + # deep-object query params such as headers[X-Custom]=value. When provided, caching + # is bypassed: the result is neither read from nor written to cache. + headers: nil, # Maximum number of links to return from the sitemap crawl. Defaults to 10,000. # Minimum is 1, maximum is 100,000. max_links: nil, + # Optional explicit sitemap URL. When provided, exactly this sitemap is crawled + # instead of discovering the domain's sitemaps. + sitemap_url: nil, + # Optional comma-separated caller-defined tags for tracking this request. Tags are + # recorded on the request's usage log and can be used to filter usage on the + # dashboard usage page. Up to 20 tags, each 1-50 characters. + tags: nil, + # Optional timeout in milliseconds for the request. If the request takes longer + # than this value, it will be aborted with a 408 status code. Maximum allowed + # value is 300000ms (5 minutes). + timeout_ms: nil, + # Optional RE2-compatible regex pattern. Only URLs matching this pattern are + # returned and counted against maxLinks. + url_regex: nil, + # Set to enabled to bypass shared caches and omit request and response content + # from retained usage logs. Requires zero data retention to be enabled for your + # organization (contact support@context.dev), otherwise the request fails with + # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. + zdr: nil, request_options: {} ) end diff --git a/rbi/brand_dev/resources/monitors.rbi b/rbi/brand_dev/resources/monitors.rbi new file mode 100644 index 00000000..2d1741f4 --- /dev/null +++ b/rbi/brand_dev/resources/monitors.rbi @@ -0,0 +1,12 @@ +# typed: strong + +module BrandDev + module Resources + class Monitors + # @api private + sig { params(client: BrandDev::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/scripts/bootstrap b/scripts/bootstrap index 34878642..a5e1b80a 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response diff --git a/sig/brand_dev/client.rbs b/sig/brand_dev/client.rbs index caf79c74..ea6e7d06 100644 --- a/sig/brand_dev/client.rbs +++ b/sig/brand_dev/client.rbs @@ -12,6 +12,10 @@ module BrandDev attr_reader brand: BrandDev::Resources::Brand + attr_reader monitors: BrandDev::Resources::Monitors + + attr_reader batch: BrandDev::Resources::Batch + private def auth_headers: -> ::Hash[String, String] def initialize: ( diff --git a/sig/brand_dev/models.rbs b/sig/brand_dev/models.rbs index 4a5e14b6..12e5fa89 100644 --- a/sig/brand_dev/models.rbs +++ b/sig/brand_dev/models.rbs @@ -38,4 +38,14 @@ module BrandDev class BrandWebScrapeMdParams = BrandDev::Models::BrandWebScrapeMdParams class BrandWebScrapeSitemapParams = BrandDev::Models::BrandWebScrapeSitemapParams + + class CrawlControls = BrandDev::Models::CrawlControls + + class Failure = BrandDev::Models::Failure + + class Intake = BrandDev::Models::Intake + + class PageErrorCount = BrandDev::Models::PageErrorCount + + class WebhookDelivery = BrandDev::Models::WebhookDelivery end diff --git a/sig/brand_dev/models/brand_ai_product_params.rbs b/sig/brand_dev/models/brand_ai_product_params.rbs index d3c1a3cb..f18dab50 100644 --- a/sig/brand_dev/models/brand_ai_product_params.rbs +++ b/sig/brand_dev/models/brand_ai_product_params.rbs @@ -1,7 +1,12 @@ module BrandDev module Models type brand_ai_product_params = - { url: String, timeout_ms: Integer } + { + url: String, + max_age_ms: Integer, + tags: ::Array[String], + timeout_ms: Integer + } & BrandDev::Internal::Type::request_parameters class BrandAIProductParams < BrandDev::Internal::Type::BaseModel @@ -10,18 +15,30 @@ module BrandDev attr_accessor url: String + attr_reader max_age_ms: Integer? + + def max_age_ms=: (Integer) -> Integer + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( url: String, + ?max_age_ms: Integer, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { url: String, + max_age_ms: Integer, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/sig/brand_dev/models/brand_ai_product_response.rbs b/sig/brand_dev/models/brand_ai_product_response.rbs index 4524a38b..4bb8f405 100644 --- a/sig/brand_dev/models/brand_ai_product_response.rbs +++ b/sig/brand_dev/models/brand_ai_product_response.rbs @@ -3,6 +3,7 @@ module BrandDev type brand_ai_product_response = { is_product_page: bool, + key_metadata: BrandDev::Models::BrandAIProductResponse::KeyMetadata, platform: BrandDev::Models::BrandAIProductResponse::platform?, product: BrandDev::Models::BrandAIProductResponse::Product? } @@ -12,22 +13,49 @@ module BrandDev def is_product_page=: (bool) -> bool + attr_reader key_metadata: BrandDev::Models::BrandAIProductResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandAIProductResponse::KeyMetadata + ) -> BrandDev::Models::BrandAIProductResponse::KeyMetadata + attr_accessor platform: BrandDev::Models::BrandAIProductResponse::platform? attr_accessor product: BrandDev::Models::BrandAIProductResponse::Product? def initialize: ( ?is_product_page: bool, + ?key_metadata: BrandDev::Models::BrandAIProductResponse::KeyMetadata, ?platform: BrandDev::Models::BrandAIProductResponse::platform?, ?product: BrandDev::Models::BrandAIProductResponse::Product? ) -> void def to_hash: -> { is_product_page: bool, + key_metadata: BrandDev::Models::BrandAIProductResponse::KeyMetadata, platform: BrandDev::Models::BrandAIProductResponse::platform?, product: BrandDev::Models::BrandAIProductResponse::Product? } + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end + type platform = :amazon | :tiktok_shop | :etsy | :generic module Platform @@ -47,6 +75,7 @@ module BrandDev features: ::Array[String], images: ::Array[String], name: String, + sku: String?, tags: ::Array[String], target_audience: ::Array[String], billing_frequency: BrandDev::Models::BrandAIProductResponse::Product::billing_frequency?, @@ -67,6 +96,8 @@ module BrandDev attr_accessor name: String + attr_accessor sku: String? + attr_accessor tags: ::Array[String] attr_accessor target_audience: ::Array[String] @@ -90,6 +121,7 @@ module BrandDev features: ::Array[String], images: ::Array[String], name: String, + sku: String?, tags: ::Array[String], target_audience: ::Array[String], ?billing_frequency: BrandDev::Models::BrandAIProductResponse::Product::billing_frequency?, @@ -106,6 +138,7 @@ module BrandDev features: ::Array[String], images: ::Array[String], name: String, + sku: String?, tags: ::Array[String], target_audience: ::Array[String], billing_frequency: BrandDev::Models::BrandAIProductResponse::Product::billing_frequency?, diff --git a/sig/brand_dev/models/brand_ai_products_params.rbs b/sig/brand_dev/models/brand_ai_products_params.rbs index a67e9448..2207cd36 100644 --- a/sig/brand_dev/models/brand_ai_products_params.rbs +++ b/sig/brand_dev/models/brand_ai_products_params.rbs @@ -28,55 +28,91 @@ module BrandDev extend BrandDev::Internal::Type::Union type by_domain = - { domain: String, max_products: Integer, timeout_ms: Integer } + { + domain: String, + max_age_ms: Integer, + max_products: Integer, + tags: ::Array[String], + timeout_ms: Integer + } class ByDomain < BrandDev::Internal::Type::BaseModel attr_accessor domain: String + attr_reader max_age_ms: Integer? + + def max_age_ms=: (Integer) -> Integer + attr_reader max_products: Integer? def max_products=: (Integer) -> Integer + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( domain: String, + ?max_age_ms: Integer, ?max_products: Integer, + ?tags: ::Array[String], ?timeout_ms: Integer ) -> void def to_hash: -> { domain: String, + max_age_ms: Integer, max_products: Integer, + tags: ::Array[String], timeout_ms: Integer } end type by_direct_url = - { direct_url: String, max_products: Integer, timeout_ms: Integer } + { + direct_url: String, + max_age_ms: Integer, + max_products: Integer, + tags: ::Array[String], + timeout_ms: Integer + } class ByDirectURL < BrandDev::Internal::Type::BaseModel attr_accessor direct_url: String + attr_reader max_age_ms: Integer? + + def max_age_ms=: (Integer) -> Integer + attr_reader max_products: Integer? def max_products=: (Integer) -> Integer + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( direct_url: String, + ?max_age_ms: Integer, ?max_products: Integer, + ?tags: ::Array[String], ?timeout_ms: Integer ) -> void def to_hash: -> { direct_url: String, + max_age_ms: Integer, max_products: Integer, + tags: ::Array[String], timeout_ms: Integer } end diff --git a/sig/brand_dev/models/brand_ai_products_response.rbs b/sig/brand_dev/models/brand_ai_products_response.rbs index 6023ca24..d136d98a 100644 --- a/sig/brand_dev/models/brand_ai_products_response.rbs +++ b/sig/brand_dev/models/brand_ai_products_response.rbs @@ -1,9 +1,18 @@ module BrandDev module Models type brand_ai_products_response = - { products: ::Array[BrandDev::Models::BrandAIProductsResponse::Product] } + { + key_metadata: BrandDev::Models::BrandAIProductsResponse::KeyMetadata, + products: ::Array[BrandDev::Models::BrandAIProductsResponse::Product] + } class BrandAIProductsResponse < BrandDev::Internal::Type::BaseModel + attr_reader key_metadata: BrandDev::Models::BrandAIProductsResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandAIProductsResponse::KeyMetadata + ) -> BrandDev::Models::BrandAIProductsResponse::KeyMetadata + attr_reader products: ::Array[BrandDev::Models::BrandAIProductsResponse::Product]? def products=: ( @@ -11,19 +20,41 @@ module BrandDev ) -> ::Array[BrandDev::Models::BrandAIProductsResponse::Product] def initialize: ( + ?key_metadata: BrandDev::Models::BrandAIProductsResponse::KeyMetadata, ?products: ::Array[BrandDev::Models::BrandAIProductsResponse::Product] ) -> void def to_hash: -> { + key_metadata: BrandDev::Models::BrandAIProductsResponse::KeyMetadata, products: ::Array[BrandDev::Models::BrandAIProductsResponse::Product] } + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end + type product = { description: String, features: ::Array[String], images: ::Array[String], name: String, + sku: String?, tags: ::Array[String], target_audience: ::Array[String], billing_frequency: BrandDev::Models::BrandAIProductsResponse::Product::billing_frequency?, @@ -44,6 +75,8 @@ module BrandDev attr_accessor name: String + attr_accessor sku: String? + attr_accessor tags: ::Array[String] attr_accessor target_audience: ::Array[String] @@ -67,6 +100,7 @@ module BrandDev features: ::Array[String], images: ::Array[String], name: String, + sku: String?, tags: ::Array[String], target_audience: ::Array[String], ?billing_frequency: BrandDev::Models::BrandAIProductsResponse::Product::billing_frequency?, @@ -83,6 +117,7 @@ module BrandDev features: ::Array[String], images: ::Array[String], name: String, + sku: String?, tags: ::Array[String], target_audience: ::Array[String], billing_frequency: BrandDev::Models::BrandAIProductsResponse::Product::billing_frequency?, diff --git a/sig/brand_dev/models/brand_ai_query_params.rbs b/sig/brand_dev/models/brand_ai_query_params.rbs index 3dad2d4e..f554b973 100644 --- a/sig/brand_dev/models/brand_ai_query_params.rbs +++ b/sig/brand_dev/models/brand_ai_query_params.rbs @@ -5,6 +5,7 @@ module BrandDev data_to_extract: ::Array[BrandDev::BrandAIQueryParams::DataToExtract], domain: String, specific_pages: BrandDev::BrandAIQueryParams::SpecificPages, + tags: ::Array[String], timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters @@ -23,6 +24,10 @@ module BrandDev BrandDev::BrandAIQueryParams::SpecificPages ) -> BrandDev::BrandAIQueryParams::SpecificPages + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer @@ -31,6 +36,7 @@ module BrandDev data_to_extract: ::Array[BrandDev::BrandAIQueryParams::DataToExtract], domain: String, ?specific_pages: BrandDev::BrandAIQueryParams::SpecificPages, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void @@ -39,6 +45,7 @@ module BrandDev data_to_extract: ::Array[BrandDev::BrandAIQueryParams::DataToExtract], domain: String, specific_pages: BrandDev::BrandAIQueryParams::SpecificPages, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/sig/brand_dev/models/brand_ai_query_response.rbs b/sig/brand_dev/models/brand_ai_query_response.rbs index c77d58fd..f9676e46 100644 --- a/sig/brand_dev/models/brand_ai_query_response.rbs +++ b/sig/brand_dev/models/brand_ai_query_response.rbs @@ -4,6 +4,7 @@ module BrandDev { data_extracted: ::Array[BrandDev::Models::BrandAIQueryResponse::DataExtracted], domain: String, + key_metadata: BrandDev::Models::BrandAIQueryResponse::KeyMetadata, status: String, urls_analyzed: ::Array[String] } @@ -19,6 +20,12 @@ module BrandDev def domain=: (String) -> String + attr_reader key_metadata: BrandDev::Models::BrandAIQueryResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandAIQueryResponse::KeyMetadata + ) -> BrandDev::Models::BrandAIQueryResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -30,6 +37,7 @@ module BrandDev def initialize: ( ?data_extracted: ::Array[BrandDev::Models::BrandAIQueryResponse::DataExtracted], ?domain: String, + ?key_metadata: BrandDev::Models::BrandAIQueryResponse::KeyMetadata, ?status: String, ?urls_analyzed: ::Array[String] ) -> void @@ -37,6 +45,7 @@ module BrandDev def to_hash: -> { data_extracted: ::Array[BrandDev::Models::BrandAIQueryResponse::DataExtracted], domain: String, + key_metadata: BrandDev::Models::BrandAIQueryResponse::KeyMetadata, status: String, urls_analyzed: ::Array[String] } @@ -88,6 +97,25 @@ module BrandDev UnionMember5Array: BrandDev::Internal::Type::Converter end end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_fonts_params.rbs b/sig/brand_dev/models/brand_fonts_params.rbs index be6ba192..3a6eb1ef 100644 --- a/sig/brand_dev/models/brand_fonts_params.rbs +++ b/sig/brand_dev/models/brand_fonts_params.rbs @@ -1,27 +1,51 @@ module BrandDev module Models type brand_fonts_params = - { domain: String, timeout_ms: Integer } + { + direct_url: String, + domain: String, + max_age_ms: Integer?, + tags: ::Array[String], + timeout_ms: Integer + } & BrandDev::Internal::Type::request_parameters class BrandFontsParams < BrandDev::Internal::Type::BaseModel extend BrandDev::Internal::Type::RequestParameters::Converter include BrandDev::Internal::Type::RequestParameters - attr_accessor domain: String + attr_reader direct_url: String? + + def direct_url=: (String) -> String + + attr_reader domain: String? + + def domain=: (String) -> String + + attr_accessor max_age_ms: Integer? + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( - domain: String, + ?direct_url: String, + ?domain: String, + ?max_age_ms: Integer?, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { + direct_url: String, domain: String, + max_age_ms: Integer?, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/sig/brand_dev/models/brand_fonts_response.rbs b/sig/brand_dev/models/brand_fonts_response.rbs index e149eba7..8d604c00 100644 --- a/sig/brand_dev/models/brand_fonts_response.rbs +++ b/sig/brand_dev/models/brand_fonts_response.rbs @@ -5,7 +5,9 @@ module BrandDev code: Integer, domain: String, fonts: ::Array[BrandDev::Models::BrandFontsResponse::Font], - status: String + status: String, + font_links: ::Hash[Symbol, BrandDev::Models::BrandFontsResponse::FontLink], + key_metadata: BrandDev::Models::BrandFontsResponse::KeyMetadata } class BrandFontsResponse < BrandDev::Internal::Type::BaseModel @@ -17,18 +19,34 @@ module BrandDev attr_accessor status: String + attr_reader font_links: ::Hash[Symbol, BrandDev::Models::BrandFontsResponse::FontLink]? + + def font_links=: ( + ::Hash[Symbol, BrandDev::Models::BrandFontsResponse::FontLink] + ) -> ::Hash[Symbol, BrandDev::Models::BrandFontsResponse::FontLink] + + attr_reader key_metadata: BrandDev::Models::BrandFontsResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandFontsResponse::KeyMetadata + ) -> BrandDev::Models::BrandFontsResponse::KeyMetadata + def initialize: ( code: Integer, domain: String, fonts: ::Array[BrandDev::Models::BrandFontsResponse::Font], - status: String + status: String, + ?font_links: ::Hash[Symbol, BrandDev::Models::BrandFontsResponse::FontLink], + ?key_metadata: BrandDev::Models::BrandFontsResponse::KeyMetadata ) -> void def to_hash: -> { code: Integer, domain: String, fonts: ::Array[BrandDev::Models::BrandFontsResponse::Font], - status: String + status: String, + font_links: ::Hash[Symbol, BrandDev::Models::BrandFontsResponse::FontLink], + key_metadata: BrandDev::Models::BrandFontsResponse::KeyMetadata } type font = @@ -77,6 +95,72 @@ module BrandDev uses: ::Array[String] } end + + type font_link = + { + files: ::Hash[Symbol, String], + type: BrandDev::Models::BrandFontsResponse::FontLink::type_, + category: String, + display_name: String + } + + class FontLink < BrandDev::Internal::Type::BaseModel + attr_accessor files: ::Hash[Symbol, String] + + attr_accessor type: BrandDev::Models::BrandFontsResponse::FontLink::type_ + + attr_reader category: String? + + def category=: (String) -> String + + attr_reader display_name: String? + + def display_name=: (String) -> String + + def initialize: ( + files: ::Hash[Symbol, String], + type: BrandDev::Models::BrandFontsResponse::FontLink::type_, + ?category: String, + ?display_name: String + ) -> void + + def to_hash: -> { + files: ::Hash[Symbol, String], + type: BrandDev::Models::BrandFontsResponse::FontLink::type_, + category: String, + display_name: String + } + + type type_ = :google | :custom + + module Type + extend BrandDev::Internal::Type::Enum + + GOOGLE: :google + CUSTOM: :custom + + def self?.values: -> ::Array[BrandDev::Models::BrandFontsResponse::FontLink::type_] + end + end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_identify_from_transaction_params.rbs b/sig/brand_dev/models/brand_identify_from_transaction_params.rbs index 83291e13..327c0ea5 100644 --- a/sig/brand_dev/models/brand_identify_from_transaction_params.rbs +++ b/sig/brand_dev/models/brand_identify_from_transaction_params.rbs @@ -5,11 +5,12 @@ module BrandDev transaction_info: String, city: String, country_gl: BrandDev::Models::BrandIdentifyFromTransactionParams::country_gl, - force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language, - high_confidence_only: bool, - max_speed: bool, - mcc: String, - phone: Float, + force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language?, + high_confidence_only: BrandDev::Models::BrandIdentifyFromTransactionParams::high_confidence_only, + max_speed: BrandDev::Models::BrandIdentifyFromTransactionParams::max_speed, + mcc: BrandDev::Models::BrandIdentifyFromTransactionParams::mcc, + phone: BrandDev::Models::BrandIdentifyFromTransactionParams::phone, + tags: ::Array[String], timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters @@ -30,27 +31,35 @@ module BrandDev BrandDev::Models::BrandIdentifyFromTransactionParams::country_gl ) -> BrandDev::Models::BrandIdentifyFromTransactionParams::country_gl - attr_reader force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language? + attr_accessor force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language? - def force_language=: ( - BrandDev::Models::BrandIdentifyFromTransactionParams::force_language - ) -> BrandDev::Models::BrandIdentifyFromTransactionParams::force_language + attr_reader high_confidence_only: BrandDev::Models::BrandIdentifyFromTransactionParams::high_confidence_only? - attr_reader high_confidence_only: bool? + def high_confidence_only=: ( + BrandDev::Models::BrandIdentifyFromTransactionParams::high_confidence_only + ) -> BrandDev::Models::BrandIdentifyFromTransactionParams::high_confidence_only - def high_confidence_only=: (bool) -> bool + attr_reader max_speed: BrandDev::Models::BrandIdentifyFromTransactionParams::max_speed? - attr_reader max_speed: bool? + def max_speed=: ( + BrandDev::Models::BrandIdentifyFromTransactionParams::max_speed + ) -> BrandDev::Models::BrandIdentifyFromTransactionParams::max_speed - def max_speed=: (bool) -> bool + attr_reader mcc: BrandDev::Models::BrandIdentifyFromTransactionParams::mcc? - attr_reader mcc: String? + def mcc=: ( + BrandDev::Models::BrandIdentifyFromTransactionParams::mcc + ) -> BrandDev::Models::BrandIdentifyFromTransactionParams::mcc - def mcc=: (String) -> String + attr_reader phone: BrandDev::Models::BrandIdentifyFromTransactionParams::phone? - attr_reader phone: Float? + def phone=: ( + BrandDev::Models::BrandIdentifyFromTransactionParams::phone + ) -> BrandDev::Models::BrandIdentifyFromTransactionParams::phone - def phone=: (Float) -> Float + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] attr_reader timeout_ms: Integer? @@ -60,11 +69,12 @@ module BrandDev transaction_info: String, ?city: String, ?country_gl: BrandDev::Models::BrandIdentifyFromTransactionParams::country_gl, - ?force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language, - ?high_confidence_only: bool, - ?max_speed: bool, - ?mcc: String, - ?phone: Float, + ?force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language?, + ?high_confidence_only: BrandDev::Models::BrandIdentifyFromTransactionParams::high_confidence_only, + ?max_speed: BrandDev::Models::BrandIdentifyFromTransactionParams::max_speed, + ?mcc: BrandDev::Models::BrandIdentifyFromTransactionParams::mcc, + ?phone: BrandDev::Models::BrandIdentifyFromTransactionParams::phone, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void @@ -73,496 +83,497 @@ module BrandDev transaction_info: String, city: String, country_gl: BrandDev::Models::BrandIdentifyFromTransactionParams::country_gl, - force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language, - high_confidence_only: bool, - max_speed: bool, - mcc: String, - phone: Float, + force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language?, + high_confidence_only: BrandDev::Models::BrandIdentifyFromTransactionParams::high_confidence_only, + max_speed: BrandDev::Models::BrandIdentifyFromTransactionParams::max_speed, + mcc: BrandDev::Models::BrandIdentifyFromTransactionParams::mcc, + phone: BrandDev::Models::BrandIdentifyFromTransactionParams::phone, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } type country_gl = - :ad - | :ae - | :af - | :ag - | :ai + :af | :al - | :am - | :an + | :dz + | :as + | :ad | :ao + | :ai | :aq + | :ag | :ar - | :as - | :at - | :au + | :am | :aw + | :au + | :at | :az - | :ba - | :bb + | :bs + | :bh | :bd + | :bb + | :by | :be - | :bf - | :bg - | :bh - | :bi + | :bz | :bj | :bm - | :bn - | :bo - | :br - | :bs | :bt - | :bv + | :bo + | :ba | :bw - | :by - | :bz + | :bv + | :br + | :io + | :bn + | :bg + | :bf + | :bi + | :kh + | :cm | :ca - | :cc - | :cd + | :cv + | :ky | :cf - | :cg - | :ch - | :ci - | :ck + | :td | :cl - | :cm | :cn + | :cx + | :cc | :co + | :km + | :cg + | :cd + | :ck | :cr + | :ci + | :hr | :cu - | :cv - | :cx | :cy | :cz - | :de - | :dj | :dk + | :dj | :dm | :do - | :dz | :ec - | :ee | :eg - | :eh + | :sv + | :gq | :er - | :es + | :ee | :et - | :fi - | :fj | :fk - | :fm | :fo + | :fj + | :fi | :fr + | :gf + | :pf + | :tf | :ga - | :gb - | :gd + | :gm | :ge - | :gf + | :de | :gh | :gi + | :gr | :gl - | :gm - | :gn + | :gd | :gp - | :gq - | :gr - | :gs - | :gt | :gu + | :gt + | :gn | :gw | :gy - | :hk + | :ht | :hm + | :va | :hn - | :hr - | :ht + | :hk | :hu + | :is + | :in | :id + | :ir + | :iq | :ie | :il - | :in - | :io - | :iq - | :ir - | :is | :it | :jm - | :jo | :jp + | :jo + | :kz | :ke - | :kg - | :kh | :ki - | :km - | :kn | :kp | :kr | :kw - | :ky - | :kz + | :kg | :la + | :lv | :lb - | :lc - | :li - | :lk - | :lr | :ls + | :lr + | :ly + | :li | :lt | :lu - | :lv - | :ly - | :ma - | :mc - | :md - | :mg - | :mh + | :mo | :mk + | :mg + | :mw + | :my + | :mv | :ml - | :mm - | :mn - | :mo - | :mp + | :mt + | :mh | :mq | :mr - | :ms - | :mt | :mu - | :mv - | :mw + | :yt | :mx - | :my + | :fm + | :md + | :mc + | :mn + | :ms + | :ma | :mz + | :mm | :na + | :nr + | :np + | :nl + | :an | :nc + | :nz + | :ni | :ne - | :nf | :ng - | :ni - | :nl - | :no - | :np - | :nr | :nu - | :nz + | :nf + | :mp + | :no | :om + | :pk + | :pw + | :ps | :pa - | :pe - | :pf | :pg + | :py + | :pe | :ph - | :pk - | :pl - | :pm | :pn - | :pr - | :ps + | :pl | :pt - | :pw - | :py + | :pr | :qa | :re | :ro - | :rs | :ru | :rw + | :sh + | :kn + | :lc + | :pm + | :vc + | :ws + | :sm + | :st | :sa - | :sb + | :sn + | :rs | :sc - | :sd - | :se + | :sl | :sg - | :sh - | :si - | :sj | :sk - | :sl - | :sm - | :sn + | :si + | :sb | :so + | :za + | :gs + | :es + | :lk + | :sd | :sr - | :st - | :sv - | :sy + | :sj | :sz - | :tc - | :td - | :tf - | :tg - | :th + | :se + | :ch + | :sy + | :tw | :tj - | :tk + | :tz + | :th | :tl - | :tm - | :tn + | :tg + | :tk | :to - | :tr | :tt + | :tn + | :tr + | :tm + | :tc | :tv - | :tw - | :tz - | :ua | :ug - | :um + | :ua + | :ae + | :gb | :us + | :um | :uy | :uz - | :va - | :vc + | :vu | :ve + | :vn | :vg | :vi - | :vn - | :vu | :wf - | :ws + | :eh | :ye - | :yt - | :za | :zm | :zw module CountryGl extend BrandDev::Internal::Type::Enum - AD: :ad - AE: :ae AF: :af - AG: :ag - AI: :ai AL: :al - AM: :am - AN: :an + DZ: :dz + AS: :as + AD: :ad AO: :ao + AI: :ai AQ: :aq + AG: :ag AR: :ar - AS: :as - AT: :at - AU: :au + AM: :am AW: :aw + AU: :au + AT: :at AZ: :az - BA: :ba - BB: :bb + BS: :bs + BH: :bh BD: :bd + BB: :bb + BY: :by BE: :be - BF: :bf - BG: :bg - BH: :bh - BI: :bi + BZ: :bz BJ: :bj BM: :bm - BN: :bn - BO: :bo - BR: :br - BS: :bs BT: :bt - BV: :bv + BO: :bo + BA: :ba BW: :bw - BY: :by - BZ: :bz + BV: :bv + BR: :br + IO: :io + BN: :bn + BG: :bg + BF: :bf + BI: :bi + KH: :kh + CM: :cm CA: :ca - CC: :cc - CD: :cd + CV: :cv + KY: :ky CF: :cf - CG: :cg - CH: :ch - CI: :ci - CK: :ck + TD: :td CL: :cl - CM: :cm CN: :cn + CX: :cx + CC: :cc CO: :co + KM: :km + CG: :cg + CD: :cd + CK: :ck CR: :cr + CI: :ci + HR: :hr CU: :cu - CV: :cv - CX: :cx CY: :cy CZ: :cz - DE: :de - DJ: :dj DK: :dk + DJ: :dj DM: :dm DO: :do - DZ: :dz EC: :ec - EE: :ee EG: :eg - EH: :eh + SV: :sv + GQ: :gq ER: :er - ES: :es + EE: :ee ET: :et - FI: :fi - FJ: :fj FK: :fk - FM: :fm FO: :fo + FJ: :fj + FI: :fi FR: :fr + GF: :gf + PF: :pf + TF: :tf GA: :ga - GB: :gb - GD: :gd + GM: :gm GE: :ge - GF: :gf + DE: :de GH: :gh GI: :gi + GR: :gr GL: :gl - GM: :gm - GN: :gn + GD: :gd GP: :gp - GQ: :gq - GR: :gr - GS: :gs - GT: :gt GU: :gu + GT: :gt + GN: :gn GW: :gw GY: :gy - HK: :hk + HT: :ht HM: :hm + VA: :va HN: :hn - HR: :hr - HT: :ht + HK: :hk HU: :hu + IS: :is + IN: :in ID: :id + IR: :ir + IQ: :iq IE: :ie IL: :il - IN: :in - IO: :io - IQ: :iq - IR: :ir - IS: :is IT: :it JM: :jm - JO: :jo JP: :jp + JO: :jo + KZ: :kz KE: :ke - KG: :kg - KH: :kh KI: :ki - KM: :km - KN: :kn KP: :kp KR: :kr KW: :kw - KY: :ky - KZ: :kz + KG: :kg LA: :la + LV: :lv LB: :lb - LC: :lc - LI: :li - LK: :lk - LR: :lr LS: :ls + LR: :lr + LY: :ly + LI: :li LT: :lt LU: :lu - LV: :lv - LY: :ly - MA: :ma - MC: :mc - MD: :md - MG: :mg - MH: :mh + MO: :mo MK: :mk + MG: :mg + MW: :mw + MY: :my + MV: :mv ML: :ml - MM: :mm - MN: :mn - MO: :mo - MP: :mp + MT: :mt + MH: :mh MQ: :mq MR: :mr - MS: :ms - MT: :mt MU: :mu - MV: :mv - MW: :mw + YT: :yt MX: :mx - MY: :my + FM: :fm + MD: :md + MC: :mc + MN: :mn + MS: :ms + MA: :ma MZ: :mz + MM: :mm NA: :na + NR: :nr + NP: :np + NL: :nl + AN: :an NC: :nc + NZ: :nz + NI: :ni NE: :ne - NF: :nf NG: :ng - NI: :ni - NL: :nl - NO: :no - NP: :np - NR: :nr NU: :nu - NZ: :nz + NF: :nf + MP: :mp + NO: :no OM: :om + PK: :pk + PW: :pw + PS: :ps PA: :pa - PE: :pe - PF: :pf PG: :pg + PY: :py + PE: :pe PH: :ph - PK: :pk - PL: :pl - PM: :pm PN: :pn - PR: :pr - PS: :ps + PL: :pl PT: :pt - PW: :pw - PY: :py + PR: :pr QA: :qa RE: :re RO: :ro - RS: :rs RU: :ru RW: :rw + SH: :sh + KN: :kn + LC: :lc + PM: :pm + VC: :vc + WS: :ws + SM: :sm + ST: :st SA: :sa - SB: :sb + SN: :sn + RS: :rs SC: :sc - SD: :sd - SE: :se + SL: :sl SG: :sg - SH: :sh - SI: :si - SJ: :sj SK: :sk - SL: :sl - SM: :sm - SN: :sn + SI: :si + SB: :sb SO: :so + ZA: :za + GS: :gs + ES: :es + LK: :lk + SD: :sd SR: :sr - ST: :st - SV: :sv - SY: :sy + SJ: :sj SZ: :sz - TC: :tc - TD: :td - TF: :tf - TG: :tg - TH: :th + SE: :se + CH: :ch + SY: :sy + TW: :tw TJ: :tj - TK: :tk + TZ: :tz + TH: :th TL: :tl - TM: :tm - TN: :tn + TG: :tg + TK: :tk TO: :to - TR: :tr TT: :tt + TN: :tn + TR: :tr + TM: :tm + TC: :tc TV: :tv - TW: :tw - TZ: :tz - UA: :ua UG: :ug - UM: :um + UA: :ua + AE: :ae + GB: :gb US: :us + UM: :um UY: :uy UZ: :uz - VA: :va - VC: :vc + VU: :vu VE: :ve + VN: :vn VG: :vg VI: :vi - VN: :vn - VU: :vu WF: :wf - WS: :ws + EH: :eh YE: :ye - YT: :yt - ZA: :za ZM: :zm ZW: :zw @@ -570,123 +581,291 @@ module BrandDev end type force_language = - :albanian + :afrikaans + | :albanian + | :amharic | :arabic + | :armenian + | :assamese + | :aymara | :azeri + | :basque + | :belarusian | :bengali + | :bosnian | :bulgarian + | :burmese | :cantonese + | :catalan | :cebuano + | :chinese + | :corsican | :croatian | :czech | :danish | :dutch | :english + | :esperanto | :estonian | :farsi + | :fijian | :finnish | :french + | :galician + | :georgian | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" | :hausa | :hawaiian + | :hebrew | :hindi + | :hmong | :hungarian | :icelandic + | :igbo | :indonesian + | :irish | :italian + | :japanese + | :javanese + | :kannada | :kazakh + | :khmer + | :kinyarwanda | :korean + | :kurdish | :kyrgyz + | :lao | :latin | :latvian + | :lingala | :lithuanian + | :luxembourgish | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi | :mongolian | :nepali | :norwegian + | :odia + | :oromo | :pashto | :pidgin | :polish | :portuguese + | :punjabi + | :quechua | :romanian | :russian + | :samoan + | :"scottish-gaelic" | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala | :slovak | :slovene | :somali | :spanish + | :sundanese | :swahili | :swedish | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana | :turkish + | :turkmen | :ukrainian | :urdu + | :uyghur | :uzbek | :vietnamese | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS: :afrikaans ALBANIAN: :albanian + AMHARIC: :amharic ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian BENGALI: :bengali + BOSNIAN: :bosnian BULGARIAN: :bulgarian + BURMESE: :burmese CANTONESE: :cantonese + CATALAN: :catalan CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican CROATIAN: :croatian CZECH: :czech DANISH: :danish DUTCH: :dutch ENGLISH: :english + ESPERANTO: :esperanto ESTONIAN: :estonian FARSI: :farsi + FIJIAN: :fijian FINNISH: :finnish FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" HAUSA: :hausa HAWAIIAN: :hawaiian + HEBREW: :hebrew HINDI: :hindi + HMONG: :hmong HUNGARIAN: :hungarian ICELANDIC: :icelandic + IGBO: :igbo INDONESIAN: :indonesian + IRISH: :irish ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda KOREAN: :korean + KURDISH: :kurdish KYRGYZ: :kyrgyz + LAO: :lao LATIN: :latin LATVIAN: :latvian + LINGALA: :lingala LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi MONGOLIAN: :mongolian NEPALI: :nepali NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo PASHTO: :pashto PIDGIN: :pidgin POLISH: :polish PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua ROMANIAN: :romanian RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala SLOVAK: :slovak SLOVENE: :slovene SOMALI: :somali SPANISH: :spanish + SUNDANESE: :sundanese SWAHILI: :swahili SWEDISH: :swedish TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana TURKISH: :turkish + TURKMEN: :turkmen UKRAINIAN: :ukrainian URDU: :urdu + UYGHUR: :uyghur UZBEK: :uzbek VIETNAMESE: :vietnamese WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu def self?.values: -> ::Array[BrandDev::Models::BrandIdentifyFromTransactionParams::force_language] end + + type high_confidence_only = bool | :true | :false + + module HighConfidenceOnly + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandIdentifyFromTransactionParams::high_confidence_only] + + TRUE: :true + FALSE: :false + end + + type max_speed = bool | :true | :false + + module MaxSpeed + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandIdentifyFromTransactionParams::max_speed] + + TRUE: :true + FALSE: :false + end + + type mcc = String | Float + + module Mcc + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandIdentifyFromTransactionParams::mcc] + end + + type phone = String | Float + + module Phone + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandIdentifyFromTransactionParams::phone] + end end end end diff --git a/sig/brand_dev/models/brand_identify_from_transaction_response.rbs b/sig/brand_dev/models/brand_identify_from_transaction_response.rbs index 3021aa0f..d73b6a97 100644 --- a/sig/brand_dev/models/brand_identify_from_transaction_response.rbs +++ b/sig/brand_dev/models/brand_identify_from_transaction_response.rbs @@ -4,6 +4,7 @@ module BrandDev { brand: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata, status: String } @@ -18,6 +19,12 @@ module BrandDev def code=: (Integer) -> Integer + attr_reader key_metadata: BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata + ) -> BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -25,12 +32,14 @@ module BrandDev def initialize: ( ?brand: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand, ?code: Integer, + ?key_metadata: BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata, ?status: String ) -> void def to_hash: -> { brand: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata, status: String } @@ -47,6 +56,7 @@ module BrandDev links: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social], stock: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Stock, @@ -110,6 +120,8 @@ module BrandDev def phone=: (String) -> String + attr_accessor primary_language: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::primary_language? + attr_reader slogan: String? def slogan=: (String) -> String @@ -142,6 +154,7 @@ module BrandDev ?links: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Links, ?logos: ::Array[BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo], ?phone: String, + ?primary_language: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::primary_language?, ?slogan: String, ?socials: ::Array[BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social], ?stock: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Stock, @@ -160,6 +173,7 @@ module BrandDev links: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social], stock: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Stock, @@ -474,7 +488,6 @@ module BrandDev | :"Streaming Platforms (Video, Music, Audio)" | :"Gaming & Interactive Entertainment" | :"Creator Economy & Influencer Platforms" - | :"Advertising, Adtech & Media Buying" | :"Film, TV & Production Studios" | :"Events, Venues & Live Entertainment" | :"Virtual Worlds & Metaverse Experiences" @@ -535,6 +548,7 @@ module BrandDev | :"Streetwear & Emerging Luxury" | :"Couture & Made-to-Measure" | :"News Publishing & Journalism" + | :"Advertising, Adtech & Media Buying" | :"Digital Media & Content Platforms" | :"Broadcasting (TV & Radio)" | :"Podcasting & Audio Media" @@ -698,7 +712,6 @@ module BrandDev STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO: :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT: :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS: :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS: :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT: :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES: :"Virtual Worlds & Metaverse Experiences" @@ -759,6 +772,7 @@ module BrandDev STREETWEAR_EMERGING_LUXURY: :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE: :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM: :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS: :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO: :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA: :"Podcasting & Audio Media" @@ -1039,20 +1053,352 @@ module BrandDev end end - type social = { type: String, url: String } + type primary_language = + :afrikaans + | :albanian + | :amharic + | :arabic + | :armenian + | :assamese + | :aymara + | :azeri + | :basque + | :belarusian + | :bengali + | :bosnian + | :bulgarian + | :burmese + | :cantonese + | :catalan + | :cebuano + | :chinese + | :corsican + | :croatian + | :czech + | :danish + | :dutch + | :english + | :esperanto + | :estonian + | :farsi + | :fijian + | :finnish + | :french + | :galician + | :georgian + | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" + | :hausa + | :hawaiian + | :hebrew + | :hindi + | :hmong + | :hungarian + | :icelandic + | :igbo + | :indonesian + | :irish + | :italian + | :japanese + | :javanese + | :kannada + | :kazakh + | :khmer + | :kinyarwanda + | :korean + | :kurdish + | :kyrgyz + | :lao + | :latin + | :latvian + | :lingala + | :lithuanian + | :luxembourgish + | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi + | :mongolian + | :nepali + | :norwegian + | :odia + | :oromo + | :pashto + | :pidgin + | :polish + | :portuguese + | :punjabi + | :quechua + | :romanian + | :russian + | :samoan + | :"scottish-gaelic" + | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala + | :slovak + | :slovene + | :somali + | :spanish + | :sundanese + | :swahili + | :swedish + | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu + | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana + | :turkish + | :turkmen + | :ukrainian + | :urdu + | :uyghur + | :uzbek + | :vietnamese + | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu + + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS: :afrikaans + ALBANIAN: :albanian + AMHARIC: :amharic + ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara + AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian + BENGALI: :bengali + BOSNIAN: :bosnian + BULGARIAN: :bulgarian + BURMESE: :burmese + CANTONESE: :cantonese + CATALAN: :catalan + CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican + CROATIAN: :croatian + CZECH: :czech + DANISH: :danish + DUTCH: :dutch + ENGLISH: :english + ESPERANTO: :esperanto + ESTONIAN: :estonian + FARSI: :farsi + FIJIAN: :fijian + FINNISH: :finnish + FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian + GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" + HAUSA: :hausa + HAWAIIAN: :hawaiian + HEBREW: :hebrew + HINDI: :hindi + HMONG: :hmong + HUNGARIAN: :hungarian + ICELANDIC: :icelandic + IGBO: :igbo + INDONESIAN: :indonesian + IRISH: :irish + ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada + KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda + KOREAN: :korean + KURDISH: :kurdish + KYRGYZ: :kyrgyz + LAO: :lao + LATIN: :latin + LATVIAN: :latvian + LINGALA: :lingala + LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish + MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi + MONGOLIAN: :mongolian + NEPALI: :nepali + NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo + PASHTO: :pashto + PIDGIN: :pidgin + POLISH: :polish + PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua + ROMANIAN: :romanian + RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" + SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala + SLOVAK: :slovak + SLOVENE: :slovene + SOMALI: :somali + SPANISH: :spanish + SUNDANESE: :sundanese + SWAHILI: :swahili + SWEDISH: :swedish + TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu + THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana + TURKISH: :turkish + TURKMEN: :turkmen + UKRAINIAN: :ukrainian + URDU: :urdu + UYGHUR: :uyghur + UZBEK: :uzbek + VIETNAMESE: :vietnamese + WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu + + def self?.values: -> ::Array[BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::primary_language] + end + + type social = + { + type: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::type_, + url: String + } class Social < BrandDev::Internal::Type::BaseModel - attr_reader type: String? + attr_reader type: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::type_? - def type=: (String) -> String + def type=: ( + BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::type_ + ) -> BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::type_ attr_reader url: String? def url=: (String) -> String - def initialize: (?type: String, ?url: String) -> void + def initialize: ( + ?type: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::type_, + ?url: String + ) -> void - def to_hash: -> { type: String, url: String } + def to_hash: -> { + type: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::type_, + url: String + } + + type type_ = + :x + | :facebook + | :instagram + | :linkedin + | :youtube + | :pinterest + | :tiktok + | :dribbble + | :github + | :behance + | :snapchat + | :whatsapp + | :telegram + | :line + | :discord + | :twitch + | :vimeo + | :imdb + | :tumblr + | :flickr + | :giphy + | :medium + | :spotify + | :soundcloud + | :tripadvisor + | :yelp + | :producthunt + | :reddit + | :crunchbase + | :appstore + | :playstore + + module Type + extend BrandDev::Internal::Type::Enum + + X: :x + FACEBOOK: :facebook + INSTAGRAM: :instagram + LINKEDIN: :linkedin + YOUTUBE: :youtube + PINTEREST: :pinterest + TIKTOK: :tiktok + DRIBBBLE: :dribbble + GITHUB: :github + BEHANCE: :behance + SNAPCHAT: :snapchat + WHATSAPP: :whatsapp + TELEGRAM: :telegram + LINE: :line + DISCORD: :discord + TWITCH: :twitch + VIMEO: :vimeo + IMDB: :imdb + TUMBLR: :tumblr + FLICKR: :flickr + GIPHY: :giphy + MEDIUM: :medium + SPOTIFY: :spotify + SOUNDCLOUD: :soundcloud + TRIPADVISOR: :tripadvisor + YELP: :yelp + PRODUCTHUNT: :producthunt + REDDIT: :reddit + CRUNCHBASE: :crunchbase + APPSTORE: :appstore + PLAYSTORE: :playstore + + def self?.values: -> ::Array[BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Social::type_] + end end type stock = { exchange: String, ticker: String } @@ -1071,6 +1417,25 @@ module BrandDev def to_hash: -> { exchange: String, ticker: String } end end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_prefetch_by_email_params.rbs b/sig/brand_dev/models/brand_prefetch_by_email_params.rbs index bb2bfb63..1fd252ff 100644 --- a/sig/brand_dev/models/brand_prefetch_by_email_params.rbs +++ b/sig/brand_dev/models/brand_prefetch_by_email_params.rbs @@ -1,7 +1,7 @@ module BrandDev module Models type brand_prefetch_by_email_params = - { email: String, timeout_ms: Integer } + { email: String, tags: ::Array[String], timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters class BrandPrefetchByEmailParams < BrandDev::Internal::Type::BaseModel @@ -10,18 +10,24 @@ module BrandDev attr_accessor email: String + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( email: String, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { email: String, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/sig/brand_dev/models/brand_prefetch_by_email_response.rbs b/sig/brand_dev/models/brand_prefetch_by_email_response.rbs index c26b10e5..b7a8370c 100644 --- a/sig/brand_dev/models/brand_prefetch_by_email_response.rbs +++ b/sig/brand_dev/models/brand_prefetch_by_email_response.rbs @@ -1,13 +1,24 @@ module BrandDev module Models type brand_prefetch_by_email_response = - { domain: String, message: String, status: String } + { + domain: String, + key_metadata: BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata, + message: String, + status: String + } class BrandPrefetchByEmailResponse < BrandDev::Internal::Type::BaseModel attr_reader domain: String? def domain=: (String) -> String + attr_reader key_metadata: BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata + ) -> BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata + attr_reader message: String? def message=: (String) -> String @@ -18,11 +29,36 @@ module BrandDev def initialize: ( ?domain: String, + ?key_metadata: BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata, ?message: String, ?status: String ) -> void - def to_hash: -> { domain: String, message: String, status: String } + def to_hash: -> { + domain: String, + key_metadata: BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata, + message: String, + status: String + } + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_prefetch_params.rbs b/sig/brand_dev/models/brand_prefetch_params.rbs index 0355b2ff..24502971 100644 --- a/sig/brand_dev/models/brand_prefetch_params.rbs +++ b/sig/brand_dev/models/brand_prefetch_params.rbs @@ -1,7 +1,7 @@ module BrandDev module Models type brand_prefetch_params = - { domain: String, timeout_ms: Integer } + { domain: String, tags: ::Array[String], timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters class BrandPrefetchParams < BrandDev::Internal::Type::BaseModel @@ -10,18 +10,24 @@ module BrandDev attr_accessor domain: String + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( domain: String, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { domain: String, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/sig/brand_dev/models/brand_prefetch_response.rbs b/sig/brand_dev/models/brand_prefetch_response.rbs index 97c20067..a3f5f03a 100644 --- a/sig/brand_dev/models/brand_prefetch_response.rbs +++ b/sig/brand_dev/models/brand_prefetch_response.rbs @@ -1,13 +1,24 @@ module BrandDev module Models type brand_prefetch_response = - { domain: String, message: String, status: String } + { + domain: String, + key_metadata: BrandDev::Models::BrandPrefetchResponse::KeyMetadata, + message: String, + status: String + } class BrandPrefetchResponse < BrandDev::Internal::Type::BaseModel attr_reader domain: String? def domain=: (String) -> String + attr_reader key_metadata: BrandDev::Models::BrandPrefetchResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandPrefetchResponse::KeyMetadata + ) -> BrandDev::Models::BrandPrefetchResponse::KeyMetadata + attr_reader message: String? def message=: (String) -> String @@ -18,11 +29,36 @@ module BrandDev def initialize: ( ?domain: String, + ?key_metadata: BrandDev::Models::BrandPrefetchResponse::KeyMetadata, ?message: String, ?status: String ) -> void - def to_hash: -> { domain: String, message: String, status: String } + def to_hash: -> { + domain: String, + key_metadata: BrandDev::Models::BrandPrefetchResponse::KeyMetadata, + message: String, + status: String + } + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_by_email_params.rbs b/sig/brand_dev/models/brand_retrieve_by_email_params.rbs index bfb843a9..b290ff84 100644 --- a/sig/brand_dev/models/brand_retrieve_by_email_params.rbs +++ b/sig/brand_dev/models/brand_retrieve_by_email_params.rbs @@ -3,8 +3,10 @@ module BrandDev type brand_retrieve_by_email_params = { email: String, - force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveByEmailParams::max_speed, + tags: ::Array[String], timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters @@ -15,15 +17,19 @@ module BrandDev attr_accessor email: String - attr_reader force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language? + attr_accessor force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language? - def force_language=: ( - BrandDev::Models::BrandRetrieveByEmailParams::force_language - ) -> BrandDev::Models::BrandRetrieveByEmailParams::force_language + attr_accessor max_age_ms: Integer? - attr_reader max_speed: bool? + attr_reader max_speed: BrandDev::Models::BrandRetrieveByEmailParams::max_speed? - def max_speed=: (bool) -> bool + def max_speed=: ( + BrandDev::Models::BrandRetrieveByEmailParams::max_speed + ) -> BrandDev::Models::BrandRetrieveByEmailParams::max_speed + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] attr_reader timeout_ms: Integer? @@ -31,138 +37,283 @@ module BrandDev def initialize: ( email: String, - ?force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language, - ?max_speed: bool, + ?force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveByEmailParams::max_speed, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { email: String, - force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveByEmailParams::max_speed, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } type force_language = - :albanian + :afrikaans + | :albanian + | :amharic | :arabic + | :armenian + | :assamese + | :aymara | :azeri + | :basque + | :belarusian | :bengali + | :bosnian | :bulgarian + | :burmese | :cantonese + | :catalan | :cebuano + | :chinese + | :corsican | :croatian | :czech | :danish | :dutch | :english + | :esperanto | :estonian | :farsi + | :fijian | :finnish | :french + | :galician + | :georgian | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" | :hausa | :hawaiian + | :hebrew | :hindi + | :hmong | :hungarian | :icelandic + | :igbo | :indonesian + | :irish | :italian + | :japanese + | :javanese + | :kannada | :kazakh + | :khmer + | :kinyarwanda | :korean + | :kurdish | :kyrgyz + | :lao | :latin | :latvian + | :lingala | :lithuanian + | :luxembourgish | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi | :mongolian | :nepali | :norwegian + | :odia + | :oromo | :pashto | :pidgin | :polish | :portuguese + | :punjabi + | :quechua | :romanian | :russian + | :samoan + | :"scottish-gaelic" | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala | :slovak | :slovene | :somali | :spanish + | :sundanese | :swahili | :swedish | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana | :turkish + | :turkmen | :ukrainian | :urdu + | :uyghur | :uzbek | :vietnamese | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS: :afrikaans ALBANIAN: :albanian + AMHARIC: :amharic ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian BENGALI: :bengali + BOSNIAN: :bosnian BULGARIAN: :bulgarian + BURMESE: :burmese CANTONESE: :cantonese + CATALAN: :catalan CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican CROATIAN: :croatian CZECH: :czech DANISH: :danish DUTCH: :dutch ENGLISH: :english + ESPERANTO: :esperanto ESTONIAN: :estonian FARSI: :farsi + FIJIAN: :fijian FINNISH: :finnish FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" HAUSA: :hausa HAWAIIAN: :hawaiian + HEBREW: :hebrew HINDI: :hindi + HMONG: :hmong HUNGARIAN: :hungarian ICELANDIC: :icelandic + IGBO: :igbo INDONESIAN: :indonesian + IRISH: :irish ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda KOREAN: :korean + KURDISH: :kurdish KYRGYZ: :kyrgyz + LAO: :lao LATIN: :latin LATVIAN: :latvian + LINGALA: :lingala LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi MONGOLIAN: :mongolian NEPALI: :nepali NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo PASHTO: :pashto PIDGIN: :pidgin POLISH: :polish PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua ROMANIAN: :romanian RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala SLOVAK: :slovak SLOVENE: :slovene SOMALI: :somali SPANISH: :spanish + SUNDANESE: :sundanese SWAHILI: :swahili SWEDISH: :swedish TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana TURKISH: :turkish + TURKMEN: :turkmen UKRAINIAN: :ukrainian URDU: :urdu + UYGHUR: :uyghur UZBEK: :uzbek VIETNAMESE: :vietnamese WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByEmailParams::force_language] end + + type max_speed = bool | :true | :false + + module MaxSpeed + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandRetrieveByEmailParams::max_speed] + + TRUE: :true + FALSE: :false + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_by_email_response.rbs b/sig/brand_dev/models/brand_retrieve_by_email_response.rbs index 790467e5..044fa6e7 100644 --- a/sig/brand_dev/models/brand_retrieve_by_email_response.rbs +++ b/sig/brand_dev/models/brand_retrieve_by_email_response.rbs @@ -4,6 +4,7 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveByEmailResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata, status: String } @@ -18,6 +19,12 @@ module BrandDev def code=: (Integer) -> Integer + attr_reader key_metadata: BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata + ) -> BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -25,12 +32,14 @@ module BrandDev def initialize: ( ?brand: BrandDev::Models::BrandRetrieveByEmailResponse::Brand, ?code: Integer, + ?key_metadata: BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata, ?status: String ) -> void def to_hash: -> { brand: BrandDev::Models::BrandRetrieveByEmailResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata, status: String } @@ -47,6 +56,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Stock, @@ -110,6 +120,8 @@ module BrandDev def phone=: (String) -> String + attr_accessor primary_language: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::primary_language? + attr_reader slogan: String? def slogan=: (String) -> String @@ -142,6 +154,7 @@ module BrandDev ?links: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Links, ?logos: ::Array[BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Logo], ?phone: String, + ?primary_language: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::primary_language?, ?slogan: String, ?socials: ::Array[BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social], ?stock: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Stock, @@ -160,6 +173,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Stock, @@ -474,7 +488,6 @@ module BrandDev | :"Streaming Platforms (Video, Music, Audio)" | :"Gaming & Interactive Entertainment" | :"Creator Economy & Influencer Platforms" - | :"Advertising, Adtech & Media Buying" | :"Film, TV & Production Studios" | :"Events, Venues & Live Entertainment" | :"Virtual Worlds & Metaverse Experiences" @@ -535,6 +548,7 @@ module BrandDev | :"Streetwear & Emerging Luxury" | :"Couture & Made-to-Measure" | :"News Publishing & Journalism" + | :"Advertising, Adtech & Media Buying" | :"Digital Media & Content Platforms" | :"Broadcasting (TV & Radio)" | :"Podcasting & Audio Media" @@ -698,7 +712,6 @@ module BrandDev STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO: :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT: :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS: :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS: :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT: :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES: :"Virtual Worlds & Metaverse Experiences" @@ -759,6 +772,7 @@ module BrandDev STREETWEAR_EMERGING_LUXURY: :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE: :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM: :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS: :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO: :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA: :"Podcasting & Audio Media" @@ -1039,20 +1053,352 @@ module BrandDev end end - type social = { type: String, url: String } + type primary_language = + :afrikaans + | :albanian + | :amharic + | :arabic + | :armenian + | :assamese + | :aymara + | :azeri + | :basque + | :belarusian + | :bengali + | :bosnian + | :bulgarian + | :burmese + | :cantonese + | :catalan + | :cebuano + | :chinese + | :corsican + | :croatian + | :czech + | :danish + | :dutch + | :english + | :esperanto + | :estonian + | :farsi + | :fijian + | :finnish + | :french + | :galician + | :georgian + | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" + | :hausa + | :hawaiian + | :hebrew + | :hindi + | :hmong + | :hungarian + | :icelandic + | :igbo + | :indonesian + | :irish + | :italian + | :japanese + | :javanese + | :kannada + | :kazakh + | :khmer + | :kinyarwanda + | :korean + | :kurdish + | :kyrgyz + | :lao + | :latin + | :latvian + | :lingala + | :lithuanian + | :luxembourgish + | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi + | :mongolian + | :nepali + | :norwegian + | :odia + | :oromo + | :pashto + | :pidgin + | :polish + | :portuguese + | :punjabi + | :quechua + | :romanian + | :russian + | :samoan + | :"scottish-gaelic" + | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala + | :slovak + | :slovene + | :somali + | :spanish + | :sundanese + | :swahili + | :swedish + | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu + | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana + | :turkish + | :turkmen + | :ukrainian + | :urdu + | :uyghur + | :uzbek + | :vietnamese + | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu + + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS: :afrikaans + ALBANIAN: :albanian + AMHARIC: :amharic + ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara + AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian + BENGALI: :bengali + BOSNIAN: :bosnian + BULGARIAN: :bulgarian + BURMESE: :burmese + CANTONESE: :cantonese + CATALAN: :catalan + CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican + CROATIAN: :croatian + CZECH: :czech + DANISH: :danish + DUTCH: :dutch + ENGLISH: :english + ESPERANTO: :esperanto + ESTONIAN: :estonian + FARSI: :farsi + FIJIAN: :fijian + FINNISH: :finnish + FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian + GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" + HAUSA: :hausa + HAWAIIAN: :hawaiian + HEBREW: :hebrew + HINDI: :hindi + HMONG: :hmong + HUNGARIAN: :hungarian + ICELANDIC: :icelandic + IGBO: :igbo + INDONESIAN: :indonesian + IRISH: :irish + ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada + KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda + KOREAN: :korean + KURDISH: :kurdish + KYRGYZ: :kyrgyz + LAO: :lao + LATIN: :latin + LATVIAN: :latvian + LINGALA: :lingala + LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish + MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi + MONGOLIAN: :mongolian + NEPALI: :nepali + NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo + PASHTO: :pashto + PIDGIN: :pidgin + POLISH: :polish + PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua + ROMANIAN: :romanian + RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" + SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala + SLOVAK: :slovak + SLOVENE: :slovene + SOMALI: :somali + SPANISH: :spanish + SUNDANESE: :sundanese + SWAHILI: :swahili + SWEDISH: :swedish + TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu + THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana + TURKISH: :turkish + TURKMEN: :turkmen + UKRAINIAN: :ukrainian + URDU: :urdu + UYGHUR: :uyghur + UZBEK: :uzbek + VIETNAMESE: :vietnamese + WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByEmailResponse::Brand::primary_language] + end + + type social = + { + type: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::type_, + url: String + } class Social < BrandDev::Internal::Type::BaseModel - attr_reader type: String? + attr_reader type: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::type_? - def type=: (String) -> String + def type=: ( + BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::type_ + ) -> BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::type_ attr_reader url: String? def url=: (String) -> String - def initialize: (?type: String, ?url: String) -> void + def initialize: ( + ?type: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::type_, + ?url: String + ) -> void - def to_hash: -> { type: String, url: String } + def to_hash: -> { + type: BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::type_, + url: String + } + + type type_ = + :x + | :facebook + | :instagram + | :linkedin + | :youtube + | :pinterest + | :tiktok + | :dribbble + | :github + | :behance + | :snapchat + | :whatsapp + | :telegram + | :line + | :discord + | :twitch + | :vimeo + | :imdb + | :tumblr + | :flickr + | :giphy + | :medium + | :spotify + | :soundcloud + | :tripadvisor + | :yelp + | :producthunt + | :reddit + | :crunchbase + | :appstore + | :playstore + + module Type + extend BrandDev::Internal::Type::Enum + + X: :x + FACEBOOK: :facebook + INSTAGRAM: :instagram + LINKEDIN: :linkedin + YOUTUBE: :youtube + PINTEREST: :pinterest + TIKTOK: :tiktok + DRIBBBLE: :dribbble + GITHUB: :github + BEHANCE: :behance + SNAPCHAT: :snapchat + WHATSAPP: :whatsapp + TELEGRAM: :telegram + LINE: :line + DISCORD: :discord + TWITCH: :twitch + VIMEO: :vimeo + IMDB: :imdb + TUMBLR: :tumblr + FLICKR: :flickr + GIPHY: :giphy + MEDIUM: :medium + SPOTIFY: :spotify + SOUNDCLOUD: :soundcloud + TRIPADVISOR: :tripadvisor + YELP: :yelp + PRODUCTHUNT: :producthunt + REDDIT: :reddit + CRUNCHBASE: :crunchbase + APPSTORE: :appstore + PLAYSTORE: :playstore + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByEmailResponse::Brand::Social::type_] + end end type stock = { exchange: String, ticker: String } @@ -1071,6 +1417,25 @@ module BrandDev def to_hash: -> { exchange: String, ticker: String } end end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_by_isin_params.rbs b/sig/brand_dev/models/brand_retrieve_by_isin_params.rbs index 420b71e5..f5d313e3 100644 --- a/sig/brand_dev/models/brand_retrieve_by_isin_params.rbs +++ b/sig/brand_dev/models/brand_retrieve_by_isin_params.rbs @@ -3,8 +3,10 @@ module BrandDev type brand_retrieve_by_isin_params = { isin: String, - force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveByIsinParams::max_speed, + tags: ::Array[String], timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters @@ -15,15 +17,19 @@ module BrandDev attr_accessor isin: String - attr_reader force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language? + attr_accessor force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language? - def force_language=: ( - BrandDev::Models::BrandRetrieveByIsinParams::force_language - ) -> BrandDev::Models::BrandRetrieveByIsinParams::force_language + attr_accessor max_age_ms: Integer? - attr_reader max_speed: bool? + attr_reader max_speed: BrandDev::Models::BrandRetrieveByIsinParams::max_speed? - def max_speed=: (bool) -> bool + def max_speed=: ( + BrandDev::Models::BrandRetrieveByIsinParams::max_speed + ) -> BrandDev::Models::BrandRetrieveByIsinParams::max_speed + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] attr_reader timeout_ms: Integer? @@ -31,138 +37,283 @@ module BrandDev def initialize: ( isin: String, - ?force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language, - ?max_speed: bool, + ?force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveByIsinParams::max_speed, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { isin: String, - force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveByIsinParams::max_speed, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } type force_language = - :albanian + :afrikaans + | :albanian + | :amharic | :arabic + | :armenian + | :assamese + | :aymara | :azeri + | :basque + | :belarusian | :bengali + | :bosnian | :bulgarian + | :burmese | :cantonese + | :catalan | :cebuano + | :chinese + | :corsican | :croatian | :czech | :danish | :dutch | :english + | :esperanto | :estonian | :farsi + | :fijian | :finnish | :french + | :galician + | :georgian | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" | :hausa | :hawaiian + | :hebrew | :hindi + | :hmong | :hungarian | :icelandic + | :igbo | :indonesian + | :irish | :italian + | :japanese + | :javanese + | :kannada | :kazakh + | :khmer + | :kinyarwanda | :korean + | :kurdish | :kyrgyz + | :lao | :latin | :latvian + | :lingala | :lithuanian + | :luxembourgish | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi | :mongolian | :nepali | :norwegian + | :odia + | :oromo | :pashto | :pidgin | :polish | :portuguese + | :punjabi + | :quechua | :romanian | :russian + | :samoan + | :"scottish-gaelic" | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala | :slovak | :slovene | :somali | :spanish + | :sundanese | :swahili | :swedish | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana | :turkish + | :turkmen | :ukrainian | :urdu + | :uyghur | :uzbek | :vietnamese | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS: :afrikaans ALBANIAN: :albanian + AMHARIC: :amharic ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian BENGALI: :bengali + BOSNIAN: :bosnian BULGARIAN: :bulgarian + BURMESE: :burmese CANTONESE: :cantonese + CATALAN: :catalan CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican CROATIAN: :croatian CZECH: :czech DANISH: :danish DUTCH: :dutch ENGLISH: :english + ESPERANTO: :esperanto ESTONIAN: :estonian FARSI: :farsi + FIJIAN: :fijian FINNISH: :finnish FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" HAUSA: :hausa HAWAIIAN: :hawaiian + HEBREW: :hebrew HINDI: :hindi + HMONG: :hmong HUNGARIAN: :hungarian ICELANDIC: :icelandic + IGBO: :igbo INDONESIAN: :indonesian + IRISH: :irish ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda KOREAN: :korean + KURDISH: :kurdish KYRGYZ: :kyrgyz + LAO: :lao LATIN: :latin LATVIAN: :latvian + LINGALA: :lingala LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi MONGOLIAN: :mongolian NEPALI: :nepali NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo PASHTO: :pashto PIDGIN: :pidgin POLISH: :polish PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua ROMANIAN: :romanian RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala SLOVAK: :slovak SLOVENE: :slovene SOMALI: :somali SPANISH: :spanish + SUNDANESE: :sundanese SWAHILI: :swahili SWEDISH: :swedish TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana TURKISH: :turkish + TURKMEN: :turkmen UKRAINIAN: :ukrainian URDU: :urdu + UYGHUR: :uyghur UZBEK: :uzbek VIETNAMESE: :vietnamese WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByIsinParams::force_language] end + + type max_speed = bool | :true | :false + + module MaxSpeed + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandRetrieveByIsinParams::max_speed] + + TRUE: :true + FALSE: :false + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_by_isin_response.rbs b/sig/brand_dev/models/brand_retrieve_by_isin_response.rbs index a6bca272..b840b4e1 100644 --- a/sig/brand_dev/models/brand_retrieve_by_isin_response.rbs +++ b/sig/brand_dev/models/brand_retrieve_by_isin_response.rbs @@ -4,6 +4,7 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveByIsinResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata, status: String } @@ -18,6 +19,12 @@ module BrandDev def code=: (Integer) -> Integer + attr_reader key_metadata: BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata + ) -> BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -25,12 +32,14 @@ module BrandDev def initialize: ( ?brand: BrandDev::Models::BrandRetrieveByIsinResponse::Brand, ?code: Integer, + ?key_metadata: BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata, ?status: String ) -> void def to_hash: -> { brand: BrandDev::Models::BrandRetrieveByIsinResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata, status: String } @@ -47,6 +56,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Stock, @@ -110,6 +120,8 @@ module BrandDev def phone=: (String) -> String + attr_accessor primary_language: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::primary_language? + attr_reader slogan: String? def slogan=: (String) -> String @@ -142,6 +154,7 @@ module BrandDev ?links: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Links, ?logos: ::Array[BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Logo], ?phone: String, + ?primary_language: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::primary_language?, ?slogan: String, ?socials: ::Array[BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social], ?stock: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Stock, @@ -160,6 +173,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Stock, @@ -474,7 +488,6 @@ module BrandDev | :"Streaming Platforms (Video, Music, Audio)" | :"Gaming & Interactive Entertainment" | :"Creator Economy & Influencer Platforms" - | :"Advertising, Adtech & Media Buying" | :"Film, TV & Production Studios" | :"Events, Venues & Live Entertainment" | :"Virtual Worlds & Metaverse Experiences" @@ -535,6 +548,7 @@ module BrandDev | :"Streetwear & Emerging Luxury" | :"Couture & Made-to-Measure" | :"News Publishing & Journalism" + | :"Advertising, Adtech & Media Buying" | :"Digital Media & Content Platforms" | :"Broadcasting (TV & Radio)" | :"Podcasting & Audio Media" @@ -698,7 +712,6 @@ module BrandDev STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO: :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT: :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS: :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS: :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT: :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES: :"Virtual Worlds & Metaverse Experiences" @@ -759,6 +772,7 @@ module BrandDev STREETWEAR_EMERGING_LUXURY: :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE: :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM: :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS: :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO: :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA: :"Podcasting & Audio Media" @@ -1039,20 +1053,352 @@ module BrandDev end end - type social = { type: String, url: String } + type primary_language = + :afrikaans + | :albanian + | :amharic + | :arabic + | :armenian + | :assamese + | :aymara + | :azeri + | :basque + | :belarusian + | :bengali + | :bosnian + | :bulgarian + | :burmese + | :cantonese + | :catalan + | :cebuano + | :chinese + | :corsican + | :croatian + | :czech + | :danish + | :dutch + | :english + | :esperanto + | :estonian + | :farsi + | :fijian + | :finnish + | :french + | :galician + | :georgian + | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" + | :hausa + | :hawaiian + | :hebrew + | :hindi + | :hmong + | :hungarian + | :icelandic + | :igbo + | :indonesian + | :irish + | :italian + | :japanese + | :javanese + | :kannada + | :kazakh + | :khmer + | :kinyarwanda + | :korean + | :kurdish + | :kyrgyz + | :lao + | :latin + | :latvian + | :lingala + | :lithuanian + | :luxembourgish + | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi + | :mongolian + | :nepali + | :norwegian + | :odia + | :oromo + | :pashto + | :pidgin + | :polish + | :portuguese + | :punjabi + | :quechua + | :romanian + | :russian + | :samoan + | :"scottish-gaelic" + | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala + | :slovak + | :slovene + | :somali + | :spanish + | :sundanese + | :swahili + | :swedish + | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu + | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana + | :turkish + | :turkmen + | :ukrainian + | :urdu + | :uyghur + | :uzbek + | :vietnamese + | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu + + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS: :afrikaans + ALBANIAN: :albanian + AMHARIC: :amharic + ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara + AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian + BENGALI: :bengali + BOSNIAN: :bosnian + BULGARIAN: :bulgarian + BURMESE: :burmese + CANTONESE: :cantonese + CATALAN: :catalan + CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican + CROATIAN: :croatian + CZECH: :czech + DANISH: :danish + DUTCH: :dutch + ENGLISH: :english + ESPERANTO: :esperanto + ESTONIAN: :estonian + FARSI: :farsi + FIJIAN: :fijian + FINNISH: :finnish + FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian + GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" + HAUSA: :hausa + HAWAIIAN: :hawaiian + HEBREW: :hebrew + HINDI: :hindi + HMONG: :hmong + HUNGARIAN: :hungarian + ICELANDIC: :icelandic + IGBO: :igbo + INDONESIAN: :indonesian + IRISH: :irish + ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada + KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda + KOREAN: :korean + KURDISH: :kurdish + KYRGYZ: :kyrgyz + LAO: :lao + LATIN: :latin + LATVIAN: :latvian + LINGALA: :lingala + LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish + MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi + MONGOLIAN: :mongolian + NEPALI: :nepali + NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo + PASHTO: :pashto + PIDGIN: :pidgin + POLISH: :polish + PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua + ROMANIAN: :romanian + RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" + SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala + SLOVAK: :slovak + SLOVENE: :slovene + SOMALI: :somali + SPANISH: :spanish + SUNDANESE: :sundanese + SWAHILI: :swahili + SWEDISH: :swedish + TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu + THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana + TURKISH: :turkish + TURKMEN: :turkmen + UKRAINIAN: :ukrainian + URDU: :urdu + UYGHUR: :uyghur + UZBEK: :uzbek + VIETNAMESE: :vietnamese + WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByIsinResponse::Brand::primary_language] + end + + type social = + { + type: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::type_, + url: String + } class Social < BrandDev::Internal::Type::BaseModel - attr_reader type: String? + attr_reader type: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::type_? - def type=: (String) -> String + def type=: ( + BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::type_ + ) -> BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::type_ attr_reader url: String? def url=: (String) -> String - def initialize: (?type: String, ?url: String) -> void + def initialize: ( + ?type: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::type_, + ?url: String + ) -> void - def to_hash: -> { type: String, url: String } + def to_hash: -> { + type: BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::type_, + url: String + } + + type type_ = + :x + | :facebook + | :instagram + | :linkedin + | :youtube + | :pinterest + | :tiktok + | :dribbble + | :github + | :behance + | :snapchat + | :whatsapp + | :telegram + | :line + | :discord + | :twitch + | :vimeo + | :imdb + | :tumblr + | :flickr + | :giphy + | :medium + | :spotify + | :soundcloud + | :tripadvisor + | :yelp + | :producthunt + | :reddit + | :crunchbase + | :appstore + | :playstore + + module Type + extend BrandDev::Internal::Type::Enum + + X: :x + FACEBOOK: :facebook + INSTAGRAM: :instagram + LINKEDIN: :linkedin + YOUTUBE: :youtube + PINTEREST: :pinterest + TIKTOK: :tiktok + DRIBBBLE: :dribbble + GITHUB: :github + BEHANCE: :behance + SNAPCHAT: :snapchat + WHATSAPP: :whatsapp + TELEGRAM: :telegram + LINE: :line + DISCORD: :discord + TWITCH: :twitch + VIMEO: :vimeo + IMDB: :imdb + TUMBLR: :tumblr + FLICKR: :flickr + GIPHY: :giphy + MEDIUM: :medium + SPOTIFY: :spotify + SOUNDCLOUD: :soundcloud + TRIPADVISOR: :tripadvisor + YELP: :yelp + PRODUCTHUNT: :producthunt + REDDIT: :reddit + CRUNCHBASE: :crunchbase + APPSTORE: :appstore + PLAYSTORE: :playstore + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByIsinResponse::Brand::Social::type_] + end end type stock = { exchange: String, ticker: String } @@ -1071,6 +1417,25 @@ module BrandDev def to_hash: -> { exchange: String, ticker: String } end end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_by_name_params.rbs b/sig/brand_dev/models/brand_retrieve_by_name_params.rbs index 571f0ece..0d36190b 100644 --- a/sig/brand_dev/models/brand_retrieve_by_name_params.rbs +++ b/sig/brand_dev/models/brand_retrieve_by_name_params.rbs @@ -4,8 +4,10 @@ module BrandDev { name: String, country_gl: BrandDev::Models::BrandRetrieveByNameParams::country_gl, - force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveByNameParams::max_speed, + tags: ::Array[String], timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters @@ -22,15 +24,19 @@ module BrandDev BrandDev::Models::BrandRetrieveByNameParams::country_gl ) -> BrandDev::Models::BrandRetrieveByNameParams::country_gl - attr_reader force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language? + attr_accessor force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language? - def force_language=: ( - BrandDev::Models::BrandRetrieveByNameParams::force_language - ) -> BrandDev::Models::BrandRetrieveByNameParams::force_language + attr_accessor max_age_ms: Integer? - attr_reader max_speed: bool? + attr_reader max_speed: BrandDev::Models::BrandRetrieveByNameParams::max_speed? - def max_speed=: (bool) -> bool + def max_speed=: ( + BrandDev::Models::BrandRetrieveByNameParams::max_speed + ) -> BrandDev::Models::BrandRetrieveByNameParams::max_speed + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] attr_reader timeout_ms: Integer? @@ -39,8 +45,10 @@ module BrandDev def initialize: ( name: String, ?country_gl: BrandDev::Models::BrandRetrieveByNameParams::country_gl, - ?force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language, - ?max_speed: bool, + ?force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveByNameParams::max_speed, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void @@ -48,493 +56,495 @@ module BrandDev def to_hash: -> { name: String, country_gl: BrandDev::Models::BrandRetrieveByNameParams::country_gl, - force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveByNameParams::max_speed, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } type country_gl = - :ad - | :ae - | :af - | :ag - | :ai + :af | :al - | :am - | :an + | :dz + | :as + | :ad | :ao + | :ai | :aq + | :ag | :ar - | :as - | :at - | :au + | :am | :aw + | :au + | :at | :az - | :ba - | :bb + | :bs + | :bh | :bd + | :bb + | :by | :be - | :bf - | :bg - | :bh - | :bi + | :bz | :bj | :bm - | :bn - | :bo - | :br - | :bs | :bt - | :bv + | :bo + | :ba | :bw - | :by - | :bz + | :bv + | :br + | :io + | :bn + | :bg + | :bf + | :bi + | :kh + | :cm | :ca - | :cc - | :cd + | :cv + | :ky | :cf - | :cg - | :ch - | :ci - | :ck + | :td | :cl - | :cm | :cn + | :cx + | :cc | :co + | :km + | :cg + | :cd + | :ck | :cr + | :ci + | :hr | :cu - | :cv - | :cx | :cy | :cz - | :de - | :dj | :dk + | :dj | :dm | :do - | :dz | :ec - | :ee | :eg - | :eh + | :sv + | :gq | :er - | :es + | :ee | :et - | :fi - | :fj | :fk - | :fm | :fo + | :fj + | :fi | :fr + | :gf + | :pf + | :tf | :ga - | :gb - | :gd + | :gm | :ge - | :gf + | :de | :gh | :gi + | :gr | :gl - | :gm - | :gn + | :gd | :gp - | :gq - | :gr - | :gs - | :gt | :gu + | :gt + | :gn | :gw | :gy - | :hk + | :ht | :hm + | :va | :hn - | :hr - | :ht + | :hk | :hu + | :is + | :in | :id + | :ir + | :iq | :ie | :il - | :in - | :io - | :iq - | :ir - | :is | :it | :jm - | :jo | :jp + | :jo + | :kz | :ke - | :kg - | :kh | :ki - | :km - | :kn | :kp | :kr | :kw - | :ky - | :kz + | :kg | :la + | :lv | :lb - | :lc - | :li - | :lk - | :lr | :ls + | :lr + | :ly + | :li | :lt | :lu - | :lv - | :ly - | :ma - | :mc - | :md - | :mg - | :mh + | :mo | :mk + | :mg + | :mw + | :my + | :mv | :ml - | :mm - | :mn - | :mo - | :mp + | :mt + | :mh | :mq | :mr - | :ms - | :mt | :mu - | :mv - | :mw + | :yt | :mx - | :my + | :fm + | :md + | :mc + | :mn + | :ms + | :ma | :mz + | :mm | :na + | :nr + | :np + | :nl + | :an | :nc + | :nz + | :ni | :ne - | :nf | :ng - | :ni - | :nl - | :no - | :np - | :nr | :nu - | :nz + | :nf + | :mp + | :no | :om + | :pk + | :pw + | :ps | :pa - | :pe - | :pf | :pg + | :py + | :pe | :ph - | :pk - | :pl - | :pm | :pn - | :pr - | :ps + | :pl | :pt - | :pw - | :py + | :pr | :qa | :re | :ro - | :rs | :ru | :rw + | :sh + | :kn + | :lc + | :pm + | :vc + | :ws + | :sm + | :st | :sa - | :sb + | :sn + | :rs | :sc - | :sd - | :se + | :sl | :sg - | :sh - | :si - | :sj | :sk - | :sl - | :sm - | :sn + | :si + | :sb | :so + | :za + | :gs + | :es + | :lk + | :sd | :sr - | :st - | :sv - | :sy + | :sj | :sz - | :tc - | :td - | :tf - | :tg - | :th + | :se + | :ch + | :sy + | :tw | :tj - | :tk + | :tz + | :th | :tl - | :tm - | :tn + | :tg + | :tk | :to - | :tr | :tt + | :tn + | :tr + | :tm + | :tc | :tv - | :tw - | :tz - | :ua | :ug - | :um + | :ua + | :ae + | :gb | :us + | :um | :uy | :uz - | :va - | :vc + | :vu | :ve + | :vn | :vg | :vi - | :vn - | :vu | :wf - | :ws + | :eh | :ye - | :yt - | :za | :zm | :zw module CountryGl extend BrandDev::Internal::Type::Enum - AD: :ad - AE: :ae AF: :af - AG: :ag - AI: :ai AL: :al - AM: :am - AN: :an + DZ: :dz + AS: :as + AD: :ad AO: :ao + AI: :ai AQ: :aq + AG: :ag AR: :ar - AS: :as - AT: :at - AU: :au + AM: :am AW: :aw + AU: :au + AT: :at AZ: :az - BA: :ba - BB: :bb + BS: :bs + BH: :bh BD: :bd + BB: :bb + BY: :by BE: :be - BF: :bf - BG: :bg - BH: :bh - BI: :bi + BZ: :bz BJ: :bj BM: :bm - BN: :bn - BO: :bo - BR: :br - BS: :bs BT: :bt - BV: :bv + BO: :bo + BA: :ba BW: :bw - BY: :by - BZ: :bz + BV: :bv + BR: :br + IO: :io + BN: :bn + BG: :bg + BF: :bf + BI: :bi + KH: :kh + CM: :cm CA: :ca - CC: :cc - CD: :cd + CV: :cv + KY: :ky CF: :cf - CG: :cg - CH: :ch - CI: :ci - CK: :ck + TD: :td CL: :cl - CM: :cm CN: :cn + CX: :cx + CC: :cc CO: :co + KM: :km + CG: :cg + CD: :cd + CK: :ck CR: :cr + CI: :ci + HR: :hr CU: :cu - CV: :cv - CX: :cx CY: :cy CZ: :cz - DE: :de - DJ: :dj DK: :dk + DJ: :dj DM: :dm DO: :do - DZ: :dz EC: :ec - EE: :ee EG: :eg - EH: :eh + SV: :sv + GQ: :gq ER: :er - ES: :es + EE: :ee ET: :et - FI: :fi - FJ: :fj FK: :fk - FM: :fm FO: :fo + FJ: :fj + FI: :fi FR: :fr + GF: :gf + PF: :pf + TF: :tf GA: :ga - GB: :gb - GD: :gd + GM: :gm GE: :ge - GF: :gf + DE: :de GH: :gh GI: :gi + GR: :gr GL: :gl - GM: :gm - GN: :gn + GD: :gd GP: :gp - GQ: :gq - GR: :gr - GS: :gs - GT: :gt GU: :gu + GT: :gt + GN: :gn GW: :gw GY: :gy - HK: :hk + HT: :ht HM: :hm + VA: :va HN: :hn - HR: :hr - HT: :ht + HK: :hk HU: :hu + IS: :is + IN: :in ID: :id + IR: :ir + IQ: :iq IE: :ie IL: :il - IN: :in - IO: :io - IQ: :iq - IR: :ir - IS: :is IT: :it JM: :jm - JO: :jo JP: :jp + JO: :jo + KZ: :kz KE: :ke - KG: :kg - KH: :kh KI: :ki - KM: :km - KN: :kn KP: :kp KR: :kr KW: :kw - KY: :ky - KZ: :kz + KG: :kg LA: :la + LV: :lv LB: :lb - LC: :lc - LI: :li - LK: :lk - LR: :lr LS: :ls + LR: :lr + LY: :ly + LI: :li LT: :lt LU: :lu - LV: :lv - LY: :ly - MA: :ma - MC: :mc - MD: :md - MG: :mg - MH: :mh + MO: :mo MK: :mk + MG: :mg + MW: :mw + MY: :my + MV: :mv ML: :ml - MM: :mm - MN: :mn - MO: :mo - MP: :mp + MT: :mt + MH: :mh MQ: :mq MR: :mr - MS: :ms - MT: :mt MU: :mu - MV: :mv - MW: :mw + YT: :yt MX: :mx - MY: :my + FM: :fm + MD: :md + MC: :mc + MN: :mn + MS: :ms + MA: :ma MZ: :mz + MM: :mm NA: :na + NR: :nr + NP: :np + NL: :nl + AN: :an NC: :nc + NZ: :nz + NI: :ni NE: :ne - NF: :nf NG: :ng - NI: :ni - NL: :nl - NO: :no - NP: :np - NR: :nr NU: :nu - NZ: :nz + NF: :nf + MP: :mp + NO: :no OM: :om + PK: :pk + PW: :pw + PS: :ps PA: :pa - PE: :pe - PF: :pf PG: :pg + PY: :py + PE: :pe PH: :ph - PK: :pk - PL: :pl - PM: :pm PN: :pn - PR: :pr - PS: :ps + PL: :pl PT: :pt - PW: :pw - PY: :py + PR: :pr QA: :qa RE: :re RO: :ro - RS: :rs RU: :ru RW: :rw + SH: :sh + KN: :kn + LC: :lc + PM: :pm + VC: :vc + WS: :ws + SM: :sm + ST: :st SA: :sa - SB: :sb + SN: :sn + RS: :rs SC: :sc - SD: :sd - SE: :se + SL: :sl SG: :sg - SH: :sh - SI: :si - SJ: :sj SK: :sk - SL: :sl - SM: :sm - SN: :sn + SI: :si + SB: :sb SO: :so + ZA: :za + GS: :gs + ES: :es + LK: :lk + SD: :sd SR: :sr - ST: :st - SV: :sv - SY: :sy + SJ: :sj SZ: :sz - TC: :tc - TD: :td - TF: :tf - TG: :tg - TH: :th + SE: :se + CH: :ch + SY: :sy + TW: :tw TJ: :tj - TK: :tk + TZ: :tz + TH: :th TL: :tl - TM: :tm - TN: :tn + TG: :tg + TK: :tk TO: :to - TR: :tr TT: :tt + TN: :tn + TR: :tr + TM: :tm + TC: :tc TV: :tv - TW: :tw - TZ: :tz - UA: :ua UG: :ug - UM: :um + UA: :ua + AE: :ae + GB: :gb US: :us + UM: :um UY: :uy UZ: :uz - VA: :va - VC: :vc + VU: :vu VE: :ve + VN: :vn VG: :vg VI: :vi - VN: :vn - VU: :vu WF: :wf - WS: :ws + EH: :eh YE: :ye - YT: :yt - ZA: :za ZM: :zm ZW: :zw @@ -542,123 +552,264 @@ module BrandDev end type force_language = - :albanian + :afrikaans + | :albanian + | :amharic | :arabic + | :armenian + | :assamese + | :aymara | :azeri + | :basque + | :belarusian | :bengali + | :bosnian | :bulgarian + | :burmese | :cantonese + | :catalan | :cebuano + | :chinese + | :corsican | :croatian | :czech | :danish | :dutch | :english + | :esperanto | :estonian | :farsi + | :fijian | :finnish | :french + | :galician + | :georgian | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" | :hausa | :hawaiian + | :hebrew | :hindi + | :hmong | :hungarian | :icelandic + | :igbo | :indonesian + | :irish | :italian + | :japanese + | :javanese + | :kannada | :kazakh + | :khmer + | :kinyarwanda | :korean + | :kurdish | :kyrgyz + | :lao | :latin | :latvian + | :lingala | :lithuanian + | :luxembourgish | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi | :mongolian | :nepali | :norwegian + | :odia + | :oromo | :pashto | :pidgin | :polish | :portuguese + | :punjabi + | :quechua | :romanian | :russian + | :samoan + | :"scottish-gaelic" | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala | :slovak | :slovene | :somali | :spanish + | :sundanese | :swahili | :swedish | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana | :turkish + | :turkmen | :ukrainian | :urdu + | :uyghur | :uzbek | :vietnamese | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS: :afrikaans ALBANIAN: :albanian + AMHARIC: :amharic ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian BENGALI: :bengali + BOSNIAN: :bosnian BULGARIAN: :bulgarian + BURMESE: :burmese CANTONESE: :cantonese + CATALAN: :catalan CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican CROATIAN: :croatian CZECH: :czech DANISH: :danish DUTCH: :dutch ENGLISH: :english + ESPERANTO: :esperanto ESTONIAN: :estonian FARSI: :farsi + FIJIAN: :fijian FINNISH: :finnish FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" HAUSA: :hausa HAWAIIAN: :hawaiian + HEBREW: :hebrew HINDI: :hindi + HMONG: :hmong HUNGARIAN: :hungarian ICELANDIC: :icelandic + IGBO: :igbo INDONESIAN: :indonesian + IRISH: :irish ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda KOREAN: :korean + KURDISH: :kurdish KYRGYZ: :kyrgyz + LAO: :lao LATIN: :latin LATVIAN: :latvian + LINGALA: :lingala LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi MONGOLIAN: :mongolian NEPALI: :nepali NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo PASHTO: :pashto PIDGIN: :pidgin POLISH: :polish PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua ROMANIAN: :romanian RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala SLOVAK: :slovak SLOVENE: :slovene SOMALI: :somali SPANISH: :spanish + SUNDANESE: :sundanese SWAHILI: :swahili SWEDISH: :swedish TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana TURKISH: :turkish + TURKMEN: :turkmen UKRAINIAN: :ukrainian URDU: :urdu + UYGHUR: :uyghur UZBEK: :uzbek VIETNAMESE: :vietnamese WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByNameParams::force_language] end + + type max_speed = bool | :true | :false + + module MaxSpeed + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandRetrieveByNameParams::max_speed] + + TRUE: :true + FALSE: :false + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_by_name_response.rbs b/sig/brand_dev/models/brand_retrieve_by_name_response.rbs index 639d119f..caf18f70 100644 --- a/sig/brand_dev/models/brand_retrieve_by_name_response.rbs +++ b/sig/brand_dev/models/brand_retrieve_by_name_response.rbs @@ -4,6 +4,7 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveByNameResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata, status: String } @@ -18,6 +19,12 @@ module BrandDev def code=: (Integer) -> Integer + attr_reader key_metadata: BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata + ) -> BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -25,12 +32,14 @@ module BrandDev def initialize: ( ?brand: BrandDev::Models::BrandRetrieveByNameResponse::Brand, ?code: Integer, + ?key_metadata: BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata, ?status: String ) -> void def to_hash: -> { brand: BrandDev::Models::BrandRetrieveByNameResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata, status: String } @@ -47,6 +56,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveByNameResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveByNameResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Stock, @@ -110,6 +120,8 @@ module BrandDev def phone=: (String) -> String + attr_accessor primary_language: BrandDev::Models::BrandRetrieveByNameResponse::Brand::primary_language? + attr_reader slogan: String? def slogan=: (String) -> String @@ -142,6 +154,7 @@ module BrandDev ?links: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Links, ?logos: ::Array[BrandDev::Models::BrandRetrieveByNameResponse::Brand::Logo], ?phone: String, + ?primary_language: BrandDev::Models::BrandRetrieveByNameResponse::Brand::primary_language?, ?slogan: String, ?socials: ::Array[BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social], ?stock: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Stock, @@ -160,6 +173,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveByNameResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveByNameResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Stock, @@ -474,7 +488,6 @@ module BrandDev | :"Streaming Platforms (Video, Music, Audio)" | :"Gaming & Interactive Entertainment" | :"Creator Economy & Influencer Platforms" - | :"Advertising, Adtech & Media Buying" | :"Film, TV & Production Studios" | :"Events, Venues & Live Entertainment" | :"Virtual Worlds & Metaverse Experiences" @@ -535,6 +548,7 @@ module BrandDev | :"Streetwear & Emerging Luxury" | :"Couture & Made-to-Measure" | :"News Publishing & Journalism" + | :"Advertising, Adtech & Media Buying" | :"Digital Media & Content Platforms" | :"Broadcasting (TV & Radio)" | :"Podcasting & Audio Media" @@ -698,7 +712,6 @@ module BrandDev STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO: :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT: :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS: :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS: :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT: :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES: :"Virtual Worlds & Metaverse Experiences" @@ -759,6 +772,7 @@ module BrandDev STREETWEAR_EMERGING_LUXURY: :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE: :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM: :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS: :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO: :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA: :"Podcasting & Audio Media" @@ -1039,20 +1053,352 @@ module BrandDev end end - type social = { type: String, url: String } + type primary_language = + :afrikaans + | :albanian + | :amharic + | :arabic + | :armenian + | :assamese + | :aymara + | :azeri + | :basque + | :belarusian + | :bengali + | :bosnian + | :bulgarian + | :burmese + | :cantonese + | :catalan + | :cebuano + | :chinese + | :corsican + | :croatian + | :czech + | :danish + | :dutch + | :english + | :esperanto + | :estonian + | :farsi + | :fijian + | :finnish + | :french + | :galician + | :georgian + | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" + | :hausa + | :hawaiian + | :hebrew + | :hindi + | :hmong + | :hungarian + | :icelandic + | :igbo + | :indonesian + | :irish + | :italian + | :japanese + | :javanese + | :kannada + | :kazakh + | :khmer + | :kinyarwanda + | :korean + | :kurdish + | :kyrgyz + | :lao + | :latin + | :latvian + | :lingala + | :lithuanian + | :luxembourgish + | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi + | :mongolian + | :nepali + | :norwegian + | :odia + | :oromo + | :pashto + | :pidgin + | :polish + | :portuguese + | :punjabi + | :quechua + | :romanian + | :russian + | :samoan + | :"scottish-gaelic" + | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala + | :slovak + | :slovene + | :somali + | :spanish + | :sundanese + | :swahili + | :swedish + | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu + | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana + | :turkish + | :turkmen + | :ukrainian + | :urdu + | :uyghur + | :uzbek + | :vietnamese + | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu + + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS: :afrikaans + ALBANIAN: :albanian + AMHARIC: :amharic + ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara + AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian + BENGALI: :bengali + BOSNIAN: :bosnian + BULGARIAN: :bulgarian + BURMESE: :burmese + CANTONESE: :cantonese + CATALAN: :catalan + CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican + CROATIAN: :croatian + CZECH: :czech + DANISH: :danish + DUTCH: :dutch + ENGLISH: :english + ESPERANTO: :esperanto + ESTONIAN: :estonian + FARSI: :farsi + FIJIAN: :fijian + FINNISH: :finnish + FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian + GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" + HAUSA: :hausa + HAWAIIAN: :hawaiian + HEBREW: :hebrew + HINDI: :hindi + HMONG: :hmong + HUNGARIAN: :hungarian + ICELANDIC: :icelandic + IGBO: :igbo + INDONESIAN: :indonesian + IRISH: :irish + ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada + KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda + KOREAN: :korean + KURDISH: :kurdish + KYRGYZ: :kyrgyz + LAO: :lao + LATIN: :latin + LATVIAN: :latvian + LINGALA: :lingala + LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish + MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi + MONGOLIAN: :mongolian + NEPALI: :nepali + NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo + PASHTO: :pashto + PIDGIN: :pidgin + POLISH: :polish + PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua + ROMANIAN: :romanian + RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" + SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala + SLOVAK: :slovak + SLOVENE: :slovene + SOMALI: :somali + SPANISH: :spanish + SUNDANESE: :sundanese + SWAHILI: :swahili + SWEDISH: :swedish + TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu + THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana + TURKISH: :turkish + TURKMEN: :turkmen + UKRAINIAN: :ukrainian + URDU: :urdu + UYGHUR: :uyghur + UZBEK: :uzbek + VIETNAMESE: :vietnamese + WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByNameResponse::Brand::primary_language] + end + + type social = + { + type: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::type_, + url: String + } class Social < BrandDev::Internal::Type::BaseModel - attr_reader type: String? + attr_reader type: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::type_? - def type=: (String) -> String + def type=: ( + BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::type_ + ) -> BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::type_ attr_reader url: String? def url=: (String) -> String - def initialize: (?type: String, ?url: String) -> void + def initialize: ( + ?type: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::type_, + ?url: String + ) -> void - def to_hash: -> { type: String, url: String } + def to_hash: -> { + type: BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::type_, + url: String + } + + type type_ = + :x + | :facebook + | :instagram + | :linkedin + | :youtube + | :pinterest + | :tiktok + | :dribbble + | :github + | :behance + | :snapchat + | :whatsapp + | :telegram + | :line + | :discord + | :twitch + | :vimeo + | :imdb + | :tumblr + | :flickr + | :giphy + | :medium + | :spotify + | :soundcloud + | :tripadvisor + | :yelp + | :producthunt + | :reddit + | :crunchbase + | :appstore + | :playstore + + module Type + extend BrandDev::Internal::Type::Enum + + X: :x + FACEBOOK: :facebook + INSTAGRAM: :instagram + LINKEDIN: :linkedin + YOUTUBE: :youtube + PINTEREST: :pinterest + TIKTOK: :tiktok + DRIBBBLE: :dribbble + GITHUB: :github + BEHANCE: :behance + SNAPCHAT: :snapchat + WHATSAPP: :whatsapp + TELEGRAM: :telegram + LINE: :line + DISCORD: :discord + TWITCH: :twitch + VIMEO: :vimeo + IMDB: :imdb + TUMBLR: :tumblr + FLICKR: :flickr + GIPHY: :giphy + MEDIUM: :medium + SPOTIFY: :spotify + SOUNDCLOUD: :soundcloud + TRIPADVISOR: :tripadvisor + YELP: :yelp + PRODUCTHUNT: :producthunt + REDDIT: :reddit + CRUNCHBASE: :crunchbase + APPSTORE: :appstore + PLAYSTORE: :playstore + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByNameResponse::Brand::Social::type_] + end end type stock = { exchange: String, ticker: String } @@ -1071,6 +1417,25 @@ module BrandDev def to_hash: -> { exchange: String, ticker: String } end end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_by_ticker_params.rbs b/sig/brand_dev/models/brand_retrieve_by_ticker_params.rbs index d1e430d7..de89265a 100644 --- a/sig/brand_dev/models/brand_retrieve_by_ticker_params.rbs +++ b/sig/brand_dev/models/brand_retrieve_by_ticker_params.rbs @@ -3,8 +3,10 @@ module BrandDev type brand_retrieve_by_ticker_params = { ticker: String, - force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveByTickerParams::max_speed, + tags: ::Array[String], ticker_exchange: BrandDev::Models::BrandRetrieveByTickerParams::ticker_exchange, timeout_ms: Integer } @@ -16,15 +18,19 @@ module BrandDev attr_accessor ticker: String - attr_reader force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language? + attr_accessor force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language? - def force_language=: ( - BrandDev::Models::BrandRetrieveByTickerParams::force_language - ) -> BrandDev::Models::BrandRetrieveByTickerParams::force_language + attr_accessor max_age_ms: Integer? - attr_reader max_speed: bool? + attr_reader max_speed: BrandDev::Models::BrandRetrieveByTickerParams::max_speed? - def max_speed=: (bool) -> bool + def max_speed=: ( + BrandDev::Models::BrandRetrieveByTickerParams::max_speed + ) -> BrandDev::Models::BrandRetrieveByTickerParams::max_speed + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] attr_reader ticker_exchange: BrandDev::Models::BrandRetrieveByTickerParams::ticker_exchange? @@ -38,8 +44,10 @@ module BrandDev def initialize: ( ticker: String, - ?force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language, - ?max_speed: bool, + ?force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveByTickerParams::max_speed, + ?tags: ::Array[String], ?ticker_exchange: BrandDev::Models::BrandRetrieveByTickerParams::ticker_exchange, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts @@ -47,132 +55,275 @@ module BrandDev def to_hash: -> { ticker: String, - force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveByTickerParams::max_speed, + tags: ::Array[String], ticker_exchange: BrandDev::Models::BrandRetrieveByTickerParams::ticker_exchange, timeout_ms: Integer, request_options: BrandDev::RequestOptions } type force_language = - :albanian + :afrikaans + | :albanian + | :amharic | :arabic + | :armenian + | :assamese + | :aymara | :azeri + | :basque + | :belarusian | :bengali + | :bosnian | :bulgarian + | :burmese | :cantonese + | :catalan | :cebuano + | :chinese + | :corsican | :croatian | :czech | :danish | :dutch | :english + | :esperanto | :estonian | :farsi + | :fijian | :finnish | :french + | :galician + | :georgian | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" | :hausa | :hawaiian + | :hebrew | :hindi + | :hmong | :hungarian | :icelandic + | :igbo | :indonesian + | :irish | :italian + | :japanese + | :javanese + | :kannada | :kazakh + | :khmer + | :kinyarwanda | :korean + | :kurdish | :kyrgyz + | :lao | :latin | :latvian + | :lingala | :lithuanian + | :luxembourgish | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi | :mongolian | :nepali | :norwegian + | :odia + | :oromo | :pashto | :pidgin | :polish | :portuguese + | :punjabi + | :quechua | :romanian | :russian + | :samoan + | :"scottish-gaelic" | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala | :slovak | :slovene | :somali | :spanish + | :sundanese | :swahili | :swedish | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana | :turkish + | :turkmen | :ukrainian | :urdu + | :uyghur | :uzbek | :vietnamese | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS: :afrikaans ALBANIAN: :albanian + AMHARIC: :amharic ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian BENGALI: :bengali + BOSNIAN: :bosnian BULGARIAN: :bulgarian + BURMESE: :burmese CANTONESE: :cantonese + CATALAN: :catalan CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican CROATIAN: :croatian CZECH: :czech DANISH: :danish DUTCH: :dutch ENGLISH: :english + ESPERANTO: :esperanto ESTONIAN: :estonian FARSI: :farsi + FIJIAN: :fijian FINNISH: :finnish FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" HAUSA: :hausa HAWAIIAN: :hawaiian + HEBREW: :hebrew HINDI: :hindi + HMONG: :hmong HUNGARIAN: :hungarian ICELANDIC: :icelandic + IGBO: :igbo INDONESIAN: :indonesian + IRISH: :irish ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda KOREAN: :korean + KURDISH: :kurdish KYRGYZ: :kyrgyz + LAO: :lao LATIN: :latin LATVIAN: :latvian + LINGALA: :lingala LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi MONGOLIAN: :mongolian NEPALI: :nepali NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo PASHTO: :pashto PIDGIN: :pidgin POLISH: :polish PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua ROMANIAN: :romanian RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala SLOVAK: :slovak SLOVENE: :slovene SOMALI: :somali SPANISH: :spanish + SUNDANESE: :sundanese SWAHILI: :swahili SWEDISH: :swedish TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana TURKISH: :turkish + TURKMEN: :turkmen UKRAINIAN: :ukrainian URDU: :urdu + UYGHUR: :uyghur UZBEK: :uzbek VIETNAMESE: :vietnamese WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByTickerParams::force_language] end + type max_speed = bool | :true | :false + + module MaxSpeed + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandRetrieveByTickerParams::max_speed] + + TRUE: :true + FALSE: :false + end + type ticker_exchange = :AMEX | :AMS diff --git a/sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs b/sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs index 52b0000e..4b3228e0 100644 --- a/sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs +++ b/sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs @@ -4,6 +4,7 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveByTickerResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata, status: String } @@ -18,6 +19,12 @@ module BrandDev def code=: (Integer) -> Integer + attr_reader key_metadata: BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata + ) -> BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -25,12 +32,14 @@ module BrandDev def initialize: ( ?brand: BrandDev::Models::BrandRetrieveByTickerResponse::Brand, ?code: Integer, + ?key_metadata: BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata, ?status: String ) -> void def to_hash: -> { brand: BrandDev::Models::BrandRetrieveByTickerResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata, status: String } @@ -47,6 +56,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Stock, @@ -110,6 +120,8 @@ module BrandDev def phone=: (String) -> String + attr_accessor primary_language: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::primary_language? + attr_reader slogan: String? def slogan=: (String) -> String @@ -142,6 +154,7 @@ module BrandDev ?links: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Links, ?logos: ::Array[BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Logo], ?phone: String, + ?primary_language: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::primary_language?, ?slogan: String, ?socials: ::Array[BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social], ?stock: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Stock, @@ -160,6 +173,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Stock, @@ -474,7 +488,6 @@ module BrandDev | :"Streaming Platforms (Video, Music, Audio)" | :"Gaming & Interactive Entertainment" | :"Creator Economy & Influencer Platforms" - | :"Advertising, Adtech & Media Buying" | :"Film, TV & Production Studios" | :"Events, Venues & Live Entertainment" | :"Virtual Worlds & Metaverse Experiences" @@ -535,6 +548,7 @@ module BrandDev | :"Streetwear & Emerging Luxury" | :"Couture & Made-to-Measure" | :"News Publishing & Journalism" + | :"Advertising, Adtech & Media Buying" | :"Digital Media & Content Platforms" | :"Broadcasting (TV & Radio)" | :"Podcasting & Audio Media" @@ -698,7 +712,6 @@ module BrandDev STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO: :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT: :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS: :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS: :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT: :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES: :"Virtual Worlds & Metaverse Experiences" @@ -759,6 +772,7 @@ module BrandDev STREETWEAR_EMERGING_LUXURY: :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE: :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM: :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS: :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO: :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA: :"Podcasting & Audio Media" @@ -1039,20 +1053,352 @@ module BrandDev end end - type social = { type: String, url: String } + type primary_language = + :afrikaans + | :albanian + | :amharic + | :arabic + | :armenian + | :assamese + | :aymara + | :azeri + | :basque + | :belarusian + | :bengali + | :bosnian + | :bulgarian + | :burmese + | :cantonese + | :catalan + | :cebuano + | :chinese + | :corsican + | :croatian + | :czech + | :danish + | :dutch + | :english + | :esperanto + | :estonian + | :farsi + | :fijian + | :finnish + | :french + | :galician + | :georgian + | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" + | :hausa + | :hawaiian + | :hebrew + | :hindi + | :hmong + | :hungarian + | :icelandic + | :igbo + | :indonesian + | :irish + | :italian + | :japanese + | :javanese + | :kannada + | :kazakh + | :khmer + | :kinyarwanda + | :korean + | :kurdish + | :kyrgyz + | :lao + | :latin + | :latvian + | :lingala + | :lithuanian + | :luxembourgish + | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi + | :mongolian + | :nepali + | :norwegian + | :odia + | :oromo + | :pashto + | :pidgin + | :polish + | :portuguese + | :punjabi + | :quechua + | :romanian + | :russian + | :samoan + | :"scottish-gaelic" + | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala + | :slovak + | :slovene + | :somali + | :spanish + | :sundanese + | :swahili + | :swedish + | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu + | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana + | :turkish + | :turkmen + | :ukrainian + | :urdu + | :uyghur + | :uzbek + | :vietnamese + | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu + + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS: :afrikaans + ALBANIAN: :albanian + AMHARIC: :amharic + ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara + AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian + BENGALI: :bengali + BOSNIAN: :bosnian + BULGARIAN: :bulgarian + BURMESE: :burmese + CANTONESE: :cantonese + CATALAN: :catalan + CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican + CROATIAN: :croatian + CZECH: :czech + DANISH: :danish + DUTCH: :dutch + ENGLISH: :english + ESPERANTO: :esperanto + ESTONIAN: :estonian + FARSI: :farsi + FIJIAN: :fijian + FINNISH: :finnish + FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian + GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" + HAUSA: :hausa + HAWAIIAN: :hawaiian + HEBREW: :hebrew + HINDI: :hindi + HMONG: :hmong + HUNGARIAN: :hungarian + ICELANDIC: :icelandic + IGBO: :igbo + INDONESIAN: :indonesian + IRISH: :irish + ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada + KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda + KOREAN: :korean + KURDISH: :kurdish + KYRGYZ: :kyrgyz + LAO: :lao + LATIN: :latin + LATVIAN: :latvian + LINGALA: :lingala + LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish + MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi + MONGOLIAN: :mongolian + NEPALI: :nepali + NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo + PASHTO: :pashto + PIDGIN: :pidgin + POLISH: :polish + PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua + ROMANIAN: :romanian + RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" + SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala + SLOVAK: :slovak + SLOVENE: :slovene + SOMALI: :somali + SPANISH: :spanish + SUNDANESE: :sundanese + SWAHILI: :swahili + SWEDISH: :swedish + TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu + THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana + TURKISH: :turkish + TURKMEN: :turkmen + UKRAINIAN: :ukrainian + URDU: :urdu + UYGHUR: :uyghur + UZBEK: :uzbek + VIETNAMESE: :vietnamese + WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByTickerResponse::Brand::primary_language] + end + + type social = + { + type: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::type_, + url: String + } class Social < BrandDev::Internal::Type::BaseModel - attr_reader type: String? + attr_reader type: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::type_? - def type=: (String) -> String + def type=: ( + BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::type_ + ) -> BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::type_ attr_reader url: String? def url=: (String) -> String - def initialize: (?type: String, ?url: String) -> void + def initialize: ( + ?type: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::type_, + ?url: String + ) -> void - def to_hash: -> { type: String, url: String } + def to_hash: -> { + type: BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::type_, + url: String + } + + type type_ = + :x + | :facebook + | :instagram + | :linkedin + | :youtube + | :pinterest + | :tiktok + | :dribbble + | :github + | :behance + | :snapchat + | :whatsapp + | :telegram + | :line + | :discord + | :twitch + | :vimeo + | :imdb + | :tumblr + | :flickr + | :giphy + | :medium + | :spotify + | :soundcloud + | :tripadvisor + | :yelp + | :producthunt + | :reddit + | :crunchbase + | :appstore + | :playstore + + module Type + extend BrandDev::Internal::Type::Enum + + X: :x + FACEBOOK: :facebook + INSTAGRAM: :instagram + LINKEDIN: :linkedin + YOUTUBE: :youtube + PINTEREST: :pinterest + TIKTOK: :tiktok + DRIBBBLE: :dribbble + GITHUB: :github + BEHANCE: :behance + SNAPCHAT: :snapchat + WHATSAPP: :whatsapp + TELEGRAM: :telegram + LINE: :line + DISCORD: :discord + TWITCH: :twitch + VIMEO: :vimeo + IMDB: :imdb + TUMBLR: :tumblr + FLICKR: :flickr + GIPHY: :giphy + MEDIUM: :medium + SPOTIFY: :spotify + SOUNDCLOUD: :soundcloud + TRIPADVISOR: :tripadvisor + YELP: :yelp + PRODUCTHUNT: :producthunt + REDDIT: :reddit + CRUNCHBASE: :crunchbase + APPSTORE: :appstore + PLAYSTORE: :playstore + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Social::type_] + end end type stock = { exchange: String, ticker: String } @@ -1071,6 +1417,25 @@ module BrandDev def to_hash: -> { exchange: String, ticker: String } end end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_naics_params.rbs b/sig/brand_dev/models/brand_retrieve_naics_params.rbs index 0824424c..0e772073 100644 --- a/sig/brand_dev/models/brand_retrieve_naics_params.rbs +++ b/sig/brand_dev/models/brand_retrieve_naics_params.rbs @@ -5,6 +5,7 @@ module BrandDev input: String, max_results: Integer, min_results: Integer, + tags: ::Array[String], timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters @@ -23,6 +24,10 @@ module BrandDev def min_results=: (Integer) -> Integer + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer @@ -31,6 +36,7 @@ module BrandDev input: String, ?max_results: Integer, ?min_results: Integer, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void @@ -39,6 +45,7 @@ module BrandDev input: String, max_results: Integer, min_results: Integer, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } diff --git a/sig/brand_dev/models/brand_retrieve_naics_response.rbs b/sig/brand_dev/models/brand_retrieve_naics_response.rbs index 94a52c6c..faad87da 100644 --- a/sig/brand_dev/models/brand_retrieve_naics_response.rbs +++ b/sig/brand_dev/models/brand_retrieve_naics_response.rbs @@ -4,6 +4,7 @@ module BrandDev { codes: ::Array[BrandDev::Models::BrandRetrieveNaicsResponse::Code], domain: String, + key_metadata: BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata, status: String, type: String } @@ -19,6 +20,12 @@ module BrandDev def domain=: (String) -> String + attr_reader key_metadata: BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata + ) -> BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -30,6 +37,7 @@ module BrandDev def initialize: ( ?codes: ::Array[BrandDev::Models::BrandRetrieveNaicsResponse::Code], ?domain: String, + ?key_metadata: BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata, ?status: String, ?type: String ) -> void @@ -37,6 +45,7 @@ module BrandDev def to_hash: -> { codes: ::Array[BrandDev::Models::BrandRetrieveNaicsResponse::Code], domain: String, + key_metadata: BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata, status: String, type: String } @@ -79,6 +88,25 @@ module BrandDev def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveNaicsResponse::Code::confidence] end end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_params.rbs b/sig/brand_dev/models/brand_retrieve_params.rbs index 337f5497..46fdb138 100644 --- a/sig/brand_dev/models/brand_retrieve_params.rbs +++ b/sig/brand_dev/models/brand_retrieve_params.rbs @@ -3,8 +3,13 @@ module BrandDev type brand_retrieve_params = { domain: String, - force_language: BrandDev::Models::BrandRetrieveParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveParams::max_speed, + name: String, + tags: ::Array[String], + ticker: String, + ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange, timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters @@ -13,156 +18,480 @@ module BrandDev extend BrandDev::Internal::Type::RequestParameters::Converter include BrandDev::Internal::Type::RequestParameters - attr_accessor domain: String + attr_reader domain: String? - attr_reader force_language: BrandDev::Models::BrandRetrieveParams::force_language? + def domain=: (String) -> String - def force_language=: ( - BrandDev::Models::BrandRetrieveParams::force_language - ) -> BrandDev::Models::BrandRetrieveParams::force_language + attr_accessor force_language: BrandDev::Models::BrandRetrieveParams::force_language? - attr_reader max_speed: bool? + attr_accessor max_age_ms: Integer? - def max_speed=: (bool) -> bool + attr_reader max_speed: BrandDev::Models::BrandRetrieveParams::max_speed? + + def max_speed=: ( + BrandDev::Models::BrandRetrieveParams::max_speed + ) -> BrandDev::Models::BrandRetrieveParams::max_speed + + attr_reader name: String? + + def name=: (String) -> String + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + + attr_reader ticker: String? + + def ticker=: (String) -> String + + attr_reader ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange? + + def ticker_exchange=: ( + BrandDev::Models::BrandRetrieveParams::ticker_exchange + ) -> BrandDev::Models::BrandRetrieveParams::ticker_exchange attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( - domain: String, - ?force_language: BrandDev::Models::BrandRetrieveParams::force_language, - ?max_speed: bool, + ?domain: String, + ?force_language: BrandDev::Models::BrandRetrieveParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveParams::max_speed, + ?name: String, + ?tags: ::Array[String], + ?ticker: String, + ?ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { domain: String, - force_language: BrandDev::Models::BrandRetrieveParams::force_language, - max_speed: bool, + force_language: BrandDev::Models::BrandRetrieveParams::force_language?, + max_age_ms: Integer?, + max_speed: BrandDev::Models::BrandRetrieveParams::max_speed, + name: String, + tags: ::Array[String], + ticker: String, + ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange, timeout_ms: Integer, request_options: BrandDev::RequestOptions } type force_language = - :albanian + :afrikaans + | :albanian + | :amharic | :arabic + | :armenian + | :assamese + | :aymara | :azeri + | :basque + | :belarusian | :bengali + | :bosnian | :bulgarian + | :burmese | :cantonese + | :catalan | :cebuano + | :chinese + | :corsican | :croatian | :czech | :danish | :dutch | :english + | :esperanto | :estonian | :farsi + | :fijian | :finnish | :french + | :galician + | :georgian | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" | :hausa | :hawaiian + | :hebrew | :hindi + | :hmong | :hungarian | :icelandic + | :igbo | :indonesian + | :irish | :italian + | :japanese + | :javanese + | :kannada | :kazakh + | :khmer + | :kinyarwanda | :korean + | :kurdish | :kyrgyz + | :lao | :latin | :latvian + | :lingala | :lithuanian + | :luxembourgish | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi | :mongolian | :nepali | :norwegian + | :odia + | :oromo | :pashto | :pidgin | :polish | :portuguese + | :punjabi + | :quechua | :romanian | :russian + | :samoan + | :"scottish-gaelic" | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala | :slovak | :slovene | :somali | :spanish + | :sundanese | :swahili | :swedish | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana | :turkish + | :turkmen | :ukrainian | :urdu + | :uyghur | :uzbek | :vietnamese | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu module ForceLanguage extend BrandDev::Internal::Type::Enum + AFRIKAANS: :afrikaans ALBANIAN: :albanian + AMHARIC: :amharic ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian BENGALI: :bengali + BOSNIAN: :bosnian BULGARIAN: :bulgarian + BURMESE: :burmese CANTONESE: :cantonese + CATALAN: :catalan CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican CROATIAN: :croatian CZECH: :czech DANISH: :danish DUTCH: :dutch ENGLISH: :english + ESPERANTO: :esperanto ESTONIAN: :estonian FARSI: :farsi + FIJIAN: :fijian FINNISH: :finnish FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" HAUSA: :hausa HAWAIIAN: :hawaiian + HEBREW: :hebrew HINDI: :hindi + HMONG: :hmong HUNGARIAN: :hungarian ICELANDIC: :icelandic + IGBO: :igbo INDONESIAN: :indonesian + IRISH: :irish ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda KOREAN: :korean + KURDISH: :kurdish KYRGYZ: :kyrgyz + LAO: :lao LATIN: :latin LATVIAN: :latvian + LINGALA: :lingala LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi MONGOLIAN: :mongolian NEPALI: :nepali NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo PASHTO: :pashto PIDGIN: :pidgin POLISH: :polish PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua ROMANIAN: :romanian RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala SLOVAK: :slovak SLOVENE: :slovene SOMALI: :somali SPANISH: :spanish + SUNDANESE: :sundanese SWAHILI: :swahili SWEDISH: :swedish TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana TURKISH: :turkish + TURKMEN: :turkmen UKRAINIAN: :ukrainian URDU: :urdu + UYGHUR: :uyghur UZBEK: :uzbek VIETNAMESE: :vietnamese WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveParams::force_language] end + + type max_speed = bool | :true | :false + + module MaxSpeed + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandRetrieveParams::max_speed] + + TRUE: :true + FALSE: :false + end + + type ticker_exchange = + :AMEX + | :AMS + | :AQS + | :ASX + | :ATH + | :BER + | :BME + | :BRU + | :BSE + | :BUD + | :BUE + | :BVC + | :CBOE + | :CNQ + | :CPH + | :DFM + | :DOH + | :DUB + | :DUS + | :DXE + | :EGX + | :FSX + | :HAM + | :HEL + | :HKSE + | :HOSE + | :ICE + | :IOB + | :IST + | :JKT + | :JNB + | :JPX + | :KLS + | :KOE + | :KSC + | :KUW + | :LIS + | :LSE + | :MCX + | :MEX + | :MIL + | :MUN + | :NASDAQ + | :NEO + | :NSE + | :NYSE + | :NZE + | :OSL + | :OTC + | :PAR + | :PNK + | :PRA + | :RIS + | :SAO + | :SAU + | :SES + | :SET + | :SGO + | :SHH + | :SHZ + | :SIX + | :STO + | :STU + | :TAI + | :TAL + | :TLV + | :TSX + | :TSXV + | :TWO + | :VIE + | :WSE + | :XETRA + + module TickerExchange + extend BrandDev::Internal::Type::Enum + + AMEX: :AMEX + AMS: :AMS + AQS: :AQS + ASX: :ASX + ATH: :ATH + BER: :BER + BME: :BME + BRU: :BRU + BSE: :BSE + BUD: :BUD + BUE: :BUE + BVC: :BVC + CBOE: :CBOE + CNQ: :CNQ + CPH: :CPH + DFM: :DFM + DOH: :DOH + DUB: :DUB + DUS: :DUS + DXE: :DXE + EGX: :EGX + FSX: :FSX + HAM: :HAM + HEL: :HEL + HKSE: :HKSE + HOSE: :HOSE + ICE: :ICE + IOB: :IOB + IST: :IST + JKT: :JKT + JNB: :JNB + JPX: :JPX + KLS: :KLS + KOE: :KOE + KSC: :KSC + KUW: :KUW + LIS: :LIS + LSE: :LSE + MCX: :MCX + MEX: :MEX + MIL: :MIL + MUN: :MUN + NASDAQ: :NASDAQ + NEO: :NEO + NSE: :NSE + NYSE: :NYSE + NZE: :NZE + OSL: :OSL + OTC: :OTC + PAR: :PAR + PNK: :PNK + PRA: :PRA + RIS: :RIS + SAO: :SAO + SAU: :SAU + SES: :SES + SET: :SET + SGO: :SGO + SHH: :SHH + SHZ: :SHZ + SIX: :SIX + STO: :STO + STU: :STU + TAI: :TAI + TAL: :TAL + TLV: :TLV + TSX: :TSX + TSXV: :TSXV + TWO: :TWO + VIE: :VIE + WSE: :WSE + XETRA: :XETRA + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveParams::ticker_exchange] + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_response.rbs b/sig/brand_dev/models/brand_retrieve_response.rbs index 197f8845..4a197719 100644 --- a/sig/brand_dev/models/brand_retrieve_response.rbs +++ b/sig/brand_dev/models/brand_retrieve_response.rbs @@ -4,6 +4,7 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveResponse::KeyMetadata, status: String } @@ -18,6 +19,12 @@ module BrandDev def code=: (Integer) -> Integer + attr_reader key_metadata: BrandDev::Models::BrandRetrieveResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandRetrieveResponse::KeyMetadata + ) -> BrandDev::Models::BrandRetrieveResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -25,12 +32,14 @@ module BrandDev def initialize: ( ?brand: BrandDev::Models::BrandRetrieveResponse::Brand, ?code: Integer, + ?key_metadata: BrandDev::Models::BrandRetrieveResponse::KeyMetadata, ?status: String ) -> void def to_hash: -> { brand: BrandDev::Models::BrandRetrieveResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveResponse::KeyMetadata, status: String } @@ -47,6 +56,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveResponse::Brand::Stock, @@ -110,6 +120,8 @@ module BrandDev def phone=: (String) -> String + attr_accessor primary_language: BrandDev::Models::BrandRetrieveResponse::Brand::primary_language? + attr_reader slogan: String? def slogan=: (String) -> String @@ -142,6 +154,7 @@ module BrandDev ?links: BrandDev::Models::BrandRetrieveResponse::Brand::Links, ?logos: ::Array[BrandDev::Models::BrandRetrieveResponse::Brand::Logo], ?phone: String, + ?primary_language: BrandDev::Models::BrandRetrieveResponse::Brand::primary_language?, ?slogan: String, ?socials: ::Array[BrandDev::Models::BrandRetrieveResponse::Brand::Social], ?stock: BrandDev::Models::BrandRetrieveResponse::Brand::Stock, @@ -160,6 +173,7 @@ module BrandDev links: BrandDev::Models::BrandRetrieveResponse::Brand::Links, logos: ::Array[BrandDev::Models::BrandRetrieveResponse::Brand::Logo], phone: String, + primary_language: BrandDev::Models::BrandRetrieveResponse::Brand::primary_language?, slogan: String, socials: ::Array[BrandDev::Models::BrandRetrieveResponse::Brand::Social], stock: BrandDev::Models::BrandRetrieveResponse::Brand::Stock, @@ -474,7 +488,6 @@ module BrandDev | :"Streaming Platforms (Video, Music, Audio)" | :"Gaming & Interactive Entertainment" | :"Creator Economy & Influencer Platforms" - | :"Advertising, Adtech & Media Buying" | :"Film, TV & Production Studios" | :"Events, Venues & Live Entertainment" | :"Virtual Worlds & Metaverse Experiences" @@ -535,6 +548,7 @@ module BrandDev | :"Streetwear & Emerging Luxury" | :"Couture & Made-to-Measure" | :"News Publishing & Journalism" + | :"Advertising, Adtech & Media Buying" | :"Digital Media & Content Platforms" | :"Broadcasting (TV & Radio)" | :"Podcasting & Audio Media" @@ -698,7 +712,6 @@ module BrandDev STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO: :"Streaming Platforms (Video, Music, Audio)" GAMING_INTERACTIVE_ENTERTAINMENT: :"Gaming & Interactive Entertainment" CREATOR_ECONOMY_INFLUENCER_PLATFORMS: :"Creator Economy & Influencer Platforms" - ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" FILM_TV_PRODUCTION_STUDIOS: :"Film, TV & Production Studios" EVENTS_VENUES_LIVE_ENTERTAINMENT: :"Events, Venues & Live Entertainment" VIRTUAL_WORLDS_METAVERSE_EXPERIENCES: :"Virtual Worlds & Metaverse Experiences" @@ -759,6 +772,7 @@ module BrandDev STREETWEAR_EMERGING_LUXURY: :"Streetwear & Emerging Luxury" COUTURE_MADE_TO_MEASURE: :"Couture & Made-to-Measure" NEWS_PUBLISHING_JOURNALISM: :"News Publishing & Journalism" + ADVERTISING_ADTECH_MEDIA_BUYING: :"Advertising, Adtech & Media Buying" DIGITAL_MEDIA_CONTENT_PLATFORMS: :"Digital Media & Content Platforms" BROADCASTING_TV_RADIO: :"Broadcasting (TV & Radio)" PODCASTING_AUDIO_MEDIA: :"Podcasting & Audio Media" @@ -1039,20 +1053,352 @@ module BrandDev end end - type social = { type: String, url: String } + type primary_language = + :afrikaans + | :albanian + | :amharic + | :arabic + | :armenian + | :assamese + | :aymara + | :azeri + | :basque + | :belarusian + | :bengali + | :bosnian + | :bulgarian + | :burmese + | :cantonese + | :catalan + | :cebuano + | :chinese + | :corsican + | :croatian + | :czech + | :danish + | :dutch + | :english + | :esperanto + | :estonian + | :farsi + | :fijian + | :finnish + | :french + | :galician + | :georgian + | :german + | :greek + | :guarani + | :gujarati + | :"haitian-creole" + | :hausa + | :hawaiian + | :hebrew + | :hindi + | :hmong + | :hungarian + | :icelandic + | :igbo + | :indonesian + | :irish + | :italian + | :japanese + | :javanese + | :kannada + | :kazakh + | :khmer + | :kinyarwanda + | :korean + | :kurdish + | :kyrgyz + | :lao + | :latin + | :latvian + | :lingala + | :lithuanian + | :luxembourgish + | :macedonian + | :malagasy + | :malay + | :malayalam + | :maltese + | :maori + | :marathi + | :mongolian + | :nepali + | :norwegian + | :odia + | :oromo + | :pashto + | :pidgin + | :polish + | :portuguese + | :punjabi + | :quechua + | :romanian + | :russian + | :samoan + | :"scottish-gaelic" + | :serbian + | :sesotho + | :shona + | :sindhi + | :sinhala + | :slovak + | :slovene + | :somali + | :spanish + | :sundanese + | :swahili + | :swedish + | :tagalog + | :tajik + | :tamil + | :tatar + | :telugu + | :thai + | :tibetan + | :tigrinya + | :tongan + | :tswana + | :turkish + | :turkmen + | :ukrainian + | :urdu + | :uyghur + | :uzbek + | :vietnamese + | :welsh + | :wolof + | :xhosa + | :yiddish + | :yoruba + | :zulu + + module PrimaryLanguage + extend BrandDev::Internal::Type::Enum + + AFRIKAANS: :afrikaans + ALBANIAN: :albanian + AMHARIC: :amharic + ARABIC: :arabic + ARMENIAN: :armenian + ASSAMESE: :assamese + AYMARA: :aymara + AZERI: :azeri + BASQUE: :basque + BELARUSIAN: :belarusian + BENGALI: :bengali + BOSNIAN: :bosnian + BULGARIAN: :bulgarian + BURMESE: :burmese + CANTONESE: :cantonese + CATALAN: :catalan + CEBUANO: :cebuano + CHINESE: :chinese + CORSICAN: :corsican + CROATIAN: :croatian + CZECH: :czech + DANISH: :danish + DUTCH: :dutch + ENGLISH: :english + ESPERANTO: :esperanto + ESTONIAN: :estonian + FARSI: :farsi + FIJIAN: :fijian + FINNISH: :finnish + FRENCH: :french + GALICIAN: :galician + GEORGIAN: :georgian + GERMAN: :german + GREEK: :greek + GUARANI: :guarani + GUJARATI: :gujarati + HAITIAN_CREOLE: :"haitian-creole" + HAUSA: :hausa + HAWAIIAN: :hawaiian + HEBREW: :hebrew + HINDI: :hindi + HMONG: :hmong + HUNGARIAN: :hungarian + ICELANDIC: :icelandic + IGBO: :igbo + INDONESIAN: :indonesian + IRISH: :irish + ITALIAN: :italian + JAPANESE: :japanese + JAVANESE: :javanese + KANNADA: :kannada + KAZAKH: :kazakh + KHMER: :khmer + KINYARWANDA: :kinyarwanda + KOREAN: :korean + KURDISH: :kurdish + KYRGYZ: :kyrgyz + LAO: :lao + LATIN: :latin + LATVIAN: :latvian + LINGALA: :lingala + LITHUANIAN: :lithuanian + LUXEMBOURGISH: :luxembourgish + MACEDONIAN: :macedonian + MALAGASY: :malagasy + MALAY: :malay + MALAYALAM: :malayalam + MALTESE: :maltese + MAORI: :maori + MARATHI: :marathi + MONGOLIAN: :mongolian + NEPALI: :nepali + NORWEGIAN: :norwegian + ODIA: :odia + OROMO: :oromo + PASHTO: :pashto + PIDGIN: :pidgin + POLISH: :polish + PORTUGUESE: :portuguese + PUNJABI: :punjabi + QUECHUA: :quechua + ROMANIAN: :romanian + RUSSIAN: :russian + SAMOAN: :samoan + SCOTTISH_GAELIC: :"scottish-gaelic" + SERBIAN: :serbian + SESOTHO: :sesotho + SHONA: :shona + SINDHI: :sindhi + SINHALA: :sinhala + SLOVAK: :slovak + SLOVENE: :slovene + SOMALI: :somali + SPANISH: :spanish + SUNDANESE: :sundanese + SWAHILI: :swahili + SWEDISH: :swedish + TAGALOG: :tagalog + TAJIK: :tajik + TAMIL: :tamil + TATAR: :tatar + TELUGU: :telugu + THAI: :thai + TIBETAN: :tibetan + TIGRINYA: :tigrinya + TONGAN: :tongan + TSWANA: :tswana + TURKISH: :turkish + TURKMEN: :turkmen + UKRAINIAN: :ukrainian + URDU: :urdu + UYGHUR: :uyghur + UZBEK: :uzbek + VIETNAMESE: :vietnamese + WELSH: :welsh + WOLOF: :wolof + XHOSA: :xhosa + YIDDISH: :yiddish + YORUBA: :yoruba + ZULU: :zulu + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveResponse::Brand::primary_language] + end + + type social = + { + type: BrandDev::Models::BrandRetrieveResponse::Brand::Social::type_, + url: String + } class Social < BrandDev::Internal::Type::BaseModel - attr_reader type: String? + attr_reader type: BrandDev::Models::BrandRetrieveResponse::Brand::Social::type_? - def type=: (String) -> String + def type=: ( + BrandDev::Models::BrandRetrieveResponse::Brand::Social::type_ + ) -> BrandDev::Models::BrandRetrieveResponse::Brand::Social::type_ attr_reader url: String? def url=: (String) -> String - def initialize: (?type: String, ?url: String) -> void + def initialize: ( + ?type: BrandDev::Models::BrandRetrieveResponse::Brand::Social::type_, + ?url: String + ) -> void - def to_hash: -> { type: String, url: String } + def to_hash: -> { + type: BrandDev::Models::BrandRetrieveResponse::Brand::Social::type_, + url: String + } + + type type_ = + :x + | :facebook + | :instagram + | :linkedin + | :youtube + | :pinterest + | :tiktok + | :dribbble + | :github + | :behance + | :snapchat + | :whatsapp + | :telegram + | :line + | :discord + | :twitch + | :vimeo + | :imdb + | :tumblr + | :flickr + | :giphy + | :medium + | :spotify + | :soundcloud + | :tripadvisor + | :yelp + | :producthunt + | :reddit + | :crunchbase + | :appstore + | :playstore + + module Type + extend BrandDev::Internal::Type::Enum + + X: :x + FACEBOOK: :facebook + INSTAGRAM: :instagram + LINKEDIN: :linkedin + YOUTUBE: :youtube + PINTEREST: :pinterest + TIKTOK: :tiktok + DRIBBBLE: :dribbble + GITHUB: :github + BEHANCE: :behance + SNAPCHAT: :snapchat + WHATSAPP: :whatsapp + TELEGRAM: :telegram + LINE: :line + DISCORD: :discord + TWITCH: :twitch + VIMEO: :vimeo + IMDB: :imdb + TUMBLR: :tumblr + FLICKR: :flickr + GIPHY: :giphy + MEDIUM: :medium + SPOTIFY: :spotify + SOUNDCLOUD: :soundcloud + TRIPADVISOR: :tripadvisor + YELP: :yelp + PRODUCTHUNT: :producthunt + REDDIT: :reddit + CRUNCHBASE: :crunchbase + APPSTORE: :appstore + PLAYSTORE: :playstore + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveResponse::Brand::Social::type_] + end end type stock = { exchange: String, ticker: String } @@ -1071,6 +1417,25 @@ module BrandDev def to_hash: -> { exchange: String, ticker: String } end end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_simplified_params.rbs b/sig/brand_dev/models/brand_retrieve_simplified_params.rbs index 113778d2..7ef3722a 100644 --- a/sig/brand_dev/models/brand_retrieve_simplified_params.rbs +++ b/sig/brand_dev/models/brand_retrieve_simplified_params.rbs @@ -1,7 +1,13 @@ module BrandDev module Models type brand_retrieve_simplified_params = - { domain: String, timeout_ms: Integer } + { + domain: String, + max_age_ms: Integer?, + tags: ::Array[String], + theme: BrandDev::Models::BrandRetrieveSimplifiedParams::theme, + timeout_ms: Integer + } & BrandDev::Internal::Type::request_parameters class BrandRetrieveSimplifiedParams < BrandDev::Internal::Type::BaseModel @@ -10,21 +16,50 @@ module BrandDev attr_accessor domain: String + attr_accessor max_age_ms: Integer? + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + + attr_reader theme: BrandDev::Models::BrandRetrieveSimplifiedParams::theme? + + def theme=: ( + BrandDev::Models::BrandRetrieveSimplifiedParams::theme + ) -> BrandDev::Models::BrandRetrieveSimplifiedParams::theme + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( domain: String, + ?max_age_ms: Integer?, + ?tags: ::Array[String], + ?theme: BrandDev::Models::BrandRetrieveSimplifiedParams::theme, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { domain: String, + max_age_ms: Integer?, + tags: ::Array[String], + theme: BrandDev::Models::BrandRetrieveSimplifiedParams::theme, timeout_ms: Integer, request_options: BrandDev::RequestOptions } + + type theme = :light | :dark + + module Theme + extend BrandDev::Internal::Type::Enum + + LIGHT: :light + DARK: :dark + + def self?.values: -> ::Array[BrandDev::Models::BrandRetrieveSimplifiedParams::theme] + end end end end diff --git a/sig/brand_dev/models/brand_retrieve_simplified_response.rbs b/sig/brand_dev/models/brand_retrieve_simplified_response.rbs index d4425243..2795098f 100644 --- a/sig/brand_dev/models/brand_retrieve_simplified_response.rbs +++ b/sig/brand_dev/models/brand_retrieve_simplified_response.rbs @@ -4,6 +4,7 @@ module BrandDev { brand: BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata, status: String } @@ -18,6 +19,12 @@ module BrandDev def code=: (Integer) -> Integer + attr_reader key_metadata: BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata + ) -> BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -25,12 +32,14 @@ module BrandDev def initialize: ( ?brand: BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand, ?code: Integer, + ?key_metadata: BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata, ?status: String ) -> void def to_hash: -> { brand: BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand, code: Integer, + key_metadata: BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata, status: String } @@ -307,6 +316,25 @@ module BrandDev end end end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_screenshot_params.rbs b/sig/brand_dev/models/brand_screenshot_params.rbs index 68737d17..39749390 100644 --- a/sig/brand_dev/models/brand_screenshot_params.rbs +++ b/sig/brand_dev/models/brand_screenshot_params.rbs @@ -2,10 +2,20 @@ module BrandDev module Models type brand_screenshot_params = { + color_scheme: BrandDev::Models::BrandScreenshotParams::color_scheme, + country: BrandDev::Models::BrandScreenshotParams::country, + direct_url: String, domain: String, full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot, + handle_cookie_popup: BrandDev::Models::BrandScreenshotParams::handle_cookie_popup, + max_age_ms: Integer?, page: BrandDev::Models::BrandScreenshotParams::page, - prioritize: BrandDev::Models::BrandScreenshotParams::prioritize + scroll_offset: Integer?, + tags: ::Array[String], + timeout_ms: Integer, + viewport: BrandDev::BrandScreenshotParams::Viewport, + wait_for_ms: Integer?, + zdr: BrandDev::Models::BrandScreenshotParams::zdr } & BrandDev::Internal::Type::request_parameters @@ -13,7 +23,25 @@ module BrandDev extend BrandDev::Internal::Type::RequestParameters::Converter include BrandDev::Internal::Type::RequestParameters - attr_accessor domain: String + attr_reader color_scheme: BrandDev::Models::BrandScreenshotParams::color_scheme? + + def color_scheme=: ( + BrandDev::Models::BrandScreenshotParams::color_scheme + ) -> BrandDev::Models::BrandScreenshotParams::color_scheme + + attr_reader country: BrandDev::Models::BrandScreenshotParams::country? + + def country=: ( + BrandDev::Models::BrandScreenshotParams::country + ) -> BrandDev::Models::BrandScreenshotParams::country + + attr_reader direct_url: String? + + def direct_url=: (String) -> String + + attr_reader domain: String? + + def domain=: (String) -> String attr_reader full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot? @@ -21,34 +49,508 @@ module BrandDev BrandDev::Models::BrandScreenshotParams::full_screenshot ) -> BrandDev::Models::BrandScreenshotParams::full_screenshot + attr_reader handle_cookie_popup: BrandDev::Models::BrandScreenshotParams::handle_cookie_popup? + + def handle_cookie_popup=: ( + BrandDev::Models::BrandScreenshotParams::handle_cookie_popup + ) -> BrandDev::Models::BrandScreenshotParams::handle_cookie_popup + + attr_accessor max_age_ms: Integer? + attr_reader page: BrandDev::Models::BrandScreenshotParams::page? def page=: ( BrandDev::Models::BrandScreenshotParams::page ) -> BrandDev::Models::BrandScreenshotParams::page - attr_reader prioritize: BrandDev::Models::BrandScreenshotParams::prioritize? + attr_accessor scroll_offset: Integer? + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] - def prioritize=: ( - BrandDev::Models::BrandScreenshotParams::prioritize - ) -> BrandDev::Models::BrandScreenshotParams::prioritize + attr_reader timeout_ms: Integer? + + def timeout_ms=: (Integer) -> Integer + + attr_reader viewport: BrandDev::BrandScreenshotParams::Viewport? + + def viewport=: ( + BrandDev::BrandScreenshotParams::Viewport + ) -> BrandDev::BrandScreenshotParams::Viewport + + attr_accessor wait_for_ms: Integer? + + attr_reader zdr: BrandDev::Models::BrandScreenshotParams::zdr? + + def zdr=: ( + BrandDev::Models::BrandScreenshotParams::zdr + ) -> BrandDev::Models::BrandScreenshotParams::zdr def initialize: ( - domain: String, + ?color_scheme: BrandDev::Models::BrandScreenshotParams::color_scheme, + ?country: BrandDev::Models::BrandScreenshotParams::country, + ?direct_url: String, + ?domain: String, ?full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot, + ?handle_cookie_popup: BrandDev::Models::BrandScreenshotParams::handle_cookie_popup, + ?max_age_ms: Integer?, ?page: BrandDev::Models::BrandScreenshotParams::page, - ?prioritize: BrandDev::Models::BrandScreenshotParams::prioritize, + ?scroll_offset: Integer?, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?viewport: BrandDev::BrandScreenshotParams::Viewport, + ?wait_for_ms: Integer?, + ?zdr: BrandDev::Models::BrandScreenshotParams::zdr, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { + color_scheme: BrandDev::Models::BrandScreenshotParams::color_scheme, + country: BrandDev::Models::BrandScreenshotParams::country, + direct_url: String, domain: String, full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot, + handle_cookie_popup: BrandDev::Models::BrandScreenshotParams::handle_cookie_popup, + max_age_ms: Integer?, page: BrandDev::Models::BrandScreenshotParams::page, - prioritize: BrandDev::Models::BrandScreenshotParams::prioritize, + scroll_offset: Integer?, + tags: ::Array[String], + timeout_ms: Integer, + viewport: BrandDev::BrandScreenshotParams::Viewport, + wait_for_ms: Integer?, + zdr: BrandDev::Models::BrandScreenshotParams::zdr, request_options: BrandDev::RequestOptions } + type color_scheme = :light | :dark + + module ColorScheme + extend BrandDev::Internal::Type::Enum + + LIGHT: :light + DARK: :dark + + def self?.values: -> ::Array[BrandDev::Models::BrandScreenshotParams::color_scheme] + end + + type country = + :ad + | :ae + | :af + | :ag + | :ai + | :al + | :am + | :ao + | :ar + | :at + | :au + | :aw + | :az + | :ba + | :bb + | :bd + | :be + | :bf + | :bg + | :bh + | :bi + | :bj + | :bm + | :bn + | :bo + | :bq + | :br + | :bs + | :bw + | :by + | :bz + | :ca + | :cd + | :cf + | :cg + | :ch + | :ci + | :cl + | :cm + | :cn + | :co + | :cr + | :cv + | :cw + | :cy + | :cz + | :de + | :dj + | :dk + | :dm + | :do + | :dz + | :ec + | :ee + | :eg + | :es + | :et + | :fi + | :fj + | :fr + | :ga + | :gb + | :gd + | :ge + | :gf + | :gg + | :gh + | :gm + | :gn + | :gp + | :gq + | :gr + | :gt + | :gu + | :gw + | :gy + | :hk + | :hn + | :hr + | :ht + | :hu + | :id + | :ie + | :il + | :im + | :in + | :iq + | :ir + | :is + | :it + | :je + | :jm + | :jo + | :jp + | :ke + | :kg + | :kh + | :kn + | :kr + | :kw + | :ky + | :kz + | :la + | :lb + | :lc + | :lk + | :lr + | :ls + | :lt + | :lu + | :lv + | :ly + | :ma + | :mc + | :md + | :me + | :mf + | :mg + | :mk + | :ml + | :mm + | :mn + | :mo + | :mq + | :mr + | :mt + | :mu + | :mv + | :mw + | :mx + | :my + | :mz + | :na + | :nc + | :ne + | :ng + | :ni + | :nl + | :no + | :np + | :nz + | :om + | :pa + | :pe + | :pf + | :pg + | :ph + | :pk + | :pl + | :pr + | :ps + | :pt + | :py + | :qa + | :re + | :ro + | :rs + | :ru + | :rw + | :sa + | :sc + | :sd + | :se + | :sg + | :si + | :sk + | :sl + | :sm + | :sn + | :so + | :sr + | :ss + | :st + | :sv + | :sx + | :sy + | :sz + | :tc + | :td + | :tg + | :th + | :tj + | :tl + | :tm + | :tn + | :tr + | :tt + | :tw + | :tz + | :ua + | :ug + | :us + | :uy + | :uz + | :vc + | :ve + | :vg + | :vi + | :vn + | :ye + | :yt + | :za + | :zm + | :zw + + module Country + extend BrandDev::Internal::Type::Enum + + AD: :ad + AE: :ae + AF: :af + AG: :ag + AI: :ai + AL: :al + AM: :am + AO: :ao + AR: :ar + AT: :at + AU: :au + AW: :aw + AZ: :az + BA: :ba + BB: :bb + BD: :bd + BE: :be + BF: :bf + BG: :bg + BH: :bh + BI: :bi + BJ: :bj + BM: :bm + BN: :bn + BO: :bo + BQ: :bq + BR: :br + BS: :bs + BW: :bw + BY: :by + BZ: :bz + CA: :ca + CD: :cd + CF: :cf + CG: :cg + CH: :ch + CI: :ci + CL: :cl + CM: :cm + CN: :cn + CO: :co + CR: :cr + CV: :cv + CW: :cw + CY: :cy + CZ: :cz + DE: :de + DJ: :dj + DK: :dk + DM: :dm + DO: :do + DZ: :dz + EC: :ec + EE: :ee + EG: :eg + ES: :es + ET: :et + FI: :fi + FJ: :fj + FR: :fr + GA: :ga + GB: :gb + GD: :gd + GE: :ge + GF: :gf + GG: :gg + GH: :gh + GM: :gm + GN: :gn + GP: :gp + GQ: :gq + GR: :gr + GT: :gt + GU: :gu + GW: :gw + GY: :gy + HK: :hk + HN: :hn + HR: :hr + HT: :ht + HU: :hu + ID: :id + IE: :ie + IL: :il + IM: :im + IN: :in + IQ: :iq + IR: :ir + IS: :is + IT: :it + JE: :je + JM: :jm + JO: :jo + JP: :jp + KE: :ke + KG: :kg + KH: :kh + KN: :kn + KR: :kr + KW: :kw + KY: :ky + KZ: :kz + LA: :la + LB: :lb + LC: :lc + LK: :lk + LR: :lr + LS: :ls + LT: :lt + LU: :lu + LV: :lv + LY: :ly + MA: :ma + MC: :mc + MD: :md + ME: :me + MF: :mf + MG: :mg + MK: :mk + ML: :ml + MM: :mm + MN: :mn + MO: :mo + MQ: :mq + MR: :mr + MT: :mt + MU: :mu + MV: :mv + MW: :mw + MX: :mx + MY: :my + MZ: :mz + NA: :na + NC: :nc + NE: :ne + NG: :ng + NI: :ni + NL: :nl + NO: :no + NP: :np + NZ: :nz + OM: :om + PA: :pa + PE: :pe + PF: :pf + PG: :pg + PH: :ph + PK: :pk + PL: :pl + PR: :pr + PS: :ps + PT: :pt + PY: :py + QA: :qa + RE: :re + RO: :ro + RS: :rs + RU: :ru + RW: :rw + SA: :sa + SC: :sc + SD: :sd + SE: :se + SG: :sg + SI: :si + SK: :sk + SL: :sl + SM: :sm + SN: :sn + SO: :so + SR: :sr + SS: :ss + ST: :st + SV: :sv + SX: :sx + SY: :sy + SZ: :sz + TC: :tc + TD: :td + TG: :tg + TH: :th + TJ: :tj + TL: :tl + TM: :tm + TN: :tn + TR: :tr + TT: :tt + TW: :tw + TZ: :tz + UA: :ua + UG: :ug + US: :us + UY: :uy + UZ: :uz + VC: :vc + VE: :ve + VG: :vg + VI: :vi + VN: :vn + YE: :ye + YT: :yt + ZA: :za + ZM: :zm + ZW: :zw + + def self?.values: -> ::Array[BrandDev::Models::BrandScreenshotParams::country] + end + type full_screenshot = :true | :false module FullScreenshot @@ -60,6 +562,17 @@ module BrandDev def self?.values: -> ::Array[BrandDev::Models::BrandScreenshotParams::full_screenshot] end + type handle_cookie_popup = bool | :true | :false + + module HandleCookiePopup + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandScreenshotParams::handle_cookie_popup] + + TRUE: :true + FALSE: :false + end + type page = :login | :signup @@ -85,15 +598,31 @@ module BrandDev def self?.values: -> ::Array[BrandDev::Models::BrandScreenshotParams::page] end - type prioritize = :speed | :quality + type viewport = { height: Integer, width: Integer } + + class Viewport < BrandDev::Internal::Type::BaseModel + attr_reader height: Integer? + + def height=: (Integer) -> Integer + + attr_reader width: Integer? + + def width=: (Integer) -> Integer + + def initialize: (?height: Integer, ?width: Integer) -> void + + def to_hash: -> { height: Integer, width: Integer } + end + + type zdr = :enabled | :disabled - module Prioritize + module Zdr extend BrandDev::Internal::Type::Enum - SPEED: :speed - QUALITY: :quality + ENABLED: :enabled + DISABLED: :disabled - def self?.values: -> ::Array[BrandDev::Models::BrandScreenshotParams::prioritize] + def self?.values: -> ::Array[BrandDev::Models::BrandScreenshotParams::zdr] end end end diff --git a/sig/brand_dev/models/brand_screenshot_response.rbs b/sig/brand_dev/models/brand_screenshot_response.rbs index a0c17b9f..04d9d03c 100644 --- a/sig/brand_dev/models/brand_screenshot_response.rbs +++ b/sig/brand_dev/models/brand_screenshot_response.rbs @@ -4,9 +4,12 @@ module BrandDev { code: Integer, domain: String, + height: Integer, + key_metadata: BrandDev::Models::BrandScreenshotResponse::KeyMetadata, screenshot: String, screenshot_type: BrandDev::Models::BrandScreenshotResponse::screenshot_type, - status: String + status: String, + width: Integer } class BrandScreenshotResponse < BrandDev::Internal::Type::BaseModel @@ -18,6 +21,16 @@ module BrandDev def domain=: (String) -> String + attr_reader height: Integer? + + def height=: (Integer) -> Integer + + attr_reader key_metadata: BrandDev::Models::BrandScreenshotResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandScreenshotResponse::KeyMetadata + ) -> BrandDev::Models::BrandScreenshotResponse::KeyMetadata + attr_reader screenshot: String? def screenshot=: (String) -> String @@ -32,22 +45,51 @@ module BrandDev def status=: (String) -> String + attr_reader width: Integer? + + def width=: (Integer) -> Integer + def initialize: ( ?code: Integer, ?domain: String, + ?height: Integer, + ?key_metadata: BrandDev::Models::BrandScreenshotResponse::KeyMetadata, ?screenshot: String, ?screenshot_type: BrandDev::Models::BrandScreenshotResponse::screenshot_type, - ?status: String + ?status: String, + ?width: Integer ) -> void def to_hash: -> { code: Integer, domain: String, + height: Integer, + key_metadata: BrandDev::Models::BrandScreenshotResponse::KeyMetadata, screenshot: String, screenshot_type: BrandDev::Models::BrandScreenshotResponse::screenshot_type, - status: String + status: String, + width: Integer } + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end + type screenshot_type = :viewport | :fullPage module ScreenshotType diff --git a/sig/brand_dev/models/brand_styleguide_params.rbs b/sig/brand_dev/models/brand_styleguide_params.rbs index 0d98debe..b9530011 100644 --- a/sig/brand_dev/models/brand_styleguide_params.rbs +++ b/sig/brand_dev/models/brand_styleguide_params.rbs @@ -1,13 +1,26 @@ module BrandDev module Models type brand_styleguide_params = - { direct_url: String, domain: String, timeout_ms: Integer } + { + color_scheme: BrandDev::Models::BrandStyleguideParams::color_scheme, + direct_url: String, + domain: String, + max_age_ms: Integer?, + tags: ::Array[String], + timeout_ms: Integer + } & BrandDev::Internal::Type::request_parameters class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel extend BrandDev::Internal::Type::RequestParameters::Converter include BrandDev::Internal::Type::RequestParameters + attr_reader color_scheme: BrandDev::Models::BrandStyleguideParams::color_scheme? + + def color_scheme=: ( + BrandDev::Models::BrandStyleguideParams::color_scheme + ) -> BrandDev::Models::BrandStyleguideParams::color_scheme + attr_reader direct_url: String? def direct_url=: (String) -> String @@ -16,23 +29,46 @@ module BrandDev def domain=: (String) -> String + attr_accessor max_age_ms: Integer? + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( + ?color_scheme: BrandDev::Models::BrandStyleguideParams::color_scheme, ?direct_url: String, ?domain: String, + ?max_age_ms: Integer?, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { + color_scheme: BrandDev::Models::BrandStyleguideParams::color_scheme, direct_url: String, domain: String, + max_age_ms: Integer?, + tags: ::Array[String], timeout_ms: Integer, request_options: BrandDev::RequestOptions } + + type color_scheme = :light | :dark + + module ColorScheme + extend BrandDev::Internal::Type::Enum + + LIGHT: :light + DARK: :dark + + def self?.values: -> ::Array[BrandDev::Models::BrandStyleguideParams::color_scheme] + end end end end diff --git a/sig/brand_dev/models/brand_styleguide_response.rbs b/sig/brand_dev/models/brand_styleguide_response.rbs index 185b941e..2e0aab33 100644 --- a/sig/brand_dev/models/brand_styleguide_response.rbs +++ b/sig/brand_dev/models/brand_styleguide_response.rbs @@ -4,6 +4,7 @@ module BrandDev { code: Integer, domain: String, + key_metadata: BrandDev::Models::BrandStyleguideResponse::KeyMetadata, status: String, styleguide: BrandDev::Models::BrandStyleguideResponse::Styleguide } @@ -17,6 +18,12 @@ module BrandDev def domain=: (String) -> String + attr_reader key_metadata: BrandDev::Models::BrandStyleguideResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandStyleguideResponse::KeyMetadata + ) -> BrandDev::Models::BrandStyleguideResponse::KeyMetadata + attr_reader status: String? def status=: (String) -> String @@ -30,6 +37,7 @@ module BrandDev def initialize: ( ?code: Integer, ?domain: String, + ?key_metadata: BrandDev::Models::BrandStyleguideResponse::KeyMetadata, ?status: String, ?styleguide: BrandDev::Models::BrandStyleguideResponse::Styleguide ) -> void @@ -37,15 +45,36 @@ module BrandDev def to_hash: -> { code: Integer, domain: String, + key_metadata: BrandDev::Models::BrandStyleguideResponse::KeyMetadata, status: String, styleguide: BrandDev::Models::BrandStyleguideResponse::Styleguide } + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end + type styleguide = { colors: BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors, components: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components, element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing, + font_links: ::Hash[Symbol, BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink], mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::mode, shadows: BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows, typography: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography @@ -58,6 +87,8 @@ module BrandDev attr_accessor element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing + attr_accessor font_links: ::Hash[Symbol, BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink] + attr_accessor mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::mode attr_accessor shadows: BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows @@ -68,6 +99,7 @@ module BrandDev colors: BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors, components: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components, element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing, + font_links: ::Hash[Symbol, BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink], mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::mode, shadows: BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows, typography: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography @@ -77,6 +109,7 @@ module BrandDev colors: BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors, components: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components, element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing, + font_links: ::Hash[Symbol, BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink], mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::mode, shadows: BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows, typography: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography @@ -562,6 +595,53 @@ module BrandDev } end + type font_link = + { + files: ::Hash[Symbol, String], + type: BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::type_, + category: String, + display_name: String + } + + class FontLink < BrandDev::Internal::Type::BaseModel + attr_accessor files: ::Hash[Symbol, String] + + attr_accessor type: BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::type_ + + attr_reader category: String? + + def category=: (String) -> String + + attr_reader display_name: String? + + def display_name=: (String) -> String + + def initialize: ( + files: ::Hash[Symbol, String], + type: BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::type_, + ?category: String, + ?display_name: String + ) -> void + + def to_hash: -> { + files: ::Hash[Symbol, String], + type: BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::type_, + category: String, + display_name: String + } + + type type_ = :google | :custom + + module Type + extend BrandDev::Internal::Type::Enum + + GOOGLE: :google + CUSTOM: :custom + + def self?.values: -> ::Array[BrandDev::Models::BrandStyleguideResponse::Styleguide::FontLink::type_] + end + end + type mode = :light | :dark module Mode diff --git a/sig/brand_dev/models/brand_web_scrape_html_params.rbs b/sig/brand_dev/models/brand_web_scrape_html_params.rbs index 08c18fb0..98df97e8 100644 --- a/sig/brand_dev/models/brand_web_scrape_html_params.rbs +++ b/sig/brand_dev/models/brand_web_scrape_html_params.rbs @@ -1,7 +1,24 @@ module BrandDev module Models type brand_web_scrape_html_params = - { url: String } & BrandDev::Internal::Type::request_parameters + { + url: String, + actions: ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::action]?, + country: BrandDev::Models::BrandWebScrapeHTMLParams::country, + exclude_selectors: ::Array[String]?, + headers: ::Hash[Symbol, String], + include_frames: BrandDev::Models::BrandWebScrapeHTMLParams::include_frames, + include_selectors: ::Array[String]?, + max_age_ms: Integer?, + pdf: BrandDev::BrandWebScrapeHTMLParams::Pdf, + settle_animations: BrandDev::Models::BrandWebScrapeHTMLParams::settle_animations, + tags: ::Array[String], + timeout_ms: Integer, + use_main_content_only: BrandDev::Models::BrandWebScrapeHTMLParams::use_main_content_only, + wait_for_ms: Integer?, + zdr: BrandDev::Models::BrandWebScrapeHTMLParams::zdr + } + & BrandDev::Internal::Type::request_parameters class BrandWebScrapeHTMLParams < BrandDev::Internal::Type::BaseModel extend BrandDev::Internal::Type::RequestParameters::Converter @@ -9,12 +26,662 @@ module BrandDev attr_accessor url: String + attr_accessor actions: ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::action]? + + attr_reader country: BrandDev::Models::BrandWebScrapeHTMLParams::country? + + def country=: ( + BrandDev::Models::BrandWebScrapeHTMLParams::country + ) -> BrandDev::Models::BrandWebScrapeHTMLParams::country + + attr_accessor exclude_selectors: ::Array[String]? + + attr_reader headers: ::Hash[Symbol, String]? + + def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String] + + attr_reader include_frames: BrandDev::Models::BrandWebScrapeHTMLParams::include_frames? + + def include_frames=: ( + BrandDev::Models::BrandWebScrapeHTMLParams::include_frames + ) -> BrandDev::Models::BrandWebScrapeHTMLParams::include_frames + + attr_accessor include_selectors: ::Array[String]? + + attr_accessor max_age_ms: Integer? + + attr_reader pdf: BrandDev::BrandWebScrapeHTMLParams::Pdf? + + def pdf=: ( + BrandDev::BrandWebScrapeHTMLParams::Pdf + ) -> BrandDev::BrandWebScrapeHTMLParams::Pdf + + attr_reader settle_animations: BrandDev::Models::BrandWebScrapeHTMLParams::settle_animations? + + def settle_animations=: ( + BrandDev::Models::BrandWebScrapeHTMLParams::settle_animations + ) -> BrandDev::Models::BrandWebScrapeHTMLParams::settle_animations + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + + attr_reader timeout_ms: Integer? + + def timeout_ms=: (Integer) -> Integer + + attr_reader use_main_content_only: BrandDev::Models::BrandWebScrapeHTMLParams::use_main_content_only? + + def use_main_content_only=: ( + BrandDev::Models::BrandWebScrapeHTMLParams::use_main_content_only + ) -> BrandDev::Models::BrandWebScrapeHTMLParams::use_main_content_only + + attr_accessor wait_for_ms: Integer? + + attr_reader zdr: BrandDev::Models::BrandWebScrapeHTMLParams::zdr? + + def zdr=: ( + BrandDev::Models::BrandWebScrapeHTMLParams::zdr + ) -> BrandDev::Models::BrandWebScrapeHTMLParams::zdr + def initialize: ( url: String, + ?actions: ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::action]?, + ?country: BrandDev::Models::BrandWebScrapeHTMLParams::country, + ?exclude_selectors: ::Array[String]?, + ?headers: ::Hash[Symbol, String], + ?include_frames: BrandDev::Models::BrandWebScrapeHTMLParams::include_frames, + ?include_selectors: ::Array[String]?, + ?max_age_ms: Integer?, + ?pdf: BrandDev::BrandWebScrapeHTMLParams::Pdf, + ?settle_animations: BrandDev::Models::BrandWebScrapeHTMLParams::settle_animations, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?use_main_content_only: BrandDev::Models::BrandWebScrapeHTMLParams::use_main_content_only, + ?wait_for_ms: Integer?, + ?zdr: BrandDev::Models::BrandWebScrapeHTMLParams::zdr, ?request_options: BrandDev::request_opts ) -> void - def to_hash: -> { url: String, request_options: BrandDev::RequestOptions } + def to_hash: -> { + url: String, + actions: ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::action]?, + country: BrandDev::Models::BrandWebScrapeHTMLParams::country, + exclude_selectors: ::Array[String]?, + headers: ::Hash[Symbol, String], + include_frames: BrandDev::Models::BrandWebScrapeHTMLParams::include_frames, + include_selectors: ::Array[String]?, + max_age_ms: Integer?, + pdf: BrandDev::BrandWebScrapeHTMLParams::Pdf, + settle_animations: BrandDev::Models::BrandWebScrapeHTMLParams::settle_animations, + tags: ::Array[String], + timeout_ms: Integer, + use_main_content_only: BrandDev::Models::BrandWebScrapeHTMLParams::use_main_content_only, + wait_for_ms: Integer?, + zdr: BrandDev::Models::BrandWebScrapeHTMLParams::zdr, + request_options: BrandDev::RequestOptions + } + + type action = + BrandDev::BrandWebScrapeHTMLParams::Action::Wait + | BrandDev::BrandWebScrapeHTMLParams::Action::Perform + + module Action + extend BrandDev::Internal::Type::Union + + type wait = { do_: :wait, time_ms: Integer } + + class Wait < BrandDev::Internal::Type::BaseModel + attr_accessor do_: :wait + + attr_accessor time_ms: Integer + + def initialize: (time_ms: Integer, ?do_: :wait) -> void + + def to_hash: -> { do_: :wait, time_ms: Integer } + end + + type perform = { action: String, do_: :perform } + + class Perform < BrandDev::Internal::Type::BaseModel + attr_accessor action: String + + attr_accessor do_: :perform + + def initialize: (action: String, ?do_: :perform) -> void + + def to_hash: -> { action: String, do_: :perform } + end + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::action] + end + + type country = + :ad + | :ae + | :af + | :ag + | :ai + | :al + | :am + | :ao + | :ar + | :at + | :au + | :aw + | :az + | :ba + | :bb + | :bd + | :be + | :bf + | :bg + | :bh + | :bi + | :bj + | :bm + | :bn + | :bo + | :bq + | :br + | :bs + | :bw + | :by + | :bz + | :ca + | :cd + | :cf + | :cg + | :ch + | :ci + | :cl + | :cm + | :cn + | :co + | :cr + | :cv + | :cw + | :cy + | :cz + | :de + | :dj + | :dk + | :dm + | :do + | :dz + | :ec + | :ee + | :eg + | :es + | :et + | :fi + | :fj + | :fr + | :ga + | :gb + | :gd + | :ge + | :gf + | :gg + | :gh + | :gm + | :gn + | :gp + | :gq + | :gr + | :gt + | :gu + | :gw + | :gy + | :hk + | :hn + | :hr + | :ht + | :hu + | :id + | :ie + | :il + | :im + | :in + | :iq + | :ir + | :is + | :it + | :je + | :jm + | :jo + | :jp + | :ke + | :kg + | :kh + | :kn + | :kr + | :kw + | :ky + | :kz + | :la + | :lb + | :lc + | :lk + | :lr + | :ls + | :lt + | :lu + | :lv + | :ly + | :ma + | :mc + | :md + | :me + | :mf + | :mg + | :mk + | :ml + | :mm + | :mn + | :mo + | :mq + | :mr + | :mt + | :mu + | :mv + | :mw + | :mx + | :my + | :mz + | :na + | :nc + | :ne + | :ng + | :ni + | :nl + | :no + | :np + | :nz + | :om + | :pa + | :pe + | :pf + | :pg + | :ph + | :pk + | :pl + | :pr + | :ps + | :pt + | :py + | :qa + | :re + | :ro + | :rs + | :ru + | :rw + | :sa + | :sc + | :sd + | :se + | :sg + | :si + | :sk + | :sl + | :sm + | :sn + | :so + | :sr + | :ss + | :st + | :sv + | :sx + | :sy + | :sz + | :tc + | :td + | :tg + | :th + | :tj + | :tl + | :tm + | :tn + | :tr + | :tt + | :tw + | :tz + | :ua + | :ug + | :us + | :uy + | :uz + | :vc + | :ve + | :vg + | :vi + | :vn + | :ye + | :yt + | :za + | :zm + | :zw + + module Country + extend BrandDev::Internal::Type::Enum + + AD: :ad + AE: :ae + AF: :af + AG: :ag + AI: :ai + AL: :al + AM: :am + AO: :ao + AR: :ar + AT: :at + AU: :au + AW: :aw + AZ: :az + BA: :ba + BB: :bb + BD: :bd + BE: :be + BF: :bf + BG: :bg + BH: :bh + BI: :bi + BJ: :bj + BM: :bm + BN: :bn + BO: :bo + BQ: :bq + BR: :br + BS: :bs + BW: :bw + BY: :by + BZ: :bz + CA: :ca + CD: :cd + CF: :cf + CG: :cg + CH: :ch + CI: :ci + CL: :cl + CM: :cm + CN: :cn + CO: :co + CR: :cr + CV: :cv + CW: :cw + CY: :cy + CZ: :cz + DE: :de + DJ: :dj + DK: :dk + DM: :dm + DO: :do + DZ: :dz + EC: :ec + EE: :ee + EG: :eg + ES: :es + ET: :et + FI: :fi + FJ: :fj + FR: :fr + GA: :ga + GB: :gb + GD: :gd + GE: :ge + GF: :gf + GG: :gg + GH: :gh + GM: :gm + GN: :gn + GP: :gp + GQ: :gq + GR: :gr + GT: :gt + GU: :gu + GW: :gw + GY: :gy + HK: :hk + HN: :hn + HR: :hr + HT: :ht + HU: :hu + ID: :id + IE: :ie + IL: :il + IM: :im + IN: :in + IQ: :iq + IR: :ir + IS: :is + IT: :it + JE: :je + JM: :jm + JO: :jo + JP: :jp + KE: :ke + KG: :kg + KH: :kh + KN: :kn + KR: :kr + KW: :kw + KY: :ky + KZ: :kz + LA: :la + LB: :lb + LC: :lc + LK: :lk + LR: :lr + LS: :ls + LT: :lt + LU: :lu + LV: :lv + LY: :ly + MA: :ma + MC: :mc + MD: :md + ME: :me + MF: :mf + MG: :mg + MK: :mk + ML: :ml + MM: :mm + MN: :mn + MO: :mo + MQ: :mq + MR: :mr + MT: :mt + MU: :mu + MV: :mv + MW: :mw + MX: :mx + MY: :my + MZ: :mz + NA: :na + NC: :nc + NE: :ne + NG: :ng + NI: :ni + NL: :nl + NO: :no + NP: :np + NZ: :nz + OM: :om + PA: :pa + PE: :pe + PF: :pf + PG: :pg + PH: :ph + PK: :pk + PL: :pl + PR: :pr + PS: :ps + PT: :pt + PY: :py + QA: :qa + RE: :re + RO: :ro + RS: :rs + RU: :ru + RW: :rw + SA: :sa + SC: :sc + SD: :sd + SE: :se + SG: :sg + SI: :si + SK: :sk + SL: :sl + SM: :sm + SN: :sn + SO: :so + SR: :sr + SS: :ss + ST: :st + SV: :sv + SX: :sx + SY: :sy + SZ: :sz + TC: :tc + TD: :td + TG: :tg + TH: :th + TJ: :tj + TL: :tl + TM: :tm + TN: :tn + TR: :tr + TT: :tt + TW: :tw + TZ: :tz + UA: :ua + UG: :ug + US: :us + UY: :uy + UZ: :uz + VC: :vc + VE: :ve + VG: :vg + VI: :vi + VN: :vn + YE: :ye + YT: :yt + ZA: :za + ZM: :zm + ZW: :zw + + def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::country] + end + + type include_frames = bool | :true | :false + + module IncludeFrames + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::include_frames] + + TRUE: :true + FALSE: :false + end + + type pdf = + { + end_: Integer, + ocr: BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ocr, + should_parse: BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::should_parse, + start: Integer + } + + class Pdf < BrandDev::Internal::Type::BaseModel + attr_reader end_: Integer? + + def end_=: (Integer) -> Integer + + attr_reader ocr: BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ocr? + + def ocr=: ( + BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ocr + ) -> BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ocr + + attr_reader should_parse: BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::should_parse? + + def should_parse=: ( + BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::should_parse + ) -> BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::should_parse + + attr_reader start: Integer? + + def start=: (Integer) -> Integer + + def initialize: ( + ?end_: Integer, + ?ocr: BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ocr, + ?should_parse: BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::should_parse, + ?start: Integer + ) -> void + + def to_hash: -> { + end_: Integer, + ocr: BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ocr, + should_parse: BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::should_parse, + start: Integer + } + + type ocr = bool | :true | :false + + module Ocr + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::ocr] + + TRUE: :true + FALSE: :false + end + + type should_parse = bool | :true | :false + + module ShouldParse + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::Pdf::should_parse] + + TRUE: :true + FALSE: :false + end + end + + type settle_animations = bool | :true | :false + + module SettleAnimations + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::settle_animations] + + TRUE: :true + FALSE: :false + end + + type use_main_content_only = bool | :true | :false + + module UseMainContentOnly + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::use_main_content_only] + + TRUE: :true + FALSE: :false + end + + type zdr = :enabled | :disabled + + module Zdr + extend BrandDev::Internal::Type::Enum + + ENABLED: :enabled + DISABLED: :disabled + + def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::zdr] + end end end end diff --git a/sig/brand_dev/models/brand_web_scrape_html_response.rbs b/sig/brand_dev/models/brand_web_scrape_html_response.rbs index c33095e1..b50a00b9 100644 --- a/sig/brand_dev/models/brand_web_scrape_html_response.rbs +++ b/sig/brand_dev/models/brand_web_scrape_html_response.rbs @@ -3,29 +3,278 @@ module BrandDev type brand_web_scrape_html_response = { html: String, + metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata, success: BrandDev::Models::BrandWebScrapeHTMLResponse::success, - url: String + type: BrandDev::Models::BrandWebScrapeHTMLResponse::type_, + url: String, + actions_applied: ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied], + actions_html_stale: bool, + key_metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata } class BrandWebScrapeHTMLResponse < BrandDev::Internal::Type::BaseModel attr_accessor html: String + attr_accessor metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata + attr_accessor success: BrandDev::Models::BrandWebScrapeHTMLResponse::success + attr_accessor type: BrandDev::Models::BrandWebScrapeHTMLResponse::type_ + attr_accessor url: String + attr_reader actions_applied: ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied]? + + def actions_applied=: ( + ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied] + ) -> ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied] + + attr_reader actions_html_stale: bool? + + def actions_html_stale=: (bool) -> bool + + attr_reader key_metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata + ) -> BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata + def initialize: ( html: String, + metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata, success: BrandDev::Models::BrandWebScrapeHTMLResponse::success, - url: String + type: BrandDev::Models::BrandWebScrapeHTMLResponse::type_, + url: String, + ?actions_applied: ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied], + ?actions_html_stale: bool, + ?key_metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata ) -> void def to_hash: -> { html: String, + metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata, success: BrandDev::Models::BrandWebScrapeHTMLResponse::success, - url: String + type: BrandDev::Models::BrandWebScrapeHTMLResponse::type_, + url: String, + actions_applied: ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied], + actions_html_stale: bool, + key_metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata } + type metadata = + { + final_url: String, + source_url: String, + additional_meta: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::additional_meta], + alternates: ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate], + author: String, + canonical_url: String, + description: String, + favicon: String, + image: String, + json_ld: ::Array[::Hash[Symbol, top]], + keywords: ::Array[String], + language: String, + modified_time: String, + open_graph: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::open_graph], + published_time: String, + robots: String, + site_name: String, + title: String, + twitter: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::twitter] + } + + class Metadata < BrandDev::Internal::Type::BaseModel + attr_accessor final_url: String + + attr_accessor source_url: String + + attr_reader additional_meta: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::additional_meta]? + + def additional_meta=: ( + ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::additional_meta] + ) -> ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::additional_meta] + + attr_reader alternates: ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate]? + + def alternates=: ( + ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate] + ) -> ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate] + + attr_reader author: String? + + def author=: (String) -> String + + attr_reader canonical_url: String? + + def canonical_url=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader favicon: String? + + def favicon=: (String) -> String + + attr_reader image: String? + + def image=: (String) -> String + + attr_reader json_ld: ::Array[::Hash[Symbol, top]]? + + def json_ld=: ( + ::Array[::Hash[Symbol, top]] + ) -> ::Array[::Hash[Symbol, top]] + + attr_reader keywords: ::Array[String]? + + def keywords=: (::Array[String]) -> ::Array[String] + + attr_reader language: String? + + def language=: (String) -> String + + attr_reader modified_time: String? + + def modified_time=: (String) -> String + + attr_reader open_graph: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::open_graph]? + + def open_graph=: ( + ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::open_graph] + ) -> ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::open_graph] + + attr_reader published_time: String? + + def published_time=: (String) -> String + + attr_reader robots: String? + + def robots=: (String) -> String + + attr_reader site_name: String? + + def site_name=: (String) -> String + + attr_reader title: String? + + def title=: (String) -> String + + attr_reader twitter: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::twitter]? + + def twitter=: ( + ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::twitter] + ) -> ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::twitter] + + def initialize: ( + final_url: String, + source_url: String, + ?additional_meta: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::additional_meta], + ?alternates: ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate], + ?author: String, + ?canonical_url: String, + ?description: String, + ?favicon: String, + ?image: String, + ?json_ld: ::Array[::Hash[Symbol, top]], + ?keywords: ::Array[String], + ?language: String, + ?modified_time: String, + ?open_graph: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::open_graph], + ?published_time: String, + ?robots: String, + ?site_name: String, + ?title: String, + ?twitter: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::twitter] + ) -> void + + def to_hash: -> { + final_url: String, + source_url: String, + additional_meta: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::additional_meta], + alternates: ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::Alternate], + author: String, + canonical_url: String, + description: String, + favicon: String, + image: String, + json_ld: ::Array[::Hash[Symbol, top]], + keywords: ::Array[String], + language: String, + modified_time: String, + open_graph: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::open_graph], + published_time: String, + robots: String, + site_name: String, + title: String, + twitter: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::twitter] + } + + type additional_meta = String | ::Array[String] + + module AdditionalMeta + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::additional_meta] + + StringArray: BrandDev::Internal::Type::Converter + end + + type alternate = + { href: String, hreflang: String, title: String, type: String } + + class Alternate < BrandDev::Internal::Type::BaseModel + attr_accessor href: String + + attr_reader hreflang: String? + + def hreflang=: (String) -> String + + attr_reader title: String? + + def title=: (String) -> String + + attr_reader type: String? + + def type=: (String) -> String + + def initialize: ( + href: String, + ?hreflang: String, + ?title: String, + ?type: String + ) -> void + + def to_hash: -> { + href: String, + hreflang: String, + title: String, + type: String + } + end + + type open_graph = String | ::Array[String] + + module OpenGraph + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::open_graph] + + StringArray: BrandDev::Internal::Type::Converter + end + + type twitter = String | ::Array[String] + + module Twitter + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata::twitter] + + StringArray: BrandDev::Internal::Type::Converter + end + end + type success = true module Success @@ -35,6 +284,131 @@ module BrandDev def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::success] end + + type type_ = + :html + | :xml + | :json + | :text + | :csv + | :markdown + | :svg + | :pdf + | :docx + | :doc + | :xlsx + | :xls + | :pptx + | :ppt + + module Type + extend BrandDev::Internal::Type::Enum + + HTML: :html + XML: :xml + JSON: :json + TEXT: :text + CSV: :csv + MARKDOWN: :markdown + SVG: :svg + PDF: :pdf + DOCX: :docx + DOC: :doc + XLSX: :xlsx + XLS: :xls + PPTX: :pptx + PPT: :ppt + + def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::type_] + end + + type actions_applied = + { + instruction: String, + status: BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::status, + completion_evidence: String, + duration_ms: Float, + error: String, + method_: String, + target_description: String + } + + class ActionsApplied < BrandDev::Internal::Type::BaseModel + attr_accessor instruction: String + + attr_accessor status: BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::status + + attr_reader completion_evidence: String? + + def completion_evidence=: (String) -> String + + attr_reader duration_ms: Float? + + def duration_ms=: (Float) -> Float + + attr_reader error: String? + + def error=: (String) -> String + + attr_reader method_: String? + + def method_=: (String) -> String + + attr_reader target_description: String? + + def target_description=: (String) -> String + + def initialize: ( + instruction: String, + status: BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::status, + ?completion_evidence: String, + ?duration_ms: Float, + ?error: String, + ?method_: String, + ?target_description: String + ) -> void + + def to_hash: -> { + instruction: String, + status: BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::status, + completion_evidence: String, + duration_ms: Float, + error: String, + method_: String, + target_description: String + } + + type status = :applied | :failed | :skipped + + module Status + extend BrandDev::Internal::Type::Enum + + APPLIED: :applied + FAILED: :failed + SKIPPED: :skipped + + def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied::status] + end + end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_web_scrape_images_params.rbs b/sig/brand_dev/models/brand_web_scrape_images_params.rbs index daa60b3f..caba6699 100644 --- a/sig/brand_dev/models/brand_web_scrape_images_params.rbs +++ b/sig/brand_dev/models/brand_web_scrape_images_params.rbs @@ -1,7 +1,18 @@ module BrandDev module Models type brand_web_scrape_images_params = - { url: String } & BrandDev::Internal::Type::request_parameters + { + url: String, + actions: ::Array[BrandDev::Models::BrandWebScrapeImagesParams::action]?, + dedupe: BrandDev::Models::BrandWebScrapeImagesParams::dedupe, + enrichment: BrandDev::BrandWebScrapeImagesParams::Enrichment?, + headers: ::Hash[Symbol, String], + max_age_ms: Integer?, + tags: ::Array[String], + timeout_ms: Integer, + wait_for_ms: Integer? + } + & BrandDev::Internal::Type::request_parameters class BrandWebScrapeImagesParams < BrandDev::Internal::Type::BaseModel extend BrandDev::Internal::Type::RequestParameters::Converter @@ -9,12 +20,181 @@ module BrandDev attr_accessor url: String + attr_accessor actions: ::Array[BrandDev::Models::BrandWebScrapeImagesParams::action]? + + attr_reader dedupe: BrandDev::Models::BrandWebScrapeImagesParams::dedupe? + + def dedupe=: ( + BrandDev::Models::BrandWebScrapeImagesParams::dedupe + ) -> BrandDev::Models::BrandWebScrapeImagesParams::dedupe + + attr_accessor enrichment: BrandDev::BrandWebScrapeImagesParams::Enrichment? + + attr_reader headers: ::Hash[Symbol, String]? + + def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String] + + attr_accessor max_age_ms: Integer? + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + + attr_reader timeout_ms: Integer? + + def timeout_ms=: (Integer) -> Integer + + attr_accessor wait_for_ms: Integer? + def initialize: ( url: String, + ?actions: ::Array[BrandDev::Models::BrandWebScrapeImagesParams::action]?, + ?dedupe: BrandDev::Models::BrandWebScrapeImagesParams::dedupe, + ?enrichment: BrandDev::BrandWebScrapeImagesParams::Enrichment?, + ?headers: ::Hash[Symbol, String], + ?max_age_ms: Integer?, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?wait_for_ms: Integer?, ?request_options: BrandDev::request_opts ) -> void - def to_hash: -> { url: String, request_options: BrandDev::RequestOptions } + def to_hash: -> { + url: String, + actions: ::Array[BrandDev::Models::BrandWebScrapeImagesParams::action]?, + dedupe: BrandDev::Models::BrandWebScrapeImagesParams::dedupe, + enrichment: BrandDev::BrandWebScrapeImagesParams::Enrichment?, + headers: ::Hash[Symbol, String], + max_age_ms: Integer?, + tags: ::Array[String], + timeout_ms: Integer, + wait_for_ms: Integer?, + request_options: BrandDev::RequestOptions + } + + type action = + BrandDev::BrandWebScrapeImagesParams::Action::Wait + | BrandDev::BrandWebScrapeImagesParams::Action::Perform + + module Action + extend BrandDev::Internal::Type::Union + + type wait = { do_: :wait, time_ms: Integer } + + class Wait < BrandDev::Internal::Type::BaseModel + attr_accessor do_: :wait + + attr_accessor time_ms: Integer + + def initialize: (time_ms: Integer, ?do_: :wait) -> void + + def to_hash: -> { do_: :wait, time_ms: Integer } + end + + type perform = { action: String, do_: :perform } + + class Perform < BrandDev::Internal::Type::BaseModel + attr_accessor action: String + + attr_accessor do_: :perform + + def initialize: (action: String, ?do_: :perform) -> void + + def to_hash: -> { action: String, do_: :perform } + end + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeImagesParams::action] + end + + type dedupe = bool | :true | :false + + module Dedupe + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeImagesParams::dedupe] + + TRUE: :true + FALSE: :false + end + + type enrichment = + { + classification: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::classification, + hosted_url: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::hosted_url, + max_time_per_ms: Integer, + resolution: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::resolution + } + + class Enrichment < BrandDev::Internal::Type::BaseModel + attr_reader classification: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::classification? + + def classification=: ( + BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::classification + ) -> BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::classification + + attr_reader hosted_url: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::hosted_url? + + def hosted_url=: ( + BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::hosted_url + ) -> BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::hosted_url + + attr_reader max_time_per_ms: Integer? + + def max_time_per_ms=: (Integer) -> Integer + + attr_reader resolution: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::resolution? + + def resolution=: ( + BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::resolution + ) -> BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::resolution + + def initialize: ( + ?classification: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::classification, + ?hosted_url: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::hosted_url, + ?max_time_per_ms: Integer, + ?resolution: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::resolution + ) -> void + + def to_hash: -> { + classification: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::classification, + hosted_url: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::hosted_url, + max_time_per_ms: Integer, + resolution: BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::resolution + } + + type classification = bool | :true | :false + + module Classification + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::classification] + + TRUE: :true + FALSE: :false + end + + type hosted_url = bool | :true | :false + + module HostedURL + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::hosted_url] + + TRUE: :true + FALSE: :false + end + + type resolution = bool | :true | :false + + module Resolution + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeImagesParams::Enrichment::resolution] + + TRUE: :true + FALSE: :false + end + end end end end diff --git a/sig/brand_dev/models/brand_web_scrape_images_response.rbs b/sig/brand_dev/models/brand_web_scrape_images_response.rbs index 5c4390f9..eae30574 100644 --- a/sig/brand_dev/models/brand_web_scrape_images_response.rbs +++ b/sig/brand_dev/models/brand_web_scrape_images_response.rbs @@ -4,7 +4,8 @@ module BrandDev { images: ::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image], success: BrandDev::Models::BrandWebScrapeImagesResponse::success, - url: String + url: String, + key_metadata: BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata } class BrandWebScrapeImagesResponse < BrandDev::Internal::Type::BaseModel @@ -14,16 +15,24 @@ module BrandDev attr_accessor url: String + attr_reader key_metadata: BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata + ) -> BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata + def initialize: ( images: ::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image], success: BrandDev::Models::BrandWebScrapeImagesResponse::success, - url: String + url: String, + ?key_metadata: BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata ) -> void def to_hash: -> { images: ::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image], success: BrandDev::Models::BrandWebScrapeImagesResponse::success, - url: String + url: String, + key_metadata: BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata } type image = @@ -31,7 +40,8 @@ module BrandDev alt: String?, element: BrandDev::Models::BrandWebScrapeImagesResponse::Image::element, src: String, - type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_ + type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_, + enrichment: BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment } class Image < BrandDev::Internal::Type::BaseModel @@ -43,18 +53,26 @@ module BrandDev attr_accessor type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_ + attr_reader enrichment: BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment? + + def enrichment=: ( + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment + ) -> BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment + def initialize: ( alt: String?, element: BrandDev::Models::BrandWebScrapeImagesResponse::Image::element, src: String, - type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_ + type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_, + ?enrichment: BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment ) -> void def to_hash: -> { alt: String?, element: BrandDev::Models::BrandWebScrapeImagesResponse::Image::element, src: String, - type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_ + type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_, + enrichment: BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment } type element = @@ -95,6 +113,80 @@ module BrandDev def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_] end + + type enrichment = + { + height: Integer, + mimetype: String, + type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::type_, + url: String, + width: Integer + } + + class Enrichment < BrandDev::Internal::Type::BaseModel + attr_reader height: Integer? + + def height=: (Integer) -> Integer + + attr_reader mimetype: String? + + def mimetype=: (String) -> String + + attr_reader type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::type_? + + def type=: ( + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::type_ + ) -> BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::type_ + + attr_reader url: String? + + def url=: (String) -> String + + attr_reader width: Integer? + + def width=: (Integer) -> Integer + + def initialize: ( + ?height: Integer, + ?mimetype: String, + ?type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::type_, + ?url: String, + ?width: Integer + ) -> void + + def to_hash: -> { + height: Integer, + mimetype: String, + type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::type_, + url: String, + width: Integer + } + + type type_ = + :photography + | :illustration + | :logo + | :wordmark + | :icon + | :pattern + | :graphic + | :other + + module Type + extend BrandDev::Internal::Type::Enum + + PHOTOGRAPHY: :photography + ILLUSTRATION: :illustration + LOGO: :logo + WORDMARK: :wordmark + ICON: :icon + PATTERN: :pattern + GRAPHIC: :graphic + OTHER: :other + + def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image::Enrichment::type_] + end + end end type success = true @@ -106,6 +198,25 @@ module BrandDev def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeImagesResponse::success] end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_web_scrape_md_params.rbs b/sig/brand_dev/models/brand_web_scrape_md_params.rbs index 9db0c0ca..e4070495 100644 --- a/sig/brand_dev/models/brand_web_scrape_md_params.rbs +++ b/sig/brand_dev/models/brand_web_scrape_md_params.rbs @@ -3,10 +3,23 @@ module BrandDev type brand_web_scrape_md_params = { url: String, - include_images: bool, - include_links: bool, - :shorten_base64_images => bool, - use_main_content_only: bool + actions: ::Array[BrandDev::Models::BrandWebScrapeMdParams::action]?, + country: BrandDev::Models::BrandWebScrapeMdParams::country, + exclude_selectors: ::Array[String]?, + headers: ::Hash[Symbol, String], + include_frames: BrandDev::Models::BrandWebScrapeMdParams::include_frames, + include_images: BrandDev::Models::BrandWebScrapeMdParams::include_images, + include_links: BrandDev::Models::BrandWebScrapeMdParams::include_links, + include_selectors: ::Array[String]?, + max_age_ms: Integer?, + pdf: BrandDev::BrandWebScrapeMdParams::Pdf, + settle_animations: BrandDev::Models::BrandWebScrapeMdParams::settle_animations, + :shorten_base64_images => BrandDev::Models::BrandWebScrapeMdParams::shorten_base64_images, + tags: ::Array[String], + timeout_ms: Integer, + use_main_content_only: BrandDev::Models::BrandWebScrapeMdParams::use_main_content_only, + wait_for_ms: Integer?, + zdr: BrandDev::Models::BrandWebScrapeMdParams::zdr } & BrandDev::Internal::Type::request_parameters @@ -16,39 +29,719 @@ module BrandDev attr_accessor url: String - attr_reader include_images: bool? + attr_accessor actions: ::Array[BrandDev::Models::BrandWebScrapeMdParams::action]? - def include_images=: (bool) -> bool + attr_reader country: BrandDev::Models::BrandWebScrapeMdParams::country? - attr_reader include_links: bool? + def country=: ( + BrandDev::Models::BrandWebScrapeMdParams::country + ) -> BrandDev::Models::BrandWebScrapeMdParams::country - def include_links=: (bool) -> bool + attr_accessor exclude_selectors: ::Array[String]? - attr_reader shorten_base64_images: bool? + attr_reader headers: ::Hash[Symbol, String]? - def shorten_base64_images=: (bool) -> bool + def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String] - attr_reader use_main_content_only: bool? + attr_reader include_frames: BrandDev::Models::BrandWebScrapeMdParams::include_frames? - def use_main_content_only=: (bool) -> bool + def include_frames=: ( + BrandDev::Models::BrandWebScrapeMdParams::include_frames + ) -> BrandDev::Models::BrandWebScrapeMdParams::include_frames + + attr_reader include_images: BrandDev::Models::BrandWebScrapeMdParams::include_images? + + def include_images=: ( + BrandDev::Models::BrandWebScrapeMdParams::include_images + ) -> BrandDev::Models::BrandWebScrapeMdParams::include_images + + attr_reader include_links: BrandDev::Models::BrandWebScrapeMdParams::include_links? + + def include_links=: ( + BrandDev::Models::BrandWebScrapeMdParams::include_links + ) -> BrandDev::Models::BrandWebScrapeMdParams::include_links + + attr_accessor include_selectors: ::Array[String]? + + attr_accessor max_age_ms: Integer? + + attr_reader pdf: BrandDev::BrandWebScrapeMdParams::Pdf? + + def pdf=: ( + BrandDev::BrandWebScrapeMdParams::Pdf + ) -> BrandDev::BrandWebScrapeMdParams::Pdf + + attr_reader settle_animations: BrandDev::Models::BrandWebScrapeMdParams::settle_animations? + + def settle_animations=: ( + BrandDev::Models::BrandWebScrapeMdParams::settle_animations + ) -> BrandDev::Models::BrandWebScrapeMdParams::settle_animations + + attr_reader shorten_base64_images: BrandDev::Models::BrandWebScrapeMdParams::shorten_base64_images? + + def shorten_base64_images=: ( + BrandDev::Models::BrandWebScrapeMdParams::shorten_base64_images + ) -> BrandDev::Models::BrandWebScrapeMdParams::shorten_base64_images + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + + attr_reader timeout_ms: Integer? + + def timeout_ms=: (Integer) -> Integer + + attr_reader use_main_content_only: BrandDev::Models::BrandWebScrapeMdParams::use_main_content_only? + + def use_main_content_only=: ( + BrandDev::Models::BrandWebScrapeMdParams::use_main_content_only + ) -> BrandDev::Models::BrandWebScrapeMdParams::use_main_content_only + + attr_accessor wait_for_ms: Integer? + + attr_reader zdr: BrandDev::Models::BrandWebScrapeMdParams::zdr? + + def zdr=: ( + BrandDev::Models::BrandWebScrapeMdParams::zdr + ) -> BrandDev::Models::BrandWebScrapeMdParams::zdr def initialize: ( url: String, - ?include_images: bool, - ?include_links: bool, - ?shorten_base64_images: bool, - ?use_main_content_only: bool, + ?actions: ::Array[BrandDev::Models::BrandWebScrapeMdParams::action]?, + ?country: BrandDev::Models::BrandWebScrapeMdParams::country, + ?exclude_selectors: ::Array[String]?, + ?headers: ::Hash[Symbol, String], + ?include_frames: BrandDev::Models::BrandWebScrapeMdParams::include_frames, + ?include_images: BrandDev::Models::BrandWebScrapeMdParams::include_images, + ?include_links: BrandDev::Models::BrandWebScrapeMdParams::include_links, + ?include_selectors: ::Array[String]?, + ?max_age_ms: Integer?, + ?pdf: BrandDev::BrandWebScrapeMdParams::Pdf, + ?settle_animations: BrandDev::Models::BrandWebScrapeMdParams::settle_animations, + ?shorten_base64_images: BrandDev::Models::BrandWebScrapeMdParams::shorten_base64_images, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?use_main_content_only: BrandDev::Models::BrandWebScrapeMdParams::use_main_content_only, + ?wait_for_ms: Integer?, + ?zdr: BrandDev::Models::BrandWebScrapeMdParams::zdr, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { url: String, - include_images: bool, - include_links: bool, - :shorten_base64_images => bool, - use_main_content_only: bool, + actions: ::Array[BrandDev::Models::BrandWebScrapeMdParams::action]?, + country: BrandDev::Models::BrandWebScrapeMdParams::country, + exclude_selectors: ::Array[String]?, + headers: ::Hash[Symbol, String], + include_frames: BrandDev::Models::BrandWebScrapeMdParams::include_frames, + include_images: BrandDev::Models::BrandWebScrapeMdParams::include_images, + include_links: BrandDev::Models::BrandWebScrapeMdParams::include_links, + include_selectors: ::Array[String]?, + max_age_ms: Integer?, + pdf: BrandDev::BrandWebScrapeMdParams::Pdf, + settle_animations: BrandDev::Models::BrandWebScrapeMdParams::settle_animations, + :shorten_base64_images => BrandDev::Models::BrandWebScrapeMdParams::shorten_base64_images, + tags: ::Array[String], + timeout_ms: Integer, + use_main_content_only: BrandDev::Models::BrandWebScrapeMdParams::use_main_content_only, + wait_for_ms: Integer?, + zdr: BrandDev::Models::BrandWebScrapeMdParams::zdr, request_options: BrandDev::RequestOptions } + + type action = + BrandDev::BrandWebScrapeMdParams::Action::Wait + | BrandDev::BrandWebScrapeMdParams::Action::Perform + + module Action + extend BrandDev::Internal::Type::Union + + type wait = { do_: :wait, time_ms: Integer } + + class Wait < BrandDev::Internal::Type::BaseModel + attr_accessor do_: :wait + + attr_accessor time_ms: Integer + + def initialize: (time_ms: Integer, ?do_: :wait) -> void + + def to_hash: -> { do_: :wait, time_ms: Integer } + end + + type perform = { action: String, do_: :perform } + + class Perform < BrandDev::Internal::Type::BaseModel + attr_accessor action: String + + attr_accessor do_: :perform + + def initialize: (action: String, ?do_: :perform) -> void + + def to_hash: -> { action: String, do_: :perform } + end + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::action] + end + + type country = + :ad + | :ae + | :af + | :ag + | :ai + | :al + | :am + | :ao + | :ar + | :at + | :au + | :aw + | :az + | :ba + | :bb + | :bd + | :be + | :bf + | :bg + | :bh + | :bi + | :bj + | :bm + | :bn + | :bo + | :bq + | :br + | :bs + | :bw + | :by + | :bz + | :ca + | :cd + | :cf + | :cg + | :ch + | :ci + | :cl + | :cm + | :cn + | :co + | :cr + | :cv + | :cw + | :cy + | :cz + | :de + | :dj + | :dk + | :dm + | :do + | :dz + | :ec + | :ee + | :eg + | :es + | :et + | :fi + | :fj + | :fr + | :ga + | :gb + | :gd + | :ge + | :gf + | :gg + | :gh + | :gm + | :gn + | :gp + | :gq + | :gr + | :gt + | :gu + | :gw + | :gy + | :hk + | :hn + | :hr + | :ht + | :hu + | :id + | :ie + | :il + | :im + | :in + | :iq + | :ir + | :is + | :it + | :je + | :jm + | :jo + | :jp + | :ke + | :kg + | :kh + | :kn + | :kr + | :kw + | :ky + | :kz + | :la + | :lb + | :lc + | :lk + | :lr + | :ls + | :lt + | :lu + | :lv + | :ly + | :ma + | :mc + | :md + | :me + | :mf + | :mg + | :mk + | :ml + | :mm + | :mn + | :mo + | :mq + | :mr + | :mt + | :mu + | :mv + | :mw + | :mx + | :my + | :mz + | :na + | :nc + | :ne + | :ng + | :ni + | :nl + | :no + | :np + | :nz + | :om + | :pa + | :pe + | :pf + | :pg + | :ph + | :pk + | :pl + | :pr + | :ps + | :pt + | :py + | :qa + | :re + | :ro + | :rs + | :ru + | :rw + | :sa + | :sc + | :sd + | :se + | :sg + | :si + | :sk + | :sl + | :sm + | :sn + | :so + | :sr + | :ss + | :st + | :sv + | :sx + | :sy + | :sz + | :tc + | :td + | :tg + | :th + | :tj + | :tl + | :tm + | :tn + | :tr + | :tt + | :tw + | :tz + | :ua + | :ug + | :us + | :uy + | :uz + | :vc + | :ve + | :vg + | :vi + | :vn + | :ye + | :yt + | :za + | :zm + | :zw + + module Country + extend BrandDev::Internal::Type::Enum + + AD: :ad + AE: :ae + AF: :af + AG: :ag + AI: :ai + AL: :al + AM: :am + AO: :ao + AR: :ar + AT: :at + AU: :au + AW: :aw + AZ: :az + BA: :ba + BB: :bb + BD: :bd + BE: :be + BF: :bf + BG: :bg + BH: :bh + BI: :bi + BJ: :bj + BM: :bm + BN: :bn + BO: :bo + BQ: :bq + BR: :br + BS: :bs + BW: :bw + BY: :by + BZ: :bz + CA: :ca + CD: :cd + CF: :cf + CG: :cg + CH: :ch + CI: :ci + CL: :cl + CM: :cm + CN: :cn + CO: :co + CR: :cr + CV: :cv + CW: :cw + CY: :cy + CZ: :cz + DE: :de + DJ: :dj + DK: :dk + DM: :dm + DO: :do + DZ: :dz + EC: :ec + EE: :ee + EG: :eg + ES: :es + ET: :et + FI: :fi + FJ: :fj + FR: :fr + GA: :ga + GB: :gb + GD: :gd + GE: :ge + GF: :gf + GG: :gg + GH: :gh + GM: :gm + GN: :gn + GP: :gp + GQ: :gq + GR: :gr + GT: :gt + GU: :gu + GW: :gw + GY: :gy + HK: :hk + HN: :hn + HR: :hr + HT: :ht + HU: :hu + ID: :id + IE: :ie + IL: :il + IM: :im + IN: :in + IQ: :iq + IR: :ir + IS: :is + IT: :it + JE: :je + JM: :jm + JO: :jo + JP: :jp + KE: :ke + KG: :kg + KH: :kh + KN: :kn + KR: :kr + KW: :kw + KY: :ky + KZ: :kz + LA: :la + LB: :lb + LC: :lc + LK: :lk + LR: :lr + LS: :ls + LT: :lt + LU: :lu + LV: :lv + LY: :ly + MA: :ma + MC: :mc + MD: :md + ME: :me + MF: :mf + MG: :mg + MK: :mk + ML: :ml + MM: :mm + MN: :mn + MO: :mo + MQ: :mq + MR: :mr + MT: :mt + MU: :mu + MV: :mv + MW: :mw + MX: :mx + MY: :my + MZ: :mz + NA: :na + NC: :nc + NE: :ne + NG: :ng + NI: :ni + NL: :nl + NO: :no + NP: :np + NZ: :nz + OM: :om + PA: :pa + PE: :pe + PF: :pf + PG: :pg + PH: :ph + PK: :pk + PL: :pl + PR: :pr + PS: :ps + PT: :pt + PY: :py + QA: :qa + RE: :re + RO: :ro + RS: :rs + RU: :ru + RW: :rw + SA: :sa + SC: :sc + SD: :sd + SE: :se + SG: :sg + SI: :si + SK: :sk + SL: :sl + SM: :sm + SN: :sn + SO: :so + SR: :sr + SS: :ss + ST: :st + SV: :sv + SX: :sx + SY: :sy + SZ: :sz + TC: :tc + TD: :td + TG: :tg + TH: :th + TJ: :tj + TL: :tl + TM: :tm + TN: :tn + TR: :tr + TT: :tt + TW: :tw + TZ: :tz + UA: :ua + UG: :ug + US: :us + UY: :uy + UZ: :uz + VC: :vc + VE: :ve + VG: :vg + VI: :vi + VN: :vn + YE: :ye + YT: :yt + ZA: :za + ZM: :zm + ZW: :zw + + def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::country] + end + + type include_frames = bool | :true | :false + + module IncludeFrames + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::include_frames] + + TRUE: :true + FALSE: :false + end + + type include_images = bool | :true | :false + + module IncludeImages + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::include_images] + + TRUE: :true + FALSE: :false + end + + type include_links = bool | :true | :false + + module IncludeLinks + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::include_links] + + TRUE: :true + FALSE: :false + end + + type pdf = + { + end_: Integer, + ocr: BrandDev::Models::BrandWebScrapeMdParams::Pdf::ocr, + should_parse: BrandDev::Models::BrandWebScrapeMdParams::Pdf::should_parse, + start: Integer + } + + class Pdf < BrandDev::Internal::Type::BaseModel + attr_reader end_: Integer? + + def end_=: (Integer) -> Integer + + attr_reader ocr: BrandDev::Models::BrandWebScrapeMdParams::Pdf::ocr? + + def ocr=: ( + BrandDev::Models::BrandWebScrapeMdParams::Pdf::ocr + ) -> BrandDev::Models::BrandWebScrapeMdParams::Pdf::ocr + + attr_reader should_parse: BrandDev::Models::BrandWebScrapeMdParams::Pdf::should_parse? + + def should_parse=: ( + BrandDev::Models::BrandWebScrapeMdParams::Pdf::should_parse + ) -> BrandDev::Models::BrandWebScrapeMdParams::Pdf::should_parse + + attr_reader start: Integer? + + def start=: (Integer) -> Integer + + def initialize: ( + ?end_: Integer, + ?ocr: BrandDev::Models::BrandWebScrapeMdParams::Pdf::ocr, + ?should_parse: BrandDev::Models::BrandWebScrapeMdParams::Pdf::should_parse, + ?start: Integer + ) -> void + + def to_hash: -> { + end_: Integer, + ocr: BrandDev::Models::BrandWebScrapeMdParams::Pdf::ocr, + should_parse: BrandDev::Models::BrandWebScrapeMdParams::Pdf::should_parse, + start: Integer + } + + type ocr = bool | :true | :false + + module Ocr + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::Pdf::ocr] + + TRUE: :true + FALSE: :false + end + + type should_parse = bool | :true | :false + + module ShouldParse + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::Pdf::should_parse] + + TRUE: :true + FALSE: :false + end + end + + type settle_animations = bool | :true | :false + + module SettleAnimations + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::settle_animations] + + TRUE: :true + FALSE: :false + end + + type shorten_base64_images = bool | :true | :false + + module ShortenBase64Images + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::shorten_base64_images] + + TRUE: :true + FALSE: :false + end + + type use_main_content_only = bool | :true | :false + + module UseMainContentOnly + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::use_main_content_only] + + TRUE: :true + FALSE: :false + end + + type zdr = :enabled | :disabled + + module Zdr + extend BrandDev::Internal::Type::Enum + + ENABLED: :enabled + DISABLED: :disabled + + def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeMdParams::zdr] + end end end end diff --git a/sig/brand_dev/models/brand_web_scrape_md_response.rbs b/sig/brand_dev/models/brand_web_scrape_md_response.rbs index e6db5eb8..f7908ff3 100644 --- a/sig/brand_dev/models/brand_web_scrape_md_response.rbs +++ b/sig/brand_dev/models/brand_web_scrape_md_response.rbs @@ -2,30 +2,279 @@ module BrandDev module Models type brand_web_scrape_md_response = { + content_length: Integer, markdown: String, + metadata: BrandDev::Models::BrandWebScrapeMdResponse::Metadata, success: BrandDev::Models::BrandWebScrapeMdResponse::success, - url: String + url: String, + actions_applied: ::Array[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied], + actions_html_stale: bool, + key_metadata: BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata } class BrandWebScrapeMdResponse < BrandDev::Internal::Type::BaseModel + attr_accessor content_length: Integer + attr_accessor markdown: String + attr_accessor metadata: BrandDev::Models::BrandWebScrapeMdResponse::Metadata + attr_accessor success: BrandDev::Models::BrandWebScrapeMdResponse::success attr_accessor url: String + attr_reader actions_applied: ::Array[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied]? + + def actions_applied=: ( + ::Array[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied] + ) -> ::Array[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied] + + attr_reader actions_html_stale: bool? + + def actions_html_stale=: (bool) -> bool + + attr_reader key_metadata: BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata + ) -> BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata + def initialize: ( + content_length: Integer, markdown: String, + metadata: BrandDev::Models::BrandWebScrapeMdResponse::Metadata, success: BrandDev::Models::BrandWebScrapeMdResponse::success, - url: String + url: String, + ?actions_applied: ::Array[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied], + ?actions_html_stale: bool, + ?key_metadata: BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata ) -> void def to_hash: -> { + content_length: Integer, markdown: String, + metadata: BrandDev::Models::BrandWebScrapeMdResponse::Metadata, success: BrandDev::Models::BrandWebScrapeMdResponse::success, - url: String + url: String, + actions_applied: ::Array[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied], + actions_html_stale: bool, + key_metadata: BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata } + type metadata = + { + final_url: String, + source_url: String, + additional_meta: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::additional_meta], + alternates: ::Array[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate], + author: String, + canonical_url: String, + description: String, + favicon: String, + image: String, + json_ld: ::Array[::Hash[Symbol, top]], + keywords: ::Array[String], + language: String, + modified_time: String, + open_graph: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::open_graph], + published_time: String, + robots: String, + site_name: String, + title: String, + twitter: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::twitter] + } + + class Metadata < BrandDev::Internal::Type::BaseModel + attr_accessor final_url: String + + attr_accessor source_url: String + + attr_reader additional_meta: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::additional_meta]? + + def additional_meta=: ( + ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::additional_meta] + ) -> ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::additional_meta] + + attr_reader alternates: ::Array[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate]? + + def alternates=: ( + ::Array[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate] + ) -> ::Array[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate] + + attr_reader author: String? + + def author=: (String) -> String + + attr_reader canonical_url: String? + + def canonical_url=: (String) -> String + + attr_reader description: String? + + def description=: (String) -> String + + attr_reader favicon: String? + + def favicon=: (String) -> String + + attr_reader image: String? + + def image=: (String) -> String + + attr_reader json_ld: ::Array[::Hash[Symbol, top]]? + + def json_ld=: ( + ::Array[::Hash[Symbol, top]] + ) -> ::Array[::Hash[Symbol, top]] + + attr_reader keywords: ::Array[String]? + + def keywords=: (::Array[String]) -> ::Array[String] + + attr_reader language: String? + + def language=: (String) -> String + + attr_reader modified_time: String? + + def modified_time=: (String) -> String + + attr_reader open_graph: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::open_graph]? + + def open_graph=: ( + ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::open_graph] + ) -> ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::open_graph] + + attr_reader published_time: String? + + def published_time=: (String) -> String + + attr_reader robots: String? + + def robots=: (String) -> String + + attr_reader site_name: String? + + def site_name=: (String) -> String + + attr_reader title: String? + + def title=: (String) -> String + + attr_reader twitter: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::twitter]? + + def twitter=: ( + ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::twitter] + ) -> ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::twitter] + + def initialize: ( + final_url: String, + source_url: String, + ?additional_meta: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::additional_meta], + ?alternates: ::Array[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate], + ?author: String, + ?canonical_url: String, + ?description: String, + ?favicon: String, + ?image: String, + ?json_ld: ::Array[::Hash[Symbol, top]], + ?keywords: ::Array[String], + ?language: String, + ?modified_time: String, + ?open_graph: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::open_graph], + ?published_time: String, + ?robots: String, + ?site_name: String, + ?title: String, + ?twitter: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::twitter] + ) -> void + + def to_hash: -> { + final_url: String, + source_url: String, + additional_meta: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::additional_meta], + alternates: ::Array[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::Alternate], + author: String, + canonical_url: String, + description: String, + favicon: String, + image: String, + json_ld: ::Array[::Hash[Symbol, top]], + keywords: ::Array[String], + language: String, + modified_time: String, + open_graph: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::open_graph], + published_time: String, + robots: String, + site_name: String, + title: String, + twitter: ::Hash[Symbol, BrandDev::Models::BrandWebScrapeMdResponse::Metadata::twitter] + } + + type additional_meta = String | ::Array[String] + + module AdditionalMeta + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::additional_meta] + + StringArray: BrandDev::Internal::Type::Converter + end + + type alternate = + { href: String, hreflang: String, title: String, type: String } + + class Alternate < BrandDev::Internal::Type::BaseModel + attr_accessor href: String + + attr_reader hreflang: String? + + def hreflang=: (String) -> String + + attr_reader title: String? + + def title=: (String) -> String + + attr_reader type: String? + + def type=: (String) -> String + + def initialize: ( + href: String, + ?hreflang: String, + ?title: String, + ?type: String + ) -> void + + def to_hash: -> { + href: String, + hreflang: String, + title: String, + type: String + } + end + + type open_graph = String | ::Array[String] + + module OpenGraph + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::open_graph] + + StringArray: BrandDev::Internal::Type::Converter + end + + type twitter = String | ::Array[String] + + module Twitter + extend BrandDev::Internal::Type::Union + + def self?.variants: -> ::Array[BrandDev::Models::BrandWebScrapeMdResponse::Metadata::twitter] + + StringArray: BrandDev::Internal::Type::Converter + end + end + type success = true module Success @@ -35,6 +284,94 @@ module BrandDev def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeMdResponse::success] end + + type actions_applied = + { + instruction: String, + status: BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::status, + completion_evidence: String, + duration_ms: Float, + error: String, + method_: String, + target_description: String + } + + class ActionsApplied < BrandDev::Internal::Type::BaseModel + attr_accessor instruction: String + + attr_accessor status: BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::status + + attr_reader completion_evidence: String? + + def completion_evidence=: (String) -> String + + attr_reader duration_ms: Float? + + def duration_ms=: (Float) -> Float + + attr_reader error: String? + + def error=: (String) -> String + + attr_reader method_: String? + + def method_=: (String) -> String + + attr_reader target_description: String? + + def target_description=: (String) -> String + + def initialize: ( + instruction: String, + status: BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::status, + ?completion_evidence: String, + ?duration_ms: Float, + ?error: String, + ?method_: String, + ?target_description: String + ) -> void + + def to_hash: -> { + instruction: String, + status: BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::status, + completion_evidence: String, + duration_ms: Float, + error: String, + method_: String, + target_description: String + } + + type status = :applied | :failed | :skipped + + module Status + extend BrandDev::Internal::Type::Enum + + APPLIED: :applied + FAILED: :failed + SKIPPED: :skipped + + def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied::status] + end + end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/brand_web_scrape_sitemap_params.rbs b/sig/brand_dev/models/brand_web_scrape_sitemap_params.rbs index c7a3eefe..534accef 100644 --- a/sig/brand_dev/models/brand_web_scrape_sitemap_params.rbs +++ b/sig/brand_dev/models/brand_web_scrape_sitemap_params.rbs @@ -1,7 +1,16 @@ module BrandDev module Models type brand_web_scrape_sitemap_params = - { domain: String, max_links: Integer } + { + domain: String, + headers: ::Hash[Symbol, String], + max_links: Integer, + sitemap_url: String, + tags: ::Array[String], + timeout_ms: Integer, + url_regex: String, + zdr: BrandDev::Models::BrandWebScrapeSitemapParams::zdr + } & BrandDev::Internal::Type::request_parameters class BrandWebScrapeSitemapParams < BrandDev::Internal::Type::BaseModel @@ -10,21 +19,70 @@ module BrandDev attr_accessor domain: String + attr_reader headers: ::Hash[Symbol, String]? + + def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String] + attr_reader max_links: Integer? def max_links=: (Integer) -> Integer + attr_reader sitemap_url: String? + + def sitemap_url=: (String) -> String + + attr_reader tags: ::Array[String]? + + def tags=: (::Array[String]) -> ::Array[String] + + attr_reader timeout_ms: Integer? + + def timeout_ms=: (Integer) -> Integer + + attr_reader url_regex: String? + + def url_regex=: (String) -> String + + attr_reader zdr: BrandDev::Models::BrandWebScrapeSitemapParams::zdr? + + def zdr=: ( + BrandDev::Models::BrandWebScrapeSitemapParams::zdr + ) -> BrandDev::Models::BrandWebScrapeSitemapParams::zdr + def initialize: ( domain: String, + ?headers: ::Hash[Symbol, String], ?max_links: Integer, + ?sitemap_url: String, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?url_regex: String, + ?zdr: BrandDev::Models::BrandWebScrapeSitemapParams::zdr, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { domain: String, + headers: ::Hash[Symbol, String], max_links: Integer, + sitemap_url: String, + tags: ::Array[String], + timeout_ms: Integer, + url_regex: String, + zdr: BrandDev::Models::BrandWebScrapeSitemapParams::zdr, request_options: BrandDev::RequestOptions } + + type zdr = :enabled | :disabled + + module Zdr + extend BrandDev::Internal::Type::Enum + + ENABLED: :enabled + DISABLED: :disabled + + def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeSitemapParams::zdr] + end end end end diff --git a/sig/brand_dev/models/brand_web_scrape_sitemap_response.rbs b/sig/brand_dev/models/brand_web_scrape_sitemap_response.rbs index dc249ab4..acc04a63 100644 --- a/sig/brand_dev/models/brand_web_scrape_sitemap_response.rbs +++ b/sig/brand_dev/models/brand_web_scrape_sitemap_response.rbs @@ -5,7 +5,8 @@ module BrandDev domain: String, meta: BrandDev::Models::BrandWebScrapeSitemapResponse::Meta, success: BrandDev::Models::BrandWebScrapeSitemapResponse::success, - urls: ::Array[String] + urls: ::Array[String], + key_metadata: BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata } class BrandWebScrapeSitemapResponse < BrandDev::Internal::Type::BaseModel @@ -17,18 +18,26 @@ module BrandDev attr_accessor urls: ::Array[String] + attr_reader key_metadata: BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata? + + def key_metadata=: ( + BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata + ) -> BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata + def initialize: ( domain: String, meta: BrandDev::Models::BrandWebScrapeSitemapResponse::Meta, success: BrandDev::Models::BrandWebScrapeSitemapResponse::success, - urls: ::Array[String] + urls: ::Array[String], + ?key_metadata: BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata ) -> void def to_hash: -> { domain: String, meta: BrandDev::Models::BrandWebScrapeSitemapResponse::Meta, success: BrandDev::Models::BrandWebScrapeSitemapResponse::success, - urls: ::Array[String] + urls: ::Array[String], + key_metadata: BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata } type meta = @@ -72,6 +81,25 @@ module BrandDev def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeSitemapResponse::success] end + + type key_metadata = + { credits_consumed: Integer, credits_remaining: Integer } + + class KeyMetadata < BrandDev::Internal::Type::BaseModel + attr_accessor credits_consumed: Integer + + attr_accessor credits_remaining: Integer + + def initialize: ( + credits_consumed: Integer, + credits_remaining: Integer + ) -> void + + def to_hash: -> { + credits_consumed: Integer, + credits_remaining: Integer + } + end end end end diff --git a/sig/brand_dev/models/crawl_controls.rbs b/sig/brand_dev/models/crawl_controls.rbs new file mode 100644 index 00000000..73cdd433 --- /dev/null +++ b/sig/brand_dev/models/crawl_controls.rbs @@ -0,0 +1,114 @@ +module BrandDev + module Models + type crawl_controls = + { + follow_subdomains: bool, + max_depth: Integer?, + max_pages: Integer, + source: BrandDev::Models::CrawlControls::source, + url_pattern: String? + } + + class CrawlControls < BrandDev::Internal::Type::BaseModel + attr_accessor follow_subdomains: bool + + attr_accessor max_depth: Integer? + + attr_accessor max_pages: Integer + + attr_accessor source: BrandDev::Models::CrawlControls::source + + attr_accessor url_pattern: String? + + def initialize: ( + follow_subdomains: bool, + max_depth: Integer?, + max_pages: Integer, + source: BrandDev::Models::CrawlControls::source, + url_pattern: String? + ) -> void + + def to_hash: -> { + follow_subdomains: bool, + max_depth: Integer?, + max_pages: Integer, + source: BrandDev::Models::CrawlControls::source, + url_pattern: String? + } + + type source = + BrandDev::CrawlControls::Source::UnionMember0 + | BrandDev::CrawlControls::Source::UnionMember1 + + module Source + extend BrandDev::Internal::Type::Union + + type union_member0 = + { + type: BrandDev::Models::CrawlControls::Source::UnionMember0::type_, + url: String + } + + class UnionMember0 < BrandDev::Internal::Type::BaseModel + attr_accessor type: BrandDev::Models::CrawlControls::Source::UnionMember0::type_ + + attr_accessor url: String + + def initialize: ( + type: BrandDev::Models::CrawlControls::Source::UnionMember0::type_, + url: String + ) -> void + + def to_hash: -> { + type: BrandDev::Models::CrawlControls::Source::UnionMember0::type_, + url: String + } + + type type_ = :start_url + + module Type + extend BrandDev::Internal::Type::Enum + + START_URL: :start_url + + def self?.values: -> ::Array[BrandDev::Models::CrawlControls::Source::UnionMember0::type_] + end + end + + type union_member1 = + { + domain: String, + type: BrandDev::Models::CrawlControls::Source::UnionMember1::type_ + } + + class UnionMember1 < BrandDev::Internal::Type::BaseModel + attr_accessor domain: String + + attr_accessor type: BrandDev::Models::CrawlControls::Source::UnionMember1::type_ + + def initialize: ( + domain: String, + type: BrandDev::Models::CrawlControls::Source::UnionMember1::type_ + ) -> void + + def to_hash: -> { + domain: String, + type: BrandDev::Models::CrawlControls::Source::UnionMember1::type_ + } + + type type_ = :sitemap + + module Type + extend BrandDev::Internal::Type::Enum + + SITEMAP: :sitemap + + def self?.values: -> ::Array[BrandDev::Models::CrawlControls::Source::UnionMember1::type_] + end + end + + def self?.variants: -> ::Array[BrandDev::Models::CrawlControls::source] + end + end + end +end diff --git a/sig/brand_dev/models/failure.rbs b/sig/brand_dev/models/failure.rbs new file mode 100644 index 00000000..36ab3816 --- /dev/null +++ b/sig/brand_dev/models/failure.rbs @@ -0,0 +1,15 @@ +module BrandDev + module Models + type failure = { code: String, message: String } + + class Failure < BrandDev::Internal::Type::BaseModel + attr_accessor code: String + + attr_accessor message: String + + def initialize: (code: String, message: String) -> void + + def to_hash: -> { code: String, message: String } + end + end +end diff --git a/sig/brand_dev/models/intake.rbs b/sig/brand_dev/models/intake.rbs new file mode 100644 index 00000000..e1367603 --- /dev/null +++ b/sig/brand_dev/models/intake.rbs @@ -0,0 +1,40 @@ +module BrandDev + module Models + type intake = + { + duplicates: Integer, + invalid: Integer?, + reserved: Integer, + reserved_is_ceiling: bool, + submitted: Integer? + } + + class Intake < BrandDev::Internal::Type::BaseModel + attr_accessor duplicates: Integer + + attr_accessor invalid: Integer? + + attr_accessor reserved: Integer + + attr_accessor reserved_is_ceiling: bool + + attr_accessor submitted: Integer? + + def initialize: ( + duplicates: Integer, + invalid: Integer?, + reserved: Integer, + reserved_is_ceiling: bool, + submitted: Integer? + ) -> void + + def to_hash: -> { + duplicates: Integer, + invalid: Integer?, + reserved: Integer, + reserved_is_ceiling: bool, + submitted: Integer? + } + end + end +end diff --git a/sig/brand_dev/models/page_error_count.rbs b/sig/brand_dev/models/page_error_count.rbs new file mode 100644 index 00000000..e9f45073 --- /dev/null +++ b/sig/brand_dev/models/page_error_count.rbs @@ -0,0 +1,15 @@ +module BrandDev + module Models + type page_error_count = { code: String, count: Integer } + + class PageErrorCount < BrandDev::Internal::Type::BaseModel + attr_accessor code: String + + attr_accessor count: Integer + + def initialize: (code: String, count: Integer) -> void + + def to_hash: -> { code: String, count: Integer } + end + end +end diff --git a/sig/brand_dev/models/webhook_delivery.rbs b/sig/brand_dev/models/webhook_delivery.rbs new file mode 100644 index 00000000..05ad1f05 --- /dev/null +++ b/sig/brand_dev/models/webhook_delivery.rbs @@ -0,0 +1,81 @@ +module BrandDev + module Models + type webhook_delivery = + { + attempted_at: Time, + error: BrandDev::WebhookDelivery::Error?, + event: BrandDev::Models::WebhookDelivery::event, + event_id: String, + http_status: Integer?, + status: BrandDev::Models::WebhookDelivery::status + } + + class WebhookDelivery < BrandDev::Internal::Type::BaseModel + attr_accessor attempted_at: Time + + attr_accessor error: BrandDev::WebhookDelivery::Error? + + attr_accessor event: BrandDev::Models::WebhookDelivery::event + + attr_accessor event_id: String + + attr_accessor http_status: Integer? + + attr_accessor status: BrandDev::Models::WebhookDelivery::status + + def initialize: ( + attempted_at: Time, + error: BrandDev::WebhookDelivery::Error?, + event: BrandDev::Models::WebhookDelivery::event, + event_id: String, + http_status: Integer?, + status: BrandDev::Models::WebhookDelivery::status + ) -> void + + def to_hash: -> { + attempted_at: Time, + error: BrandDev::WebhookDelivery::Error?, + event: BrandDev::Models::WebhookDelivery::event, + event_id: String, + http_status: Integer?, + status: BrandDev::Models::WebhookDelivery::status + } + + type error = { code: String, message: String } + + class Error < BrandDev::Internal::Type::BaseModel + attr_accessor code: String + + attr_accessor message: String + + def initialize: (code: String, message: String) -> void + + def to_hash: -> { code: String, message: String } + end + + type event = :"change.detected" | :"run.completed" + + module Event + extend BrandDev::Internal::Type::Enum + + CHANGE_DETECTED: :"change.detected" + RUN_COMPLETED: :"run.completed" + + def self?.values: -> ::Array[BrandDev::Models::WebhookDelivery::event] + end + + type status = :delivered | :rejected | :failed | :skipped_unsafe_url + + module Status + extend BrandDev::Internal::Type::Enum + + DELIVERED: :delivered + REJECTED: :rejected + FAILED: :failed + SKIPPED_UNSAFE_URL: :skipped_unsafe_url + + def self?.values: -> ::Array[BrandDev::Models::WebhookDelivery::status] + end + end + end +end diff --git a/sig/brand_dev/resources/batch.rbs b/sig/brand_dev/resources/batch.rbs new file mode 100644 index 00000000..2a8fbc92 --- /dev/null +++ b/sig/brand_dev/resources/batch.rbs @@ -0,0 +1,7 @@ +module BrandDev + module Resources + class Batch + def initialize: (client: BrandDev::Client) -> void + end + end +end diff --git a/sig/brand_dev/resources/brand.rbs b/sig/brand_dev/resources/brand.rbs index 9b9be50b..f3017fe9 100644 --- a/sig/brand_dev/resources/brand.rbs +++ b/sig/brand_dev/resources/brand.rbs @@ -2,15 +2,22 @@ module BrandDev module Resources class Brand def retrieve: ( - domain: String, - ?force_language: BrandDev::Models::BrandRetrieveParams::force_language, - ?max_speed: bool, + ?domain: String, + ?force_language: BrandDev::Models::BrandRetrieveParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveParams::max_speed, + ?name: String, + ?tags: ::Array[String], + ?ticker: String, + ?ticker_exchange: BrandDev::Models::BrandRetrieveParams::ticker_exchange, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandRetrieveResponse def ai_product: ( url: String, + ?max_age_ms: Integer, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandAIProductResponse @@ -24,12 +31,16 @@ module BrandDev data_to_extract: ::Array[BrandDev::BrandAIQueryParams::DataToExtract], domain: String, ?specific_pages: BrandDev::BrandAIQueryParams::SpecificPages, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandAIQueryResponse def fonts: ( - domain: String, + ?direct_url: String, + ?domain: String, + ?max_age_ms: Integer?, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandFontsResponse @@ -38,39 +49,46 @@ module BrandDev transaction_info: String, ?city: String, ?country_gl: BrandDev::Models::BrandIdentifyFromTransactionParams::country_gl, - ?force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language, - ?high_confidence_only: bool, - ?max_speed: bool, - ?mcc: String, - ?phone: Float, + ?force_language: BrandDev::Models::BrandIdentifyFromTransactionParams::force_language?, + ?high_confidence_only: BrandDev::Models::BrandIdentifyFromTransactionParams::high_confidence_only, + ?max_speed: BrandDev::Models::BrandIdentifyFromTransactionParams::max_speed, + ?mcc: BrandDev::Models::BrandIdentifyFromTransactionParams::mcc, + ?phone: BrandDev::Models::BrandIdentifyFromTransactionParams::phone, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandIdentifyFromTransactionResponse def prefetch: ( domain: String, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandPrefetchResponse def prefetch_by_email: ( email: String, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandPrefetchByEmailResponse def retrieve_by_email: ( email: String, - ?force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language, - ?max_speed: bool, + ?force_language: BrandDev::Models::BrandRetrieveByEmailParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveByEmailParams::max_speed, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandRetrieveByEmailResponse def retrieve_by_isin: ( isin: String, - ?force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language, - ?max_speed: bool, + ?force_language: BrandDev::Models::BrandRetrieveByIsinParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveByIsinParams::max_speed, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandRetrieveByIsinResponse @@ -78,16 +96,20 @@ module BrandDev def retrieve_by_name: ( name: String, ?country_gl: BrandDev::Models::BrandRetrieveByNameParams::country_gl, - ?force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language, - ?max_speed: bool, + ?force_language: BrandDev::Models::BrandRetrieveByNameParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveByNameParams::max_speed, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandRetrieveByNameResponse def retrieve_by_ticker: ( ticker: String, - ?force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language, - ?max_speed: bool, + ?force_language: BrandDev::Models::BrandRetrieveByTickerParams::force_language?, + ?max_age_ms: Integer?, + ?max_speed: BrandDev::Models::BrandRetrieveByTickerParams::max_speed, + ?tags: ::Array[String], ?ticker_exchange: BrandDev::Models::BrandRetrieveByTickerParams::ticker_exchange, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts @@ -97,53 +119,111 @@ module BrandDev input: String, ?max_results: Integer, ?min_results: Integer, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandRetrieveNaicsResponse def retrieve_simplified: ( domain: String, + ?max_age_ms: Integer?, + ?tags: ::Array[String], + ?theme: BrandDev::Models::BrandRetrieveSimplifiedParams::theme, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandRetrieveSimplifiedResponse def screenshot: ( - domain: String, + ?color_scheme: BrandDev::Models::BrandScreenshotParams::color_scheme, + ?country: BrandDev::Models::BrandScreenshotParams::country, + ?direct_url: String, + ?domain: String, ?full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot, + ?handle_cookie_popup: BrandDev::Models::BrandScreenshotParams::handle_cookie_popup, + ?max_age_ms: Integer?, ?page: BrandDev::Models::BrandScreenshotParams::page, - ?prioritize: BrandDev::Models::BrandScreenshotParams::prioritize, + ?scroll_offset: Integer?, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?viewport: BrandDev::BrandScreenshotParams::Viewport, + ?wait_for_ms: Integer?, + ?zdr: BrandDev::Models::BrandScreenshotParams::zdr, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandScreenshotResponse def styleguide: ( + ?color_scheme: BrandDev::Models::BrandStyleguideParams::color_scheme, ?direct_url: String, ?domain: String, + ?max_age_ms: Integer?, + ?tags: ::Array[String], ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandStyleguideResponse def web_scrape_html: ( url: String, + ?actions: ::Array[BrandDev::Models::BrandWebScrapeHTMLParams::action]?, + ?country: BrandDev::Models::BrandWebScrapeHTMLParams::country, + ?exclude_selectors: ::Array[String]?, + ?headers: ::Hash[Symbol, String], + ?include_frames: BrandDev::Models::BrandWebScrapeHTMLParams::include_frames, + ?include_selectors: ::Array[String]?, + ?max_age_ms: Integer?, + ?pdf: BrandDev::BrandWebScrapeHTMLParams::Pdf, + ?settle_animations: BrandDev::Models::BrandWebScrapeHTMLParams::settle_animations, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?use_main_content_only: BrandDev::Models::BrandWebScrapeHTMLParams::use_main_content_only, + ?wait_for_ms: Integer?, + ?zdr: BrandDev::Models::BrandWebScrapeHTMLParams::zdr, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandWebScrapeHTMLResponse def web_scrape_images: ( url: String, + ?actions: ::Array[BrandDev::Models::BrandWebScrapeImagesParams::action]?, + ?dedupe: BrandDev::Models::BrandWebScrapeImagesParams::dedupe, + ?enrichment: BrandDev::BrandWebScrapeImagesParams::Enrichment?, + ?headers: ::Hash[Symbol, String], + ?max_age_ms: Integer?, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?wait_for_ms: Integer?, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandWebScrapeImagesResponse def web_scrape_md: ( url: String, - ?include_images: bool, - ?include_links: bool, - ?shorten_base64_images: bool, - ?use_main_content_only: bool, + ?actions: ::Array[BrandDev::Models::BrandWebScrapeMdParams::action]?, + ?country: BrandDev::Models::BrandWebScrapeMdParams::country, + ?exclude_selectors: ::Array[String]?, + ?headers: ::Hash[Symbol, String], + ?include_frames: BrandDev::Models::BrandWebScrapeMdParams::include_frames, + ?include_images: BrandDev::Models::BrandWebScrapeMdParams::include_images, + ?include_links: BrandDev::Models::BrandWebScrapeMdParams::include_links, + ?include_selectors: ::Array[String]?, + ?max_age_ms: Integer?, + ?pdf: BrandDev::BrandWebScrapeMdParams::Pdf, + ?settle_animations: BrandDev::Models::BrandWebScrapeMdParams::settle_animations, + ?shorten_base64_images: BrandDev::Models::BrandWebScrapeMdParams::shorten_base64_images, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?use_main_content_only: BrandDev::Models::BrandWebScrapeMdParams::use_main_content_only, + ?wait_for_ms: Integer?, + ?zdr: BrandDev::Models::BrandWebScrapeMdParams::zdr, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandWebScrapeMdResponse def web_scrape_sitemap: ( domain: String, + ?headers: ::Hash[Symbol, String], ?max_links: Integer, + ?sitemap_url: String, + ?tags: ::Array[String], + ?timeout_ms: Integer, + ?url_regex: String, + ?zdr: BrandDev::Models::BrandWebScrapeSitemapParams::zdr, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandWebScrapeSitemapResponse diff --git a/sig/brand_dev/resources/monitors.rbs b/sig/brand_dev/resources/monitors.rbs new file mode 100644 index 00000000..762a2842 --- /dev/null +++ b/sig/brand_dev/resources/monitors.rbs @@ -0,0 +1,7 @@ +module BrandDev + module Resources + class Monitors + def initialize: (client: BrandDev::Client) -> void + end + end +end diff --git a/test/brand_dev/client_test.rb b/test/brand_dev/client_test.rb index ece2b3af..89c8b1f0 100644 --- a/test/brand_dev/client_test.rb +++ b/test/brand_dev/client_test.rb @@ -40,7 +40,7 @@ def test_client_default_request_default_retry_attempts brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve(domain: "domain") + brand_dev.brand.retrieve end assert_requested(:any, /./, times: 3) @@ -52,7 +52,7 @@ def test_client_given_request_default_retry_attempts brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key", max_retries: 3) assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve(domain: "domain") + brand_dev.brand.retrieve end assert_requested(:any, /./, times: 4) @@ -64,7 +64,7 @@ def test_client_default_request_given_retry_attempts brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve(domain: "domain", request_options: {max_retries: 3}) + brand_dev.brand.retrieve(request_options: {max_retries: 3}) end assert_requested(:any, /./, times: 4) @@ -76,7 +76,7 @@ def test_client_given_request_given_retry_attempts brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key", max_retries: 3) assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve(domain: "domain", request_options: {max_retries: 4}) + brand_dev.brand.retrieve(request_options: {max_retries: 4}) end assert_requested(:any, /./, times: 5) @@ -92,7 +92,7 @@ def test_client_retry_after_seconds brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key", max_retries: 1) assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve(domain: "domain") + brand_dev.brand.retrieve end assert_requested(:any, /./, times: 2) @@ -112,7 +112,7 @@ def test_client_retry_after_date Thread.current.thread_variable_set(:time_now, time_now) assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve(domain: "domain") + brand_dev.brand.retrieve end Thread.current.thread_variable_set(:time_now, nil) @@ -130,7 +130,7 @@ def test_client_retry_after_ms brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key", max_retries: 1) assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve(domain: "domain") + brand_dev.brand.retrieve end assert_requested(:any, /./, times: 2) @@ -143,7 +143,7 @@ def test_retry_count_header brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve(domain: "domain") + brand_dev.brand.retrieve end 3.times do @@ -157,10 +157,7 @@ def test_omit_retry_count_header brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve( - domain: "domain", - request_options: {extra_headers: {"x-stainless-retry-count" => nil}} - ) + brand_dev.brand.retrieve(request_options: {extra_headers: {"x-stainless-retry-count" => nil}}) end assert_requested(:any, /./, times: 3) do @@ -174,10 +171,7 @@ def test_overwrite_retry_count_header brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") assert_raises(BrandDev::Errors::InternalServerError) do - brand_dev.brand.retrieve( - domain: "domain", - request_options: {extra_headers: {"x-stainless-retry-count" => "42"}} - ) + brand_dev.brand.retrieve(request_options: {extra_headers: {"x-stainless-retry-count" => "42"}}) end assert_requested(:any, /./, headers: {"x-stainless-retry-count" => "42"}, times: 3) @@ -197,7 +191,7 @@ def test_client_redirect_307 brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") assert_raises(BrandDev::Errors::APIConnectionError) do - brand_dev.brand.retrieve(domain: "domain", request_options: {extra_headers: {}}) + brand_dev.brand.retrieve(request_options: {extra_headers: {}}) end recorded, = WebMock::RequestRegistry.instance.requested_signatures.hash.first @@ -206,8 +200,8 @@ def test_client_redirect_307 assert_equal(recorded.method, _1.method) assert_equal(recorded.body, _1.body) assert_equal( - recorded.headers.transform_keys(&:downcase).fetch("content-type"), - _1.headers.transform_keys(&:downcase).fetch("content-type") + recorded.headers.transform_keys(&:downcase)["content-type"], + _1.headers.transform_keys(&:downcase)["content-type"] ) end end @@ -226,7 +220,7 @@ def test_client_redirect_303 brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") assert_raises(BrandDev::Errors::APIConnectionError) do - brand_dev.brand.retrieve(domain: "domain", request_options: {extra_headers: {}}) + brand_dev.brand.retrieve(request_options: {extra_headers: {}}) end assert_requested(:get, "http://localhost/redirected", times: BrandDev::Client::MAX_REDIRECTS) do @@ -250,10 +244,7 @@ def test_client_redirect_auth_keep_same_origin brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") assert_raises(BrandDev::Errors::APIConnectionError) do - brand_dev.brand.retrieve( - domain: "domain", - request_options: {extra_headers: {"authorization" => "Bearer xyz"}} - ) + brand_dev.brand.retrieve(request_options: {extra_headers: {"authorization" => "Bearer xyz"}}) end recorded, = WebMock::RequestRegistry.instance.requested_signatures.hash.first @@ -280,10 +271,7 @@ def test_client_redirect_auth_strip_cross_origin brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") assert_raises(BrandDev::Errors::APIConnectionError) do - brand_dev.brand.retrieve( - domain: "domain", - request_options: {extra_headers: {"authorization" => "Bearer xyz"}} - ) + brand_dev.brand.retrieve(request_options: {extra_headers: {"authorization" => "Bearer xyz"}}) end assert_requested(:any, "https://example.com/redirected", times: BrandDev::Client::MAX_REDIRECTS) do @@ -297,11 +285,12 @@ def test_default_headers brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key") - brand_dev.brand.retrieve(domain: "domain") + brand_dev.brand.retrieve assert_requested(:any, /./) do |req| - headers = req.headers.transform_keys(&:downcase).fetch_values("accept", "content-type") - headers.each { refute_empty(_1) } + headers = req.headers.transform_keys(&:downcase) + expected = req.body.nil? ? ["accept"] : %w[accept content-type] + headers.fetch_values(*expected).each { refute_empty(_1) } end end end diff --git a/test/brand_dev/resources/batch_test.rb b/test/brand_dev/resources/batch_test.rb new file mode 100644 index 00000000..cb2234cb --- /dev/null +++ b/test/brand_dev/resources/batch_test.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class BrandDev::Test::Resources::BatchTest < BrandDev::Test::ResourceTest +end diff --git a/test/brand_dev/resources/brand_test.rb b/test/brand_dev/resources/brand_test.rb index bbd54590..69e32c4d 100644 --- a/test/brand_dev/resources/brand_test.rb +++ b/test/brand_dev/resources/brand_test.rb @@ -3,10 +3,10 @@ require_relative "../test_helper" class BrandDev::Test::Resources::BrandTest < BrandDev::Test::ResourceTest - def test_retrieve_required_params + def test_retrieve skip("Mock server tests are disabled") - response = @brand_dev.brand.retrieve(domain: "domain") + response = @brand_dev.brand.retrieve assert_pattern do response => BrandDev::Models::BrandRetrieveResponse @@ -16,6 +16,7 @@ def test_retrieve_required_params response => { brand: BrandDev::Models::BrandRetrieveResponse::Brand | nil, code: Integer | nil, + key_metadata: BrandDev::Models::BrandRetrieveResponse::KeyMetadata | nil, status: String | nil } end @@ -33,6 +34,7 @@ def test_ai_product_required_params assert_pattern do response => { is_product_page: BrandDev::Internal::Type::Boolean | nil, + key_metadata: BrandDev::Models::BrandAIProductResponse::KeyMetadata | nil, platform: BrandDev::Models::BrandAIProductResponse::Platform | nil, product: BrandDev::Models::BrandAIProductResponse::Product | nil } @@ -50,6 +52,7 @@ def test_ai_products_required_params assert_pattern do response => { + key_metadata: BrandDev::Models::BrandAIProductsResponse::KeyMetadata | nil, products: ^(BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandAIProductsResponse::Product]) | nil } end @@ -79,16 +82,17 @@ def test_ai_query_required_params response => { data_extracted: ^(BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandAIQueryResponse::DataExtracted]) | nil, domain: String | nil, + key_metadata: BrandDev::Models::BrandAIQueryResponse::KeyMetadata | nil, status: String | nil, urls_analyzed: ^(BrandDev::Internal::Type::ArrayOf[String]) | nil } end end - def test_fonts_required_params + def test_fonts skip("Mock server tests are disabled") - response = @brand_dev.brand.fonts(domain: "domain") + response = @brand_dev.brand.fonts assert_pattern do response => BrandDev::Models::BrandFontsResponse @@ -99,7 +103,9 @@ def test_fonts_required_params code: Integer, domain: String, fonts: ^(BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandFontsResponse::Font]), - status: String + status: String, + font_links: ^(BrandDev::Internal::Type::HashOf[BrandDev::Models::BrandFontsResponse::FontLink]) | nil, + key_metadata: BrandDev::Models::BrandFontsResponse::KeyMetadata | nil } end end @@ -107,7 +113,7 @@ def test_fonts_required_params def test_identify_from_transaction_required_params skip("Mock server tests are disabled") - response = @brand_dev.brand.identify_from_transaction(transaction_info: "transaction_info") + response = @brand_dev.brand.identify_from_transaction(transaction_info: "xxx") assert_pattern do response => BrandDev::Models::BrandIdentifyFromTransactionResponse @@ -117,6 +123,7 @@ def test_identify_from_transaction_required_params response => { brand: BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand | nil, code: Integer | nil, + key_metadata: BrandDev::Models::BrandIdentifyFromTransactionResponse::KeyMetadata | nil, status: String | nil } end @@ -134,6 +141,7 @@ def test_prefetch_required_params assert_pattern do response => { domain: String | nil, + key_metadata: BrandDev::Models::BrandPrefetchResponse::KeyMetadata | nil, message: String | nil, status: String | nil } @@ -152,6 +160,7 @@ def test_prefetch_by_email_required_params assert_pattern do response => { domain: String | nil, + key_metadata: BrandDev::Models::BrandPrefetchByEmailResponse::KeyMetadata | nil, message: String | nil, status: String | nil } @@ -171,6 +180,7 @@ def test_retrieve_by_email_required_params response => { brand: BrandDev::Models::BrandRetrieveByEmailResponse::Brand | nil, code: Integer | nil, + key_metadata: BrandDev::Models::BrandRetrieveByEmailResponse::KeyMetadata | nil, status: String | nil } end @@ -189,6 +199,7 @@ def test_retrieve_by_isin_required_params response => { brand: BrandDev::Models::BrandRetrieveByIsinResponse::Brand | nil, code: Integer | nil, + key_metadata: BrandDev::Models::BrandRetrieveByIsinResponse::KeyMetadata | nil, status: String | nil } end @@ -207,6 +218,7 @@ def test_retrieve_by_name_required_params response => { brand: BrandDev::Models::BrandRetrieveByNameResponse::Brand | nil, code: Integer | nil, + key_metadata: BrandDev::Models::BrandRetrieveByNameResponse::KeyMetadata | nil, status: String | nil } end @@ -225,6 +237,7 @@ def test_retrieve_by_ticker_required_params response => { brand: BrandDev::Models::BrandRetrieveByTickerResponse::Brand | nil, code: Integer | nil, + key_metadata: BrandDev::Models::BrandRetrieveByTickerResponse::KeyMetadata | nil, status: String | nil } end @@ -233,7 +246,7 @@ def test_retrieve_by_ticker_required_params def test_retrieve_naics_required_params skip("Mock server tests are disabled") - response = @brand_dev.brand.retrieve_naics(input: "input") + response = @brand_dev.brand.retrieve_naics(input: "xxxx") assert_pattern do response => BrandDev::Models::BrandRetrieveNaicsResponse @@ -243,6 +256,7 @@ def test_retrieve_naics_required_params response => { codes: ^(BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveNaicsResponse::Code]) | nil, domain: String | nil, + key_metadata: BrandDev::Models::BrandRetrieveNaicsResponse::KeyMetadata | nil, status: String | nil, type: String | nil } @@ -252,7 +266,7 @@ def test_retrieve_naics_required_params def test_retrieve_simplified_required_params skip("Mock server tests are disabled") - response = @brand_dev.brand.retrieve_simplified(domain: "domain") + response = @brand_dev.brand.retrieve_simplified(domain: "xxx") assert_pattern do response => BrandDev::Models::BrandRetrieveSimplifiedResponse @@ -262,15 +276,16 @@ def test_retrieve_simplified_required_params response => { brand: BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand | nil, code: Integer | nil, + key_metadata: BrandDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata | nil, status: String | nil } end end - def test_screenshot_required_params + def test_screenshot skip("Mock server tests are disabled") - response = @brand_dev.brand.screenshot(domain: "domain") + response = @brand_dev.brand.screenshot assert_pattern do response => BrandDev::Models::BrandScreenshotResponse @@ -280,9 +295,12 @@ def test_screenshot_required_params response => { code: Integer | nil, domain: String | nil, + height: Integer | nil, + key_metadata: BrandDev::Models::BrandScreenshotResponse::KeyMetadata | nil, screenshot: String | nil, screenshot_type: BrandDev::Models::BrandScreenshotResponse::ScreenshotType | nil, - status: String | nil + status: String | nil, + width: Integer | nil } end end @@ -300,6 +318,7 @@ def test_styleguide response => { code: Integer | nil, domain: String | nil, + key_metadata: BrandDev::Models::BrandStyleguideResponse::KeyMetadata | nil, status: String | nil, styleguide: BrandDev::Models::BrandStyleguideResponse::Styleguide | nil } @@ -318,8 +337,13 @@ def test_web_scrape_html_required_params assert_pattern do response => { html: String, + metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::Metadata, success: BrandDev::Models::BrandWebScrapeHTMLResponse::Success, - url: String + type: BrandDev::Models::BrandWebScrapeHTMLResponse::Type, + url: String, + actions_applied: ^(BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandWebScrapeHTMLResponse::ActionsApplied]) | nil, + actions_html_stale: BrandDev::Internal::Type::Boolean | nil, + key_metadata: BrandDev::Models::BrandWebScrapeHTMLResponse::KeyMetadata | nil } end end @@ -337,7 +361,8 @@ def test_web_scrape_images_required_params response => { images: ^(BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandWebScrapeImagesResponse::Image]), success: BrandDev::Models::BrandWebScrapeImagesResponse::Success, - url: String + url: String, + key_metadata: BrandDev::Models::BrandWebScrapeImagesResponse::KeyMetadata | nil } end end @@ -353,9 +378,14 @@ def test_web_scrape_md_required_params assert_pattern do response => { + content_length: Integer, markdown: String, + metadata: BrandDev::Models::BrandWebScrapeMdResponse::Metadata, success: BrandDev::Models::BrandWebScrapeMdResponse::Success, - url: String + url: String, + actions_applied: ^(BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandWebScrapeMdResponse::ActionsApplied]) | nil, + actions_html_stale: BrandDev::Internal::Type::Boolean | nil, + key_metadata: BrandDev::Models::BrandWebScrapeMdResponse::KeyMetadata | nil } end end @@ -363,7 +393,7 @@ def test_web_scrape_md_required_params def test_web_scrape_sitemap_required_params skip("Mock server tests are disabled") - response = @brand_dev.brand.web_scrape_sitemap(domain: "domain") + response = @brand_dev.brand.web_scrape_sitemap(domain: "xxx") assert_pattern do response => BrandDev::Models::BrandWebScrapeSitemapResponse @@ -374,7 +404,8 @@ def test_web_scrape_sitemap_required_params domain: String, meta: BrandDev::Models::BrandWebScrapeSitemapResponse::Meta, success: BrandDev::Models::BrandWebScrapeSitemapResponse::Success, - urls: ^(BrandDev::Internal::Type::ArrayOf[String]) + urls: ^(BrandDev::Internal::Type::ArrayOf[String]), + key_metadata: BrandDev::Models::BrandWebScrapeSitemapResponse::KeyMetadata | nil } end end diff --git a/test/brand_dev/resources/monitors_test.rb b/test/brand_dev/resources/monitors_test.rb new file mode 100644 index 00000000..cbd94d47 --- /dev/null +++ b/test/brand_dev/resources/monitors_test.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class BrandDev::Test::Resources::MonitorsTest < BrandDev::Test::ResourceTest +end