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.
- package/CHANGELOG.md +52 -0
- package/LICENSE +1 -1
- package/README.md +12 -1
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/brand.d.mts +94 -15
- package/resources/brand.d.mts.map +1 -1
- package/resources/brand.d.ts +94 -15
- package/resources/brand.d.ts.map +1 -1
- package/resources/brand.js +20 -13
- package/resources/brand.js.map +1 -1
- package/resources/brand.mjs +20 -13
- package/resources/brand.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +4 -0
- package/src/resources/brand.ts +114 -17
- package/src/resources/index.ts +2 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/brand.ts
CHANGED
|
@@ -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:
|
|
21
|
-
*
|
|
22
|
-
*
|
|
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
|
-
*
|
|
30
|
-
*
|
|
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
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
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
|
-
*
|
|
153
|
-
*
|
|
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
|
|
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,
|
package/src/resources/index.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
1
|
+
export declare const VERSION = "0.22.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.22.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|