brand.dev 0.19.0 → 0.21.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.
@@ -17,17 +17,26 @@ export class Brand extends APIResource {
17
17
  }
18
18
 
19
19
  /**
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.
20
+ * Beta feature: Extract product information from a brand's website. Brand.dev will
21
+ * analyze the website and return a list of products with details such as name,
22
+ * description, image, pricing, features, and more.
23
+ */
24
+ aiProducts(body: BrandAIProductsParams, options?: RequestOptions): APIPromise<BrandAIProductsResponse> {
25
+ return this._client.post('/brand/ai/products', { body, ...options });
26
+ }
27
+
28
+ /**
29
+ * Use AI to extract specific data points from a brand's website. The AI will crawl
30
+ * the website and extract the requested information based on the provided data
31
+ * points.
23
32
  */
24
33
  aiQuery(body: BrandAIQueryParams, options?: RequestOptions): APIPromise<BrandAIQueryResponse> {
25
34
  return this._client.post('/brand/ai/query', { body, ...options });
26
35
  }
27
36
 
28
37
  /**
29
- * Beta feature: Extract font information from a brand's website including font
30
- * families, usage statistics, fallbacks, and element/word counts.
38
+ * Extract font information from a brand's website including font families, usage
39
+ * statistics, fallbacks, and element/word counts.
31
40
  */
