context.dev 0.1.0 → 0.3.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +17 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +17 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +15 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +15 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai.d.mts +331 -0
  12. package/resources/ai.d.mts.map +1 -0
  13. package/resources/ai.d.ts +331 -0
  14. package/resources/ai.d.ts.map +1 -0
  15. package/resources/ai.js +33 -0
  16. package/resources/ai.js.map +1 -0
  17. package/resources/ai.mjs +29 -0
  18. package/resources/ai.mjs.map +1 -0
  19. package/resources/brand.d.mts +12 -1056
  20. package/resources/brand.d.mts.map +1 -1
  21. package/resources/brand.d.ts +12 -1056
  22. package/resources/brand.d.ts.map +1 -1
  23. package/resources/brand.js +0 -106
  24. package/resources/brand.js.map +1 -1
  25. package/resources/brand.mjs +0 -106
  26. package/resources/brand.mjs.map +1 -1
  27. package/resources/index.d.mts +6 -1
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +6 -1
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js +11 -1
  32. package/resources/index.js.map +1 -1
  33. package/resources/index.mjs +5 -0
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/industry.d.mts +70 -0
  36. package/resources/industry.d.mts.map +1 -0
  37. package/resources/industry.d.ts +70 -0
  38. package/resources/industry.d.ts.map +1 -0
  39. package/resources/industry.js +15 -0
  40. package/resources/industry.js.map +1 -0
  41. package/resources/industry.mjs +11 -0
  42. package/resources/industry.mjs.map +1 -0
  43. package/resources/style.d.mts +386 -0
  44. package/resources/style.d.mts.map +1 -0
  45. package/resources/style.d.ts +386 -0
  46. package/resources/style.d.ts.map +1 -0
  47. package/resources/style.js +25 -0
  48. package/resources/style.js.map +1 -0
  49. package/resources/style.mjs +21 -0
  50. package/resources/style.mjs.map +1 -0
  51. package/resources/utility.d.mts +79 -0
  52. package/resources/utility.d.mts.map +1 -0
  53. package/resources/utility.d.ts +79 -0
  54. package/resources/utility.d.ts.map +1 -0
  55. package/resources/utility.js +29 -0
  56. package/resources/utility.js.map +1 -0
  57. package/resources/utility.mjs +25 -0
  58. package/resources/utility.mjs.map +1 -0
  59. package/resources/web.d.mts +228 -0
  60. package/resources/web.d.mts.map +1 -0
  61. package/resources/web.d.ts +228 -0
  62. package/resources/web.d.ts.map +1 -0
  63. package/resources/web.js +49 -0
  64. package/resources/web.js.map +1 -0
  65. package/resources/web.mjs +45 -0
  66. package/resources/web.mjs.map +1 -0
  67. package/src/client.ts +93 -52
  68. package/src/resources/ai.ts +417 -0
  69. package/src/resources/brand.ts +318 -1424
  70. package/src/resources/index.ts +37 -26
  71. package/src/resources/industry.ts +92 -0
  72. package/src/resources/style.ts +522 -0
  73. package/src/resources/utility.ts +105 -0
  74. package/src/resources/web.ts +302 -0
  75. package/src/version.ts +1 -1
  76. package/version.d.mts +1 -1
  77. package/version.d.ts +1 -1
  78. package/version.js +1 -1
  79. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -17,22 +17,19 @@ import * as Errors from './core/error';
17
17
  import * as Uploads from './core/uploads';
18
18
  import * as API from './resources/index';
19
19
  import { APIPromise } from './core/api-promise';
