brand.dev 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,25 +9,31 @@ export class Brand extends APIResource {
9
9
  * Retrieve logos, backdrops, colors, industry, description, and more from any
10
10
  * domain
11
11
  */
12
- retrieve(
13
- query: BrandRetrieveParams | null | undefined = {},
14
- options?: RequestOptions,
15
- ): APIPromise<BrandRetrieveResponse> {
12
+ retrieve(query: BrandRetrieveParams, options?: RequestOptions): APIPromise<BrandRetrieveResponse> {
16
13
  return this._client.get('/brand/retrieve', { query, ...options });
17
14
  }
18
15
 
19
16
  /**
20
- * Beta feature: Use AI to extract specific data points from a brand's website. The
21
- * AI will crawl the website and extract the requested information based on the
22
- * provided data points.
17
+ * Beta feature: Extract product information from a brand's website. Brand.dev will
18
+ * analyze the website and return a list of products with details such as name,
19
+ * description, image, pricing, features, and more.
20
+ */
21
+ aiProducts(body: BrandAIProductsParams, options?: RequestOptions): APIPromise<BrandAIProductsResponse> {
22
+ return this._client.post('/brand/ai/products', { body, ...options });
23
+ }
24
+
25
+ /**
26
+ * Use AI to extract specific data points from a brand's website. The AI will crawl
27
+ * the website and extract the requested information based on the provided data
28
+ * points.
23
29
  */
24
30
  aiQuery(body: BrandAIQueryParams, options?: RequestOptions): APIPromise<BrandAIQueryResponse> {
25
31
  return this._client.post('/brand/ai/query', { body, ...options });
26
32
  }
27
33
 
28
34
  /**
29
- * Beta feature: Extract font information from a brand's website including font
30
- * families, usage statistics, fallbacks, and element/word counts.
35
+ * Extract font information from a brand's website including font families, usage
36
+ * statistics, fallbacks, and element/word counts.
31
37
  */
32
38
  fonts(query: BrandFontsParams, options?: RequestOptions): APIPromise<BrandFontsResponse> {
33
39
  return this._client.get('/brand/fonts', { query, ...options });
@@ -139,19 +145,18 @@ export class Brand extends APIResource {
139
145
  }
140
146
 
141
147
  /**
142
- * Beta feature: Capture a screenshot of a website. Supports both viewport
143
- * (standard browser view) and full-page screenshots. Can also screenshot specific
144
- * page types (login, pricing, etc.) by using heuristics to find the appropriate
145
- * URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
148
+ * Capture a screenshot of a website. Supports both viewport (standard browser
149
+ * view) and full-page screenshots. Can also screenshot specific page types (login,
150
+ * pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
151
+ * the uploaded screenshot image hosted on our CDN.
146
152
  */
147
153
  screenshot(query: BrandScreenshotParams, options?: RequestOptions): APIPromise<BrandScreenshotResponse> {
148
154
  return this._client.get('/brand/screenshot', { query, ...options });
149
155
  }
150
156
 
151
157
  /**
152
- * Beta feature: Automatically extract comprehensive design system information from
153
- * a brand's website including colors, typography, spacing, shadows, and UI
154
- * components.
158
+ * Automatically extract comprehensive design system information from a brand's
159
+ * website including colors, typography, spacing, shadows, and UI components.
155
160
  */
156
161
  styleguide(query: BrandStyleguideParams, options?: RequestOptions): APIPromise<BrandStyleguideResponse> {
157
162
  return this._client.get('/brand/styleguide', { query, ...options });
@@ -757,6 +762,77 @@ export namespace BrandRetrieveResponse {
757
762
  }
758
763
  }
759
764
 
765
+ export interface BrandAIProductsResponse {
766
+ /**
767
+ * Array of products extracted from the website
768
+ */
769
+ products?: Array<BrandAIProductsResponse.Product>;
770
+ }
771
+
772
+ export namespace BrandAIProductsResponse {
773
+ export interface Product {
774
+ /**
775
+ * Description of the product
776
+ */
777
+ description: string;
778
+
779
+ /**
780
+ * List of product features
781
+ */
782
+ features: Array<string>;
783
+
784
+ /**
785
+ * Name of the product
786
+ */
787
+ name: string;
788
+
789
+ /**
790
+ * Tags associated with the product
791
+ */
792
+ tags: Array<string>;
793
+
794
+ /**
795
+ * Target audience for the product (array of strings)
796
+ */
797
+ target_audience: Array<string>;
798
+
799
+ /**
800
+ * Billing frequency for the product
801
+ */
802
+ billing_frequency?: 'monthly' | 'yearly' | 'one_time' | 'usage_based' | null;
803
+
804
+ /**
805
+ * Category of the product
806
+ */
807
+ category?: string | null;
808
+
809
+ /**
810
+ * Currency code for the price (e.g., USD, EUR)
811
+ */
812
+ currency?: string | null;
813
+
814
+ /**
815
+ * URL to the product image
816
+ */
817
+ image_url?: string | null;
818
+
819
+ /**
820
+ * Price of the product
821
+ */
822
+ price?: number | null;
823
+
824
+ /**
825
+ * Pricing model for the product
826
+ */
827
+ pricing_model?: 'per_seat' | 'flat' | 'tiered' | 'freemium' | 'custom' | null;
828
+
829
+ /**
830
+ * URL to the product page
831
+ */
832
+ url?: string | null;
833
+ }
834
+ }
835
+
760
836
  export interface BrandAIQueryResponse {
761
837
  /**
762
838
  * Array of extracted data points
@@ -4511,7 +4587,7 @@ export interface BrandRetrieveParams {
4511
4587
  * Domain name to retrieve brand data for (e.g., 'example.com', 'google.com').
4512
4588
  * Cannot be used with name or ticker parameters.
4513
4589
  */
4514
- domain?: string;
4590
+ domain: string;
4515
4591
 
4516
4592
  /**
4517
4593
  * Optional parameter to force the language of the retrieved brand data. Works with
@@ -4586,6 +4662,25 @@ export interface BrandRetrieveParams {
4586
4662
  timeoutMS?: number;
4587
4663
  }
4588
4664
 
4665
+ export interface BrandAIProductsParams {
4666
+ /**
4667
+ * The domain name to analyze
4668
+ */
4669
+ domain: string;
4670
+
4671
+ /**
4672
+ * Maximum number of products to extract.
4673
+ */
4674
+ maxProducts?: number;
4675
+
4676
+ /**
4677
+ * Optional timeout in milliseconds for the request. If the request takes longer
4678
+ * than this value, it will be aborted with a 408 status code. Maximum allowed
4679
+ * value is 300000ms (5 minutes).
4680
+ */
4681
+ timeoutMS?: number;
4682
+ }
4683
+
4589
4684
  export interface BrandAIQueryParams {
4590
4685
  /**
4591
4686
  * Array of data points to extract from the website
@@ -5572,6 +5667,7 @@ export interface BrandStyleguideParams {
5572
5667
  export declare namespace Brand {
5573
5668
  export {
5574
5669
  type BrandRetrieveResponse as BrandRetrieveResponse,
5670
+ type BrandAIProductsResponse as BrandAIProductsResponse,
5575
5671
  type BrandAIQueryResponse as BrandAIQueryResponse,
5576
5672
  type BrandFontsResponse as BrandFontsResponse,
5577
5673
  type BrandIdentifyFromTransactionResponse as BrandIdentifyFromTransactionResponse,
@@ -5586,6 +5682,7 @@ export declare namespace Brand {
5586
5682
  type BrandScreenshotResponse as BrandScreenshotResponse,
5587
5683
  type BrandStyleguideResponse as BrandStyleguideResponse,
5588
5684
  type BrandRetrieveParams as BrandRetrieveParams,
5685
+ type BrandAIProductsParams as BrandAIProductsParams,
5589
5686
  type BrandAIQueryParams as BrandAIQueryParams,
5590
5687
  type BrandFontsParams as BrandFontsParams,
5591
5688
  type BrandIdentifyFromTransactionParams as BrandIdentifyFromTransactionParams,
@@ -3,6 +3,7 @@
3
3
  export {
4
4
  Brand,
5
5
  type BrandRetrieveResponse,
6
+ type BrandAIProductsResponse,
6
7
  type BrandAIQueryResponse,
7
8
  type BrandFontsResponse,
8
9
  type BrandIdentifyFromTransactionResponse,
@@ -17,6 +18,7 @@ export {
17
18
  type BrandScreenshotResponse,
18
19
  type BrandStyleguideResponse,
19
20
  type BrandRetrieveParams,
21
+ type BrandAIProductsParams,
20
22
  type BrandAIQueryParams,
21
23
  type BrandFontsParams,
22
24
  type BrandIdentifyFromTransactionParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.20.0'; // x-release-please-version
1
+ export const VERSION = '0.22.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.20.0";
1
+ export declare const VERSION = "0.22.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.20.0";
1
+ export declare const VERSION = "0.22.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.20.0'; // x-release-please-version
4
+ exports.VERSION = '0.22.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.20.0'; // x-release-please-version
1
+ export const VERSION = '0.22.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map