32
41
  fonts(query: BrandFontsParams, options?: RequestOptions): APIPromise<BrandFontsResponse> {
33
42
  return this._client.get('/brand/fonts', { query, ...options });
@@ -54,6 +63,21 @@ export class Brand extends APIResource {
54
63
  return this._client.post('/brand/prefetch', { body, ...options });
55
64
  }
56
65
 
66
+ /**
67
+ * Signal that you may fetch brand data for a particular domain soon to improve
68
+ * latency. This endpoint accepts an email address, extracts the domain from it,
69
+ * validates that it's not a disposable or free email provider, and queues the
70
+ * domain for prefetching. This endpoint does not charge credits and is available
71
+ * for paid customers to optimize future requests. [You must be on a paid plan to
72
+ * use this endpoint]
73
+ */
74
+ prefetchByEmail(
75
+ body: BrandPrefetchByEmailParams,
76
+ options?: RequestOptions,
77
+ ): APIPromise<BrandPrefetchByEmailResponse> {
78
+ return this._client.post('/brand/prefetch-by-email', { body, ...options });
79
+ }
80
+
57
81
  /**
58
82
  * Retrieve brand information using an email address while detecting disposable and
59
83
  * free email addresses. This endpoint extracts the domain from the email address
@@ -124,19 +148,18 @@ export class Brand extends APIResource {
124
148
  }
125
149
 
126
150
  /**
127
- * Beta feature: Capture a screenshot of a website. Supports both viewport
128
- * (standard browser view) and full-page screenshots. Can also screenshot specific
129
- * page types (login, pricing, etc.) by using heuristics to find the appropriate
130
- * URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
151
+ * Capture a screenshot of a website. Supports both viewport (standard browser
152
+ * view) and full-page screenshots. Can also screenshot specific page types (login,
153
+ * pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
154
+ * the uploaded screenshot image hosted on our CDN.
131
155
  */
132
156
  screenshot(query: BrandScreenshotParams, options?: RequestOptions): APIPromise<BrandScreenshotResponse> {
133
157
  return this._client.get('/brand/screenshot', { query, ...options });
134
158
  }
135
159
 
136
160
  /**
137
- * Beta feature: Automatically extract comprehensive design system information from
138
- * a brand's website including colors, typography, spacing, shadows, and UI
139
- * components.
161
+ * Automatically extract comprehensive design system information from a brand's
162
+ * website including colors, typography, spacing, shadows, and UI components.
140
163
  */
141
164
  styleguide(query: BrandStyleguideParams, options?: RequestOptions): APIPromise<BrandStyleguideResponse> {
142
165
  return this._client.get('/brand/styleguide', { query, ...options });
@@ -742,6 +765,77 @@ export namespace BrandRetrieveResponse {
742
765
  }
743
766
  }
744
767
 
768
+ export interface BrandAIProductsResponse {
769
+ /**
770
+ * Array of products extracted from the website
771
+ */
772
+ products?: Array<BrandAIProductsResponse.Product>;
773
+ }
774
+
775
+ export namespace BrandAIProductsResponse {
776
+ export interface Product {
777
+ /**
778
+ * Description of the product
779
+ */
780
+ description: string;
781
+
782
+ /**
783
+ * List of product features
784
+ */
785
+ features: Array<string>;
786
+
787
+ /**
788
+ * Name of the product
789
+ */
790
+ name: string;
791
+
792
+ /**
793
+ * Tags associated with the product
794
+ */
795
+ tags: Array<string>;
796
+
797
+ /**
798
+ * Target audience for the product (array of strings)
799
+ */
800
+ target_audience: Array<string>;
801
+
802
+ /**
803
+ * Billing frequency for the product
804
+ */
805
+ billing_frequency?: 'monthly' | 'yearly' | 'one_time' | 'usage_based' | null;
806
+
807
+ /**
808
+ * Category of the product
809
+ */
810
+ category?: string | null;
811
+
812
+ /**
813
+ * Currency code for the price (e.g., USD, EUR)
814
+ */
815
+ currency?: string | null;
816
+
817
+ /**
818
+ * URL to the product image
819
+ */
820
+ image_url?: string | null;
821
+
822
+ /**
823
+ * Price of the product
824
+ */
825
+ price?: number | null;
826
+
827
+ /**
828
+ * Pricing model for the product
829
+ */
830
+ pricing_model?: 'per_seat' | 'flat' | 'tiered' | 'freemium' | 'custom' | null;
831
+
832
+ /**
833
+ * URL to the product page
834
+ */
835
+ url?: string | null;
836
+ }
837
+ }
838
+
745
839
  export interface BrandAIQueryResponse {
746
840
  /**
747
841
  * Array of extracted data points
@@ -1456,6 +1550,23 @@ export interface BrandPrefetchResponse {
1456
1550
  status?: string;
1457
1551
  }
1458
1552
 
1553
+ export interface BrandPrefetchByEmailResponse {
1554
+ /**
1555
+ * The domain that was queued for prefetching
1556
+ */
1557
+ domain?: string;
1558
+
1559
+ /**
1560
+ * Success message
1561
+ */
1562
+ message?: string;
1563
+
1564
+ /**
1565
+ * Status of the response, e.g., 'ok'
1566
+ */
1567
+ status?: string;
1568
+ }
1569
+
1459
1570
  export interface BrandRetrieveByEmailResponse {
1460
1571
  /**
1461
1572
  * Detailed brand information
@@ -4554,6 +4665,25 @@ export interface BrandRetrieveParams {
4554
4665
  timeoutMS?: number;
4555
4666
  }
4556
4667
 
4668
+ export interface BrandAIProductsParams {
4669
+ /**
4670
+ * The domain name to analyze
4671
+ */
4672
+ domain: string;
4673
+
4674
+ /**
4675
+ * Maximum number of products to extract.
4676
+ */
4677
+ maxProducts?: number;
4678
+
4679
+ /**
4680
+ * Optional timeout in milliseconds for the request. If the request takes longer
4681
+ * than this value, it will be aborted with a 408 status code. Maximum allowed
4682
+ * value is 300000ms (5 minutes).
4683
+ */
4684
+ timeoutMS?: number;
4685
+ }
4686
+
4557
4687
  export interface BrandAIQueryParams {
4558
4688
  /**
4559
4689
  * Array of data points to extract from the website
@@ -5032,6 +5162,22 @@ export interface BrandPrefetchParams {
5032
5162
  timeoutMS?: number;
5033
5163
  }
5034
5164
 
5165
+ export interface BrandPrefetchByEmailParams {
5166
+ /**
5167
+ * Email address to prefetch brand data for. The domain will be extracted from the
5168
+ * email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email
5169
+ * addresses are not allowed.
5170
+ */
5171
+ email: string;
5172
+
5173
+ /**
5174
+ * Optional timeout in milliseconds for the request. If the request takes longer
5175
+ * than this value, it will be aborted with a 408 status code. Maximum allowed
5176
+ * value is 300000ms (5 minutes).
5177
+ */
5178
+ timeoutMS?: number;
5179
+ }
5180
+
5035
5181
  export interface BrandRetrieveByEmailParams {
5036
5182
  /**
5037
5183
  * Email address to retrieve brand data for (e.g., 'contact@example.com'). The
@@ -5524,10 +5670,12 @@ export interface BrandStyleguideParams {
5524
5670
  export declare namespace Brand {
5525
5671
  export {
5526
5672
  type BrandRetrieveResponse as BrandRetrieveResponse,
5673
+ type BrandAIProductsResponse as BrandAIProductsResponse,
5527
5674
  type BrandAIQueryResponse as BrandAIQueryResponse,
5528
5675
  type BrandFontsResponse as BrandFontsResponse,
5529
5676
  type BrandIdentifyFromTransactionResponse as BrandIdentifyFromTransactionResponse,
5530
5677
  type BrandPrefetchResponse as BrandPrefetchResponse,
5678
+ type BrandPrefetchByEmailResponse as BrandPrefetchByEmailResponse,
5531
5679
  type BrandRetrieveByEmailResponse as BrandRetrieveByEmailResponse,
5532
5680
  type BrandRetrieveByIsinResponse as BrandRetrieveByIsinResponse,
5533
5681
  type BrandRetrieveByNameResponse as BrandRetrieveByNameResponse,
@@ -5537,10 +5685,12 @@ export declare namespace Brand {
5537
5685
  type BrandScreenshotResponse as BrandScreenshotResponse,
5538
5686
  type BrandStyleguideResponse as BrandStyleguideResponse,
5539
5687
  type BrandRetrieveParams as BrandRetrieveParams,
5688
+ type BrandAIProductsParams as BrandAIProductsParams,
5540
5689
  type BrandAIQueryParams as BrandAIQueryParams,
5541
5690
  type BrandFontsParams as BrandFontsParams,
5542
5691
  type BrandIdentifyFromTransactionParams as BrandIdentifyFromTransactionParams,
5543
5692
  type BrandPrefetchParams as BrandPrefetchParams,
5693
+ type BrandPrefetchByEmailParams as BrandPrefetchByEmailParams,
5544
5694
  type BrandRetrieveByEmailParams as BrandRetrieveByEmailParams,
5545
5695
  type BrandRetrieveByIsinParams as BrandRetrieveByIsinParams,
5546
5696
  type BrandRetrieveByNameParams as BrandRetrieveByNameParams,
@@ -3,10 +3,12 @@
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,
9
10
  type BrandPrefetchResponse,
11
+ type BrandPrefetchByEmailResponse,
10
12
  type BrandRetrieveByEmailResponse,
11
13
  type BrandRetrieveByIsinResponse,
12
14
  type BrandRetrieveByNameResponse,
@@ -16,10 +18,12 @@ export {
16
18
  type BrandScreenshotResponse,
17
19
  type BrandStyleguideResponse,
18
20
  type BrandRetrieveParams,
21
+ type BrandAIProductsParams,
19
22
  type BrandAIQueryParams,
20
23
  type BrandFontsParams,
21
24
  type BrandIdentifyFromTransactionParams,
22
25
  type BrandPrefetchParams,
26
+ type BrandPrefetchByEmailParams,
23
27
  type BrandRetrieveByEmailParams,
24
28
  type BrandRetrieveByIsinParams,
25
29
  type BrandRetrieveByNameParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.19.0'; // x-release-please-version
1
+ export const VERSION = '0.21.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.19.0";
1
+ export declare const VERSION = "0.21.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.19.0";
1
+ export declare const VERSION = "0.21.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.19.0'; // x-release-please-version
4
+ exports.VERSION = '0.21.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.19.0'; // x-release-please-version
1
+ export const VERSION = '0.21.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map