20
+ import {
21
+ AI,
22
+ AIAIQueryParams,
23
+ AIAIQueryResponse,
24
+ AIExtractProductParams,
25
+ AIExtractProductResponse,
26
+ AIExtractProductsParams,
27
+ AIExtractProductsResponse,
28
+ } from './resources/ai';
20
29
  import {
21
30
  Brand,
22
- BrandAIProductParams,
23
- BrandAIProductResponse,
24
- BrandAIProductsParams,
25
- BrandAIProductsResponse,
26
- BrandAIQueryParams,
27
- BrandAIQueryResponse,
28
- BrandFontsParams,
29
- BrandFontsResponse,
30
31
  BrandIdentifyFromTransactionParams,
31
32
  BrandIdentifyFromTransactionResponse,
32
- BrandPrefetchByEmailParams,
33
- BrandPrefetchByEmailResponse,
34
- BrandPrefetchParams,
35
- BrandPrefetchResponse,
36
33
  BrandRetrieveByEmailParams,
37
34
  BrandRetrieveByEmailResponse,
38
35
  BrandRetrieveByIsinParams,
@@ -41,25 +38,39 @@ import {
41
38
  BrandRetrieveByNameResponse,
42
39
  BrandRetrieveByTickerParams,
43
40
  BrandRetrieveByTickerResponse,
44
- BrandRetrieveNaicsParams,
45
- BrandRetrieveNaicsResponse,
46
41
  BrandRetrieveParams,
47
42
  BrandRetrieveResponse,
48
43
  BrandRetrieveSimplifiedParams,
49
44
  BrandRetrieveSimplifiedResponse,
50
- BrandScreenshotParams,
51
- BrandScreenshotResponse,
52
- BrandStyleguideParams,
53
- BrandStyleguideResponse,
54
- BrandWebScrapeHTMLParams,
55
- BrandWebScrapeHTMLResponse,
56
- BrandWebScrapeImagesParams,
57
- BrandWebScrapeImagesResponse,
58
- BrandWebScrapeMdParams,
59
- BrandWebScrapeMdResponse,
60
- BrandWebScrapeSitemapParams,
61
- BrandWebScrapeSitemapResponse,
62
45
  } from './resources/brand';
46
+ import { Industry, IndustryRetrieveNaicsParams, IndustryRetrieveNaicsResponse } from './resources/industry';
47
+ import {
48
+ Style,
49
+ StyleExtractFontsParams,
50
+ StyleExtractFontsResponse,
51
+ StyleExtractStyleguideParams,
52
+ StyleExtractStyleguideResponse,
53
+ } from './resources/style';
54
+ import {
55
+ Utility,
56
+ UtilityPrefetchByEmailParams,
57
+ UtilityPrefetchByEmailResponse,
58
+ UtilityPrefetchParams,
59
+ UtilityPrefetchResponse,
60
+ } from './resources/utility';
61
+ import {
62
+ Web,
63
+ WebScreenshotParams,
64
+ WebScreenshotResponse,
65
+ WebWebScrapeHTMLParams,
66
+ WebWebScrapeHTMLResponse,
67
+ WebWebScrapeImagesParams,
68
+ WebWebScrapeImagesResponse,
69
+ WebWebScrapeMdParams,
70
+ WebWebScrapeMdResponse,
71
+ WebWebScrapeSitemapParams,
72
+ WebWebScrapeSitemapResponse,
73
+ } from './resources/web';
63
74
  import { type Fetch } from './internal/builtin-types';
64
75
  import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
65
76
  import { FinalRequestOptions, RequestOptions } from './internal/request-options';
@@ -760,55 +771,85 @@ export class ContextDev {
760
771
 
761
772
  static toFile = Uploads.toFile;
762
773
 
774
+ web: API.Web = new API.Web(this);
775
+ ai: API.AI = new API.AI(this);
776
+ style: API.Style = new API.Style(this);
763
777
  brand: API.Brand = new API.Brand(this);
778
+ industry: API.Industry = new API.Industry(this);
779
+ utility: API.Utility = new API.Utility(this);
764
780
  }
765
781
 
782
+ ContextDev.Web = Web;
783
+ ContextDev.AI = AI;
784
+ ContextDev.Style = Style;
766
785
  ContextDev.Brand = Brand;
786
+ ContextDev.Industry = Industry;
787
+ ContextDev.Utility = Utility;
767
788
 
768
789
  export declare namespace ContextDev {
769
790
  export type RequestOptions = Opts.RequestOptions;
770
791
 
792
+ export {
793
+ Web as Web,
794
+ type WebScreenshotResponse as WebScreenshotResponse,
795
+ type WebWebScrapeHTMLResponse as WebWebScrapeHTMLResponse,
796
+ type WebWebScrapeImagesResponse as WebWebScrapeImagesResponse,
797
+ type WebWebScrapeMdResponse as WebWebScrapeMdResponse,
798
+ type WebWebScrapeSitemapResponse as WebWebScrapeSitemapResponse,
799
+ type WebScreenshotParams as WebScreenshotParams,
800
+ type WebWebScrapeHTMLParams as WebWebScrapeHTMLParams,
801
+ type WebWebScrapeImagesParams as WebWebScrapeImagesParams,
802
+ type WebWebScrapeMdParams as WebWebScrapeMdParams,
803
+ type WebWebScrapeSitemapParams as WebWebScrapeSitemapParams,
804
+ };
805
+
806
+ export {
807
+ AI as AI,
808
+ type AIAIQueryResponse as AIAIQueryResponse,
809
+ type AIExtractProductResponse as AIExtractProductResponse,
810
+ type AIExtractProductsResponse as AIExtractProductsResponse,
811
+ type AIAIQueryParams as AIAIQueryParams,
812
+ type AIExtractProductParams as AIExtractProductParams,
813
+ type AIExtractProductsParams as AIExtractProductsParams,
814
+ };
815
+
816
+ export {
817
+ Style as Style,
818
+ type StyleExtractFontsResponse as StyleExtractFontsResponse,
819
+ type StyleExtractStyleguideResponse as StyleExtractStyleguideResponse,
820
+ type StyleExtractFontsParams as StyleExtractFontsParams,
821
+ type StyleExtractStyleguideParams as StyleExtractStyleguideParams,
822
+ };
823
+
771
824
  export {
772
825
  Brand as Brand,
773
826
  type BrandRetrieveResponse as BrandRetrieveResponse,
774
- type BrandAIProductResponse as BrandAIProductResponse,
775
- type BrandAIProductsResponse as BrandAIProductsResponse,
776
- type BrandAIQueryResponse as BrandAIQueryResponse,
777
- type BrandFontsResponse as BrandFontsResponse,
778
827
  type BrandIdentifyFromTransactionResponse as BrandIdentifyFromTransactionResponse,
779
- type BrandPrefetchResponse as BrandPrefetchResponse,
780
- type BrandPrefetchByEmailResponse as BrandPrefetchByEmailResponse,
781
828
  type BrandRetrieveByEmailResponse as BrandRetrieveByEmailResponse,
782
829
  type BrandRetrieveByIsinResponse as BrandRetrieveByIsinResponse,
783
830
  type BrandRetrieveByNameResponse as BrandRetrieveByNameResponse,
784
831
  type BrandRetrieveByTickerResponse as BrandRetrieveByTickerResponse,
785
- type BrandRetrieveNaicsResponse as BrandRetrieveNaicsResponse,
786
832
  type BrandRetrieveSimplifiedResponse as BrandRetrieveSimplifiedResponse,
787
- type BrandScreenshotResponse as BrandScreenshotResponse,
788
- type BrandStyleguideResponse as BrandStyleguideResponse,
789
- type BrandWebScrapeHTMLResponse as BrandWebScrapeHTMLResponse,
790
- type BrandWebScrapeImagesResponse as BrandWebScrapeImagesResponse,
791
- type BrandWebScrapeMdResponse as BrandWebScrapeMdResponse,
792
- type BrandWebScrapeSitemapResponse as BrandWebScrapeSitemapResponse,
793
833
  type BrandRetrieveParams as BrandRetrieveParams,
794
- type BrandAIProductParams as BrandAIProductParams,
795
- type BrandAIProductsParams as BrandAIProductsParams,
796
- type BrandAIQueryParams as BrandAIQueryParams,
797
- type BrandFontsParams as BrandFontsParams,
798
834
  type BrandIdentifyFromTransactionParams as BrandIdentifyFromTransactionParams,
799
- type BrandPrefetchParams as BrandPrefetchParams,
800
- type BrandPrefetchByEmailParams as BrandPrefetchByEmailParams,
801
835
  type BrandRetrieveByEmailParams as BrandRetrieveByEmailParams,
802
836
  type BrandRetrieveByIsinParams as BrandRetrieveByIsinParams,
803
837
  type BrandRetrieveByNameParams as BrandRetrieveByNameParams,
804
838
  type BrandRetrieveByTickerParams as BrandRetrieveByTickerParams,
805
- type BrandRetrieveNaicsParams as BrandRetrieveNaicsParams,
806
839
  type BrandRetrieveSimplifiedParams as BrandRetrieveSimplifiedParams,
807
- type BrandScreenshotParams as BrandScreenshotParams,
808
- type BrandStyleguideParams as BrandStyleguideParams,
809
- type BrandWebScrapeHTMLParams as BrandWebScrapeHTMLParams,
810
- type BrandWebScrapeImagesParams as BrandWebScrapeImagesParams,
811
- type BrandWebScrapeMdParams as BrandWebScrapeMdParams,
812
- type BrandWebScrapeSitemapParams as BrandWebScrapeSitemapParams,
840
+ };
841
+
842
+ export {
843
+ Industry as Industry,
844
+ type IndustryRetrieveNaicsResponse as IndustryRetrieveNaicsResponse,
845
+ type IndustryRetrieveNaicsParams as IndustryRetrieveNaicsParams,
846
+ };
847
+
848
+ export {
849
+ Utility as Utility,
850
+ type UtilityPrefetchResponse as UtilityPrefetchResponse,
851
+ type UtilityPrefetchByEmailResponse as UtilityPrefetchByEmailResponse,
852
+ type UtilityPrefetchParams as UtilityPrefetchParams,
853
+ type UtilityPrefetchByEmailParams as UtilityPrefetchByEmailParams,
813
854
  };
814
855
  }
@@ -0,0 +1,417 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class AI extends APIResource {
8
+ /**
9
+ * Use AI to extract specific data points from a brand's website. The AI will crawl
10
+ * the website and extract the requested information based on the provided data
11
+ * points.
12
+ */
13
+ aiQuery(body: AIAIQueryParams, options?: RequestOptions): APIPromise<AIAIQueryResponse> {
14
+ return this._client.post('/brand/ai/query', { body, ...options });
15
+ }
16
+
17
+ /**
18
+ * Beta feature: Given a single URL, determines if it is a product detail page,
19
+ * classifies the platform/product type, and extracts the product information.
20
+ * Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.
21
+ */
22
+ extractProduct(
23
+ body: AIExtractProductParams,
24
+ options?: RequestOptions,
25
+ ): APIPromise<AIExtractProductResponse> {
26
+ return this._client.post('/brand/ai/product', { body, ...options });
27
+ }
28
+
29
+ /**
30
+ * Beta feature: Extract product information from a brand's website. Brand.dev will
31
+ * analyze the website and return a list of products with details such as name,
32
+ * description, image, pricing, features, and more.
33
+ */
34
+ extractProducts(
35
+ body: AIExtractProductsParams,
36
+ options?: RequestOptions,
37
+ ): APIPromise<AIExtractProductsResponse> {
38
+ return this._client.post('/brand/ai/products', { body, ...options });
39
+ }
40
+ }
41
+
42
+ export interface AIAIQueryResponse {
43
+ /**
44
+ * Array of extracted data points
45
+ */
46
+ data_extracted?: Array<AIAIQueryResponse.DataExtracted>;
47
+
48
+ /**
49
+ * The domain that was analyzed
50
+ */
51
+ domain?: string;
52
+
53
+ /**
54
+ * Status of the response, e.g., 'ok'
55
+ */
56
+ status?: string;
57
+
58
+ /**
59
+ * List of URLs that were analyzed
60
+ */
61
+ urls_analyzed?: Array<string>;
62
+ }
63
+
64
+ export namespace AIAIQueryResponse {
65
+ export interface DataExtracted {
66
+ /**
67
+ * Name of the extracted data point
68
+ */
69
+ datapoint_name?: string;
70
+
71
+ /**
72
+ * Value of the extracted data point. Can be a primitive type, an array of
73
+ * primitives, or an array of objects when datapoint_list_type is 'object'.
74
+ */
75
+ datapoint_value?: string | number | boolean | Array<string> | Array<number> | Array<unknown>;
76
+ }
77
+ }
78
+
79
+ export interface AIExtractProductResponse {
80
+ /**
81
+ * Whether the given URL is a product detail page
82
+ */
83
+ is_product_page?: boolean;
84
+
85
+ /**
86
+ * The detected ecommerce platform, or null if not a product page
87
+ */
88
+ platform?: 'amazon' | 'tiktok_shop' | 'etsy' | 'generic' | null;
89
+
90
+ /**
91
+ * The extracted product data, or null if not a product page
92
+ */
93
+ product?: AIExtractProductResponse.Product | null;
94
+ }
95
+
96
+ export namespace AIExtractProductResponse {
97
+ /**
98
+ * The extracted product data, or null if not a product page
99
+ */
100
+ export interface Product {
101
+ /**
102
+ * Description of the product
103
+ */
104
+ description: string;
105
+
106
+ /**
107
+ * List of product features
108
+ */
109
+ features: Array<string>;
110
+
111
+ /**
112
+ * URLs to product images on the page (up to 7)
113
+ */
114
+ images: Array<string>;
115
+
116
+ /**
117
+ * Name of the product
118
+ */
119
+ name: string;
120
+
121
+ /**
122
+ * Tags associated with the product
123
+ */
124
+ tags: Array<string>;
125
+
126
+ /**
127
+ * Target audience for the product (array of strings)
128
+ */
129
+ target_audience: Array<string>;
130
+
131
+ /**
132
+ * Billing frequency for the product
133
+ */
134
+ billing_frequency?: 'monthly' | 'yearly' | 'one_time' | 'usage_based' | null;
135
+
136
+ /**
137
+ * Category of the product
138
+ */
139
+ category?: string | null;
140
+
141
+ /**
142
+ * Currency code for the price (e.g., USD, EUR)
143
+ */
144
+ currency?: string | null;
145
+
146
+ /**
147
+ * URL to the product image
148
+ */
149
+ image_url?: string | null;
150
+
151
+ /**
152
+ * Price of the product
153
+ */
154
+ price?: number | null;
155
+
156
+ /**
157
+ * Pricing model for the product
158
+ */
159
+ pricing_model?: 'per_seat' | 'flat' | 'tiered' | 'freemium' | 'custom' | null;
160
+
161
+ /**
162
+ * URL to the product page
163
+ */
164
+ url?: string | null;
165
+ }
166
+ }
167
+
168
+ export interface AIExtractProductsResponse {
169
+ /**
170
+ * Array of products extracted from the website
171
+ */
172
+ products?: Array<AIExtractProductsResponse.Product>;
173
+ }
174
+
175
+ export namespace AIExtractProductsResponse {
176
+ export interface Product {
177
+ /**
178
+ * Description of the product
179
+ */
180
+ description: string;
181
+
182
+ /**
183
+ * List of product features
184
+ */
185
+ features: Array<string>;
186
+
187
+ /**
188
+ * URLs to product images on the page (up to 7)
189
+ */
190
+ images: Array<string>;
191
+
192
+ /**
193
+ * Name of the product
194
+ */
195
+ name: string;
196
+
197
+ /**
198
+ * Tags associated with the product
199
+ */
200
+ tags: Array<string>;
201
+
202
+ /**
203
+ * Target audience for the product (array of strings)
204
+ */
205
+ target_audience: Array<string>;
206
+
207
+ /**
208
+ * Billing frequency for the product
209
+ */
210
+ billing_frequency?: 'monthly' | 'yearly' | 'one_time' | 'usage_based' | null;
211
+
212
+ /**
213
+ * Category of the product
214
+ */
215
+ category?: string | null;
216
+
217
+ /**
218
+ * Currency code for the price (e.g., USD, EUR)
219
+ */
220
+ currency?: string | null;
221
+
222
+ /**
223
+ * URL to the product image
224
+ */
225
+ image_url?: string | null;
226
+
227
+ /**
228
+ * Price of the product
229
+ */
230
+ price?: number | null;
231
+
232
+ /**
233
+ * Pricing model for the product
234
+ */
235
+ pricing_model?: 'per_seat' | 'flat' | 'tiered' | 'freemium' | 'custom' | null;
236
+
237
+ /**
238
+ * URL to the product page
239
+ */
240
+ url?: string | null;
241
+ }
242
+ }
243
+
244
+ export interface AIAIQueryParams {
245
+ /**
246
+ * Array of data points to extract from the website
247
+ */
248
+ data_to_extract: Array<AIAIQueryParams.DataToExtract>;
249
+
250
+ /**
251
+ * The domain name to analyze
252
+ */
253
+ domain: string;
254
+
255
+ /**
256
+ * Optional object specifying which pages to analyze
257
+ */
258
+ specific_pages?: AIAIQueryParams.SpecificPages;
259
+
260
+ /**
261
+ * Optional timeout in milliseconds for the request. If the request takes longer
262
+ * than this value, it will be aborted with a 408 status code. Maximum allowed
263
+ * value is 300000ms (5 minutes).
264
+ */
265
+ timeoutMS?: number;
266
+ }
267
+
268
+ export namespace AIAIQueryParams {
269
+ export interface DataToExtract {
270
+ /**
271
+ * Description of what to extract
272
+ */
273
+ datapoint_description: string;
274
+
275
+ /**
276
+ * Example of the expected value
277
+ */
278
+ datapoint_example: string;
279
+
280
+ /**
281
+ * Name of the data point to extract
282
+ */
283
+ datapoint_name: string;
284
+
285
+ /**
286
+ * Type of the data point
287
+ */
288
+ datapoint_type: 'text' | 'number' | 'date' | 'boolean' | 'list' | 'url';
289
+
290
+ /**
291
+ * Type of items in the list when datapoint_type is 'list'. Defaults to 'string'.
292
+ * Use 'object' to extract an array of objects matching a schema.
293
+ */
294
+ datapoint_list_type?: 'string' | 'text' | 'number' | 'date' | 'boolean' | 'list' | 'url' | 'object';
295
+
296
+ /**
297
+ * Schema definition for objects when datapoint_list_type is 'object'. Provide a
298
+ * map of field names to their scalar types.
299
+ */
300
+ datapoint_object_schema?: { [key: string]: 'string' | 'number' | 'date' | 'boolean' };
301
+ }
302
+
303
+ /**
304
+ * Optional object specifying which pages to analyze
305
+ */
306
+ export interface SpecificPages {
307
+ /**
308
+ * Whether to analyze the about us page
309
+ */
310
+ about_us?: boolean;
311
+
312
+ /**
313
+ * Whether to analyze the blog
314
+ */
315
+ blog?: boolean;
316
+
317
+ /**
318
+ * Whether to analyze the careers page
319
+ */
320
+ careers?: boolean;
321
+
322
+ /**
323
+ * Whether to analyze the contact us page
324
+ */
325
+ contact_us?: boolean;
326
+
327
+ /**
328
+ * Whether to analyze the FAQ page
329
+ */
330
+ faq?: boolean;
331
+
332
+ /**
333
+ * Whether to analyze the home page
334
+ */
335
+ home_page?: boolean;
336
+
337
+ /**
338
+ * Whether to analyze the pricing page
339
+ */
340
+ pricing?: boolean;
341
+
342
+ /**
343
+ * Whether to analyze the privacy policy page
344
+ */
345
+ privacy_policy?: boolean;
346
+
347
+ /**
348
+ * Whether to analyze the terms and conditions page
349
+ */
350
+ terms_and_conditions?: boolean;
351
+ }
352
+ }
353
+
354
+ export interface AIExtractProductParams {
355
+ /**
356
+ * The product page URL to extract product data from.
357
+ */
358
+ url: string;
359
+
360
+ /**
361
+ * Optional timeout in milliseconds for the request. Maximum allowed value is
362
+ * 300000ms (5 minutes).
363
+ */
364
+ timeoutMS?: number;
365
+ }
366
+
367
+ export type AIExtractProductsParams = AIExtractProductsParams.ByDomain | AIExtractProductsParams.ByDirectURL;
368
+
369
+ export declare namespace AIExtractProductsParams {
370
+ export interface ByDomain {
371
+ /**
372
+ * The domain name to analyze.
373
+ */
374
+ domain: string;
375
+
376
+ /**
377
+ * Maximum number of products to extract.
378
+ */
379
+ maxProducts?: number;
380
+
381
+ /**
382
+ * Optional timeout in milliseconds for the request. Maximum allowed value is
383
+ * 300000ms (5 minutes).
384
+ */
385
+ timeoutMS?: number;
386
+ }
387
+
388
+ export interface ByDirectURL {
389
+ /**
390
+ * A specific URL to use directly as the starting point for extraction without
391
+ * domain resolution.
392
+ */
393
+ directUrl: string;
394
+
395
+ /**
396
+ * Maximum number of products to extract.
397
+ */
398
+ maxProducts?: number;
399
+
400
+ /**
401
+ * Optional timeout in milliseconds for the request. Maximum allowed value is
402
+ * 300000ms (5 minutes).
403
+ */
404
+ timeoutMS?: number;
405
+ }
406
+ }
407
+
408
+ export declare namespace AI {
409
+ export {
410
+ type AIAIQueryResponse as AIAIQueryResponse,
411
+ type AIExtractProductResponse as AIExtractProductResponse,
412
+ type AIExtractProductsResponse as AIExtractProductsResponse,
413
+ type AIAIQueryParams as AIAIQueryParams,
414
+ type AIExtractProductParams as AIExtractProductParams,
415
+ type AIExtractProductsParams as AIExtractProductsParams,
416
+ };
417
+ }