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.
- package/CHANGELOG.md +24 -0
- package/client.d.mts +17 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -2
- package/client.d.ts.map +1 -1
- package/client.js +15 -0
- package/client.js.map +1 -1
- package/client.mjs +15 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai.d.mts +331 -0
- package/resources/ai.d.mts.map +1 -0
- package/resources/ai.d.ts +331 -0
- package/resources/ai.d.ts.map +1 -0
- package/resources/ai.js +33 -0
- package/resources/ai.js.map +1 -0
- package/resources/ai.mjs +29 -0
- package/resources/ai.mjs.map +1 -0
- package/resources/brand.d.mts +12 -1056
- package/resources/brand.d.mts.map +1 -1
- package/resources/brand.d.ts +12 -1056
- package/resources/brand.d.ts.map +1 -1
- package/resources/brand.js +0 -106
- package/resources/brand.js.map +1 -1
- package/resources/brand.mjs +0 -106
- package/resources/brand.mjs.map +1 -1
- package/resources/index.d.mts +6 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -0
- package/resources/index.mjs.map +1 -1
- package/resources/industry.d.mts +70 -0
- package/resources/industry.d.mts.map +1 -0
- package/resources/industry.d.ts +70 -0
- package/resources/industry.d.ts.map +1 -0
- package/resources/industry.js +15 -0
- package/resources/industry.js.map +1 -0
- package/resources/industry.mjs +11 -0
- package/resources/industry.mjs.map +1 -0
- package/resources/style.d.mts +386 -0
- package/resources/style.d.mts.map +1 -0
- package/resources/style.d.ts +386 -0
- package/resources/style.d.ts.map +1 -0
- package/resources/style.js +25 -0
- package/resources/style.js.map +1 -0
- package/resources/style.mjs +21 -0
- package/resources/style.mjs.map +1 -0
- package/resources/utility.d.mts +79 -0
- package/resources/utility.d.mts.map +1 -0
- package/resources/utility.d.ts +79 -0
- package/resources/utility.d.ts.map +1 -0
- package/resources/utility.js +29 -0
- package/resources/utility.js.map +1 -0
- package/resources/utility.mjs +25 -0
- package/resources/utility.mjs.map +1 -0
- package/resources/web.d.mts +228 -0
- package/resources/web.d.mts.map +1 -0
- package/resources/web.d.ts +228 -0
- package/resources/web.d.ts.map +1 -0
- package/resources/web.js +49 -0
- package/resources/web.js.map +1 -0
- package/resources/web.mjs +45 -0
- package/resources/web.mjs.map +1 -0
- package/src/client.ts +93 -52
- package/src/resources/ai.ts +417 -0
- package/src/resources/brand.ts +318 -1424
- package/src/resources/index.ts +37 -26
- package/src/resources/industry.ts +92 -0
- package/src/resources/style.ts +522 -0
- package/src/resources/utility.ts +105 -0
- package/src/resources/web.ts +302 -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
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class Style extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Extract font information from a brand's website including font families, usage
|
|
7
|
+
* statistics, fallbacks, and element/word counts.
|
|
8
|
+
*/
|
|
9
|
+
extractFonts(query: StyleExtractFontsParams, options?: RequestOptions): APIPromise<StyleExtractFontsResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Automatically extract comprehensive design system information from a brand's
|
|
12
|
+
* website including colors, typography, spacing, shadows, and UI components.
|
|
13
|
+
* Either 'domain' or 'directUrl' must be provided as a query parameter, but not
|
|
14
|
+
* both.
|
|
15
|
+
*/
|
|
16
|
+
extractStyleguide(query?: StyleExtractStyleguideParams | null | undefined, options?: RequestOptions): APIPromise<StyleExtractStyleguideResponse>;
|
|
17
|
+
}
|
|
18
|
+
export interface StyleExtractFontsResponse {
|
|
19
|
+
/**
|
|
20
|
+
* HTTP status code, e.g., 200
|
|
21
|
+
*/
|
|
22
|
+
code: number;
|
|
23
|
+
/**
|
|
24
|
+
* The normalized domain that was processed
|
|
25
|
+
*/
|
|
26
|
+
domain: string;
|
|
27
|
+
/**
|
|
28
|
+
* Array of font usage information
|
|
29
|
+
*/
|
|
30
|
+
fonts: Array<StyleExtractFontsResponse.Font>;
|
|
31
|
+
/**
|
|
32
|
+
* Status of the response, e.g., 'ok'
|
|
33
|
+
*/
|
|
34
|
+
status: string;
|
|
35
|
+
}
|
|
36
|
+
export declare namespace StyleExtractFontsResponse {
|
|
37
|
+
interface Font {
|
|
38
|
+
/**
|
|
39
|
+
* Array of fallback font families
|
|
40
|
+
*/
|
|
41
|
+
fallbacks: Array<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Font family name
|
|
44
|
+
*/
|
|
45
|
+
font: string;
|
|
46
|
+
/**
|
|
47
|
+
* Number of elements using this font
|
|
48
|
+
*/
|
|
49
|
+
num_elements: number;
|
|
50
|
+
/**
|
|
51
|
+
* Number of words using this font
|
|
52
|
+
*/
|
|
53
|
+
num_words: number;
|
|
54
|
+
/**
|
|
55
|
+
* Percentage of elements using this font
|
|
56
|
+
*/
|
|
57
|
+
percent_elements: number;
|
|
58
|
+
/**
|
|
59
|
+
* Percentage of words using this font
|
|
60
|
+
*/
|
|
61
|
+
percent_words: number;
|
|
62
|
+
/**
|
|
63
|
+
* Array of CSS selectors or element types where this font is used
|
|
64
|
+
*/
|
|
65
|
+
uses: Array<string>;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export interface StyleExtractStyleguideResponse {
|
|
69
|
+
/**
|
|
70
|
+
* HTTP status code
|
|
71
|
+
*/
|
|
72
|
+
code?: number;
|
|
73
|
+
/**
|
|
74
|
+
* The normalized domain that was processed
|
|
75
|
+
*/
|
|
76
|
+
domain?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Status of the response, e.g., 'ok'
|
|
79
|
+
*/
|
|
80
|
+
status?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Comprehensive styleguide data extracted from the website
|
|
83
|
+
*/
|
|
84
|
+
styleguide?: StyleExtractStyleguideResponse.Styleguide;
|
|
85
|
+
}
|
|
86
|
+
export declare namespace StyleExtractStyleguideResponse {
|
|
87
|
+
/**
|
|
88
|
+
* Comprehensive styleguide data extracted from the website
|
|
89
|
+
*/
|
|
90
|
+
interface Styleguide {
|
|
91
|
+
/**
|
|
92
|
+
* Primary colors used on the website
|
|
93
|
+
*/
|
|
94
|
+
colors?: Styleguide.Colors;
|
|
95
|
+
/**
|
|
96
|
+
* UI component styles
|
|
97
|
+
*/
|
|
98
|
+
components?: Styleguide.Components;
|
|
99
|
+
/**
|
|
100
|
+
* Spacing system used on the website
|
|
101
|
+
*/
|
|
102
|
+
elementSpacing?: Styleguide.ElementSpacing;
|
|
103
|
+
/**
|
|
104
|
+
* The primary color mode of the website design
|
|
105
|
+
*/
|
|
106
|
+
mode?: 'light' | 'dark';
|
|
107
|
+
/**
|
|
108
|
+
* Shadow styles used on the website
|
|
109
|
+
*/
|
|
110
|
+
shadows?: Styleguide.Shadows;
|
|
111
|
+
/**
|
|
112
|
+
* Typography styles used on the website
|
|
113
|
+
*/
|
|
114
|
+
typography?: Styleguide.Typography;
|
|
115
|
+
}
|
|
116
|
+
namespace Styleguide {
|
|
117
|
+
/**
|
|
118
|
+
* Primary colors used on the website
|
|
119
|
+
*/
|
|
120
|
+
interface Colors {
|
|
121
|
+
/**
|
|
122
|
+
* Accent color of the website (hex format)
|
|
123
|
+
*/
|
|
124
|
+
accent?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Background color of the website (hex format)
|
|
127
|
+
*/
|
|
128
|
+
background?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Text color of the website (hex format)
|
|
131
|
+
*/
|
|
132
|
+
text?: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* UI component styles
|
|
136
|
+
*/
|
|
137
|
+
interface Components {
|
|
138
|
+
/**
|
|
139
|
+
* Button component styles
|
|
140
|
+
*/
|
|
141
|
+
button?: Components.Button;
|
|
142
|
+
/**
|
|
143
|
+
* Card component style
|
|
144
|
+
*/
|
|
145
|
+
card?: Components.Card;
|
|
146
|
+
}
|
|
147
|
+
namespace Components {
|
|
148
|
+
/**
|
|
149
|
+
* Button component styles
|
|
150
|
+
*/
|
|
151
|
+
interface Button {
|
|
152
|
+
/**
|
|
153
|
+
* Link button style
|
|
154
|
+
*/
|
|
155
|
+
link?: Button.Link;
|
|
156
|
+
/**
|
|
157
|
+
* Primary button style
|
|
158
|
+
*/
|
|
159
|
+
primary?: Button.Primary;
|
|
160
|
+
/**
|
|
161
|
+
* Secondary button style
|
|
162
|
+
*/
|
|
163
|
+
secondary?: Button.Secondary;
|
|
164
|
+
}
|
|
165
|
+
namespace Button {
|
|
166
|
+
/**
|
|
167
|
+
* Link button style
|
|
168
|
+
*/
|
|
169
|
+
interface Link {
|
|
170
|
+
backgroundColor?: string;
|
|
171
|
+
borderColor?: string;
|
|
172
|
+
borderRadius?: string;
|
|
173
|
+
borderStyle?: string;
|
|
174
|
+
borderWidth?: string;
|
|
175
|
+
boxShadow?: string;
|
|
176
|
+
color?: string;
|
|
177
|
+
fontSize?: string;
|
|
178
|
+
fontWeight?: number;
|
|
179
|
+
padding?: string;
|
|
180
|
+
textDecoration?: string;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Primary button style
|
|
184
|
+
*/
|
|
185
|
+
interface Primary {
|
|
186
|
+
backgroundColor?: string;
|
|
187
|
+
borderColor?: string;
|
|
188
|
+
borderRadius?: string;
|
|
189
|
+
borderStyle?: string;
|
|
190
|
+
borderWidth?: string;
|
|
191
|
+
boxShadow?: string;
|
|
192
|
+
color?: string;
|
|
193
|
+
fontSize?: string;
|
|
194
|
+
fontWeight?: number;
|
|
195
|
+
padding?: string;
|
|
196
|
+
textDecoration?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Secondary button style
|
|
200
|
+
*/
|
|
201
|
+
interface Secondary {
|
|
202
|
+
backgroundColor?: string;
|
|
203
|
+
borderColor?: string;
|
|
204
|
+
borderRadius?: string;
|
|
205
|
+
borderStyle?: string;
|
|
206
|
+
borderWidth?: string;
|
|
207
|
+
boxShadow?: string;
|
|
208
|
+
color?: string;
|
|
209
|
+
fontSize?: string;
|
|
210
|
+
fontWeight?: number;
|
|
211
|
+
padding?: string;
|
|
212
|
+
textDecoration?: string;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Card component style
|
|
217
|
+
*/
|
|
218
|
+
interface Card {
|
|
219
|
+
backgroundColor?: string;
|
|
220
|
+
borderColor?: string;
|
|
221
|
+
borderRadius?: string;
|
|
222
|
+
borderStyle?: string;
|
|
223
|
+
borderWidth?: string;
|
|
224
|
+
boxShadow?: string;
|
|
225
|
+
padding?: string;
|
|
226
|
+
textColor?: string;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Spacing system used on the website
|
|
231
|
+
*/
|
|
232
|
+
interface ElementSpacing {
|
|
233
|
+
/**
|
|
234
|
+
* Large spacing value
|
|
235
|
+
*/
|
|
236
|
+
lg?: string;
|
|
237
|
+
/**
|
|
238
|
+
* Medium spacing value
|
|
239
|
+
*/
|
|
240
|
+
md?: string;
|
|
241
|
+
/**
|
|
242
|
+
* Small spacing value
|
|
243
|
+
*/
|
|
244
|
+
sm?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Extra large spacing value
|
|
247
|
+
*/
|
|
248
|
+
xl?: string;
|
|
249
|
+
/**
|
|
250
|
+
* Extra small spacing value
|
|
251
|
+
*/
|
|
252
|
+
xs?: string;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Shadow styles used on the website
|
|
256
|
+
*/
|
|
257
|
+
interface Shadows {
|
|
258
|
+
/**
|
|
259
|
+
* Inner shadow value
|
|
260
|
+
*/
|
|
261
|
+
inner?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Large shadow value
|
|
264
|
+
*/
|
|
265
|
+
lg?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Medium shadow value
|
|
268
|
+
*/
|
|
269
|
+
md?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Small shadow value
|
|
272
|
+
*/
|
|
273
|
+
sm?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Extra large shadow value
|
|
276
|
+
*/
|
|
277
|
+
xl?: string;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Typography styles used on the website
|
|
281
|
+
*/
|
|
282
|
+
interface Typography {
|
|
283
|
+
/**
|
|
284
|
+
* Heading styles
|
|
285
|
+
*/
|
|
286
|
+
headings?: Typography.Headings;
|
|
287
|
+
/**
|
|
288
|
+
* Paragraph text styles
|
|
289
|
+
*/
|
|
290
|
+
p?: Typography.P;
|
|
291
|
+
}
|
|
292
|
+
namespace Typography {
|
|
293
|
+
/**
|
|
294
|
+
* Heading styles
|
|
295
|
+
*/
|
|
296
|
+
interface Headings {
|
|
297
|
+
h1?: Headings.H1;
|
|
298
|
+
h2?: Headings.H2;
|
|
299
|
+
h3?: Headings.H3;
|
|
300
|
+
h4?: Headings.H4;
|
|
301
|
+
}
|
|
302
|
+
namespace Headings {
|
|
303
|
+
interface H1 {
|
|
304
|
+
fontFamily?: string;
|
|
305
|
+
fontSize?: string;
|
|
306
|
+
fontWeight?: number;
|
|
307
|
+
letterSpacing?: string;
|
|
308
|
+
lineHeight?: string;
|
|
309
|
+
}
|
|
310
|
+
interface H2 {
|
|
311
|
+
fontFamily?: string;
|
|
312
|
+
fontSize?: string;
|
|
313
|
+
fontWeight?: number;
|
|
314
|
+
letterSpacing?: string;
|
|
315
|
+
lineHeight?: string;
|
|
316
|
+
}
|
|
317
|
+
interface H3 {
|
|
318
|
+
fontFamily?: string;
|
|
319
|
+
fontSize?: string;
|
|
320
|
+
fontWeight?: number;
|
|
321
|
+
letterSpacing?: string;
|
|
322
|
+
lineHeight?: string;
|
|
323
|
+
}
|
|
324
|
+
interface H4 {
|
|
325
|
+
fontFamily?: string;
|
|
326
|
+
fontSize?: string;
|
|
327
|
+
fontWeight?: number;
|
|
328
|
+
letterSpacing?: string;
|
|
329
|
+
lineHeight?: string;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Paragraph text styles
|
|
334
|
+
*/
|
|
335
|
+
interface P {
|
|
336
|
+
fontFamily?: string;
|
|
337
|
+
fontSize?: string;
|
|
338
|
+
fontWeight?: number;
|
|
339
|
+
letterSpacing?: string;
|
|
340
|
+
lineHeight?: string;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
export interface StyleExtractFontsParams {
|
|
346
|
+
/**
|
|
347
|
+
* Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
|
|
348
|
+
* domain will be automatically normalized and validated.
|
|
349
|
+
*/
|
|
350
|
+
domain: string;
|
|
351
|
+
/**
|
|
352
|
+
* Optional timeout in milliseconds for the request. If the request takes longer
|
|
353
|
+
* than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
354
|
+
* value is 300000ms (5 minutes).
|
|
355
|
+
*/
|
|
356
|
+
timeoutMS?: number;
|
|
357
|
+
}
|
|
358
|
+
export interface StyleExtractStyleguideParams {
|
|
359
|
+
/**
|
|
360
|
+
* A specific URL to fetch the styleguide from directly, bypassing domain
|
|
361
|
+
* resolution (e.g., 'https://example.com/design-system').
|
|
362
|
+
*/
|
|
363
|
+
directUrl?: string;
|
|
364
|
+
/**
|
|
365
|
+
* Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
|
366
|
+
* domain will be automatically normalized and validated.
|
|
367
|
+
*/
|
|
368
|
+
domain?: string;
|
|
369
|
+
/**
|
|
370
|
+
* Optional parameter to prioritize screenshot capture for styleguide extraction.
|
|
371
|
+
* If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
|
372
|
+
* optimizes for higher quality with longer wait times. Defaults to 'quality' if
|
|
373
|
+
* not provided.
|
|
374
|
+
*/
|
|
375
|
+
prioritize?: 'speed' | 'quality';
|
|
376
|
+
/**
|
|
377
|
+
* Optional timeout in milliseconds for the request. If the request takes longer
|
|
378
|
+
* than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
379
|
+
* value is 300000ms (5 minutes).
|
|
380
|
+
*/
|
|
381
|
+
timeoutMS?: number;
|
|
382
|
+
}
|
|
383
|
+
export declare namespace Style {
|
|
384
|
+
export { type StyleExtractFontsResponse as StyleExtractFontsResponse, type StyleExtractStyleguideResponse as StyleExtractStyleguideResponse, type StyleExtractFontsParams as StyleExtractFontsParams, type StyleExtractStyleguideParams as StyleExtractStyleguideParams, };
|
|
385
|
+
}
|
|
386
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/resources/style.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,YAAY,CACV,KAAK,EAAE,uBAAuB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;IAIxC;;;;;OAKG;IACH,iBAAiB,CACf,KAAK,GAAE,4BAA4B,GAAG,IAAI,GAAG,SAAc,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAG9C;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAE7C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,yBAAiB,y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0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Style = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class Style extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Extract font information from a brand's website including font families, usage
|
|
9
|
+
* statistics, fallbacks, and element/word counts.
|
|
10
|
+
*/
|
|
11
|
+
extractFonts(query, options) {
|
|
12
|
+
return this._client.get('/brand/fonts', { query, ...options });
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Automatically extract comprehensive design system information from a brand's
|
|
16
|
+
* website including colors, typography, spacing, shadows, and UI components.
|
|
17
|
+
* Either 'domain' or 'directUrl' must be provided as a query parameter, but not
|
|
18
|
+
* both.
|
|
19
|
+
*/
|
|
20
|
+
extractStyleguide(query = {}, options) {
|
|
21
|
+
return this._client.get('/brand/styleguide', { query, ...options });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.Style = Style;
|
|
25
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../src/resources/style.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;OAGG;IACH,YAAY,CACV,KAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;OAKG;IACH,iBAAiB,CACf,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF;AAxBD,sBAwBC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class Style extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Extract font information from a brand's website including font families, usage
|
|
6
|
+
* statistics, fallbacks, and element/word counts.
|
|
7
|
+
*/
|
|
8
|
+
extractFonts(query, options) {
|
|
9
|
+
return this._client.get('/brand/fonts', { query, ...options });
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Automatically extract comprehensive design system information from a brand's
|
|
13
|
+
* website including colors, typography, spacing, shadows, and UI components.
|
|
14
|
+
* Either 'domain' or 'directUrl' must be provided as a query parameter, but not
|
|
15
|
+
* both.
|
|
16
|
+
*/
|
|
17
|
+
extractStyleguide(query = {}, options) {
|
|
18
|
+
return this._client.get('/brand/styleguide', { query, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","sourceRoot":"","sources":["../src/resources/style.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,YAAY,CACV,KAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;OAKG;IACH,iBAAiB,CACf,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class Utility extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Signal that you may fetch brand data for a particular domain soon to improve
|
|
7
|
+
* latency. This endpoint does not charge credits and is available for paid
|
|
8
|
+
* customers to optimize future requests. [You must be on a paid plan to use this
|
|
9
|
+
* endpoint]
|
|
10
|
+
*/
|
|
11
|
+
prefetch(body: UtilityPrefetchParams, options?: RequestOptions): APIPromise<UtilityPrefetchResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Signal that you may fetch brand data for a particular domain soon to improve
|
|
14
|
+
* latency. This endpoint accepts an email address, extracts the domain from it,
|
|
15
|
+
* validates that it's not a disposable or free email provider, and queues the
|
|
16
|
+
* domain for prefetching. This endpoint does not charge credits and is available
|
|
17
|
+
* for paid customers to optimize future requests. [You must be on a paid plan to
|
|
18
|
+
* use this endpoint]
|
|
19
|
+
*/
|
|
20
|
+
prefetchByEmail(body: UtilityPrefetchByEmailParams, options?: RequestOptions): APIPromise<UtilityPrefetchByEmailResponse>;
|
|
21
|
+
}
|
|
22
|
+
export interface UtilityPrefetchResponse {
|
|
23
|
+
/**
|
|
24
|
+
* The domain that was queued for prefetching
|
|
25
|
+
*/
|
|
26
|
+
domain?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Success message
|
|
29
|
+
*/
|
|
30
|
+
message?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Status of the response, e.g., 'ok'
|
|
33
|
+
*/
|
|
34
|
+
status?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface UtilityPrefetchByEmailResponse {
|
|
37
|
+
/**
|
|
38
|
+
* The domain that was queued for prefetching
|
|
39
|
+
*/
|
|
40
|
+
domain?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Success message
|
|
43
|
+
*/
|
|
44
|
+
message?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Status of the response, e.g., 'ok'
|
|
47
|
+
*/
|
|
48
|
+
status?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface UtilityPrefetchParams {
|
|
51
|
+
/**
|
|
52
|
+
* Domain name to prefetch brand data for
|
|
53
|
+
*/
|
|
54
|
+
domain: string;
|
|
55
|
+
/**
|
|
56
|
+
* Optional timeout in milliseconds for the request. If the request takes longer
|
|
57
|
+
* than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
58
|
+
* value is 300000ms (5 minutes).
|
|
59
|
+
*/
|
|
60
|
+
timeoutMS?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface UtilityPrefetchByEmailParams {
|
|
63
|
+
/**
|
|
64
|
+
* Email address to prefetch brand data for. The domain will be extracted from the
|
|
65
|
+
* email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email
|
|
66
|
+
* addresses are not allowed.
|
|
67
|
+
*/
|
|
68
|
+
email: string;
|
|
69
|
+
/**
|
|
70
|
+
* Optional timeout in milliseconds for the request. If the request takes longer
|
|
71
|
+
* than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
72
|
+
* value is 300000ms (5 minutes).
|
|
73
|
+
*/
|
|
74
|
+
timeoutMS?: number;
|
|
75
|
+
}
|
|
76
|
+
export declare namespace Utility {
|
|
77
|
+
export { type UtilityPrefetchResponse as UtilityPrefetchResponse, type UtilityPrefetchByEmailResponse as UtilityPrefetchByEmailResponse, type UtilityPrefetchParams as UtilityPrefetchParams, type UtilityPrefetchByEmailParams as UtilityPrefetchByEmailParams, };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=utility.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.d.mts","sourceRoot":"","sources":["../src/resources/utility.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIpG;;;;;;;OAOG;IACH,eAAe,CACb,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAG9C;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class Utility extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Signal that you may fetch brand data for a particular domain soon to improve
|
|
7
|
+
* latency. This endpoint does not charge credits and is available for paid
|
|
8
|
+
* customers to optimize future requests. [You must be on a paid plan to use this
|
|
9
|
+
* endpoint]
|
|
10
|
+
*/
|
|
11
|
+
prefetch(body: UtilityPrefetchParams, options?: RequestOptions): APIPromise<UtilityPrefetchResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Signal that you may fetch brand data for a particular domain soon to improve
|
|
14
|
+
* latency. This endpoint accepts an email address, extracts the domain from it,
|
|
15
|
+
* validates that it's not a disposable or free email provider, and queues the
|
|
16
|
+
* domain for prefetching. This endpoint does not charge credits and is available
|
|
17
|
+
* for paid customers to optimize future requests. [You must be on a paid plan to
|
|
18
|
+
* use this endpoint]
|
|
19
|
+
*/
|
|
20
|
+
prefetchByEmail(body: UtilityPrefetchByEmailParams, options?: RequestOptions): APIPromise<UtilityPrefetchByEmailResponse>;
|
|
21
|
+
}
|
|
22
|
+
export interface UtilityPrefetchResponse {
|
|
23
|
+
/**
|
|
24
|
+
* The domain that was queued for prefetching
|
|
25
|
+
*/
|
|
26
|
+
domain?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Success message
|
|
29
|
+
*/
|
|
30
|
+
message?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Status of the response, e.g., 'ok'
|
|
33
|
+
*/
|
|
34
|
+
status?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface UtilityPrefetchByEmailResponse {
|
|
37
|
+
/**
|
|
38
|
+
* The domain that was queued for prefetching
|
|
39
|
+
*/
|
|
40
|
+
domain?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Success message
|
|
43
|
+
*/
|
|
44
|
+
message?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Status of the response, e.g., 'ok'
|
|
47
|
+
*/
|
|
48
|
+
status?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface UtilityPrefetchParams {
|
|
51
|
+
/**
|
|
52
|
+
* Domain name to prefetch brand data for
|
|
53
|
+
*/
|
|
54
|
+
domain: string;
|
|
55
|
+
/**
|
|
56
|
+
* Optional timeout in milliseconds for the request. If the request takes longer
|
|
57
|
+
* than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
58
|
+
* value is 300000ms (5 minutes).
|
|
59
|
+
*/
|
|
60
|
+
timeoutMS?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface UtilityPrefetchByEmailParams {
|
|
63
|
+
/**
|
|
64
|
+
* Email address to prefetch brand data for. The domain will be extracted from the
|
|
65
|
+
* email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email
|
|
66
|
+
* addresses are not allowed.
|
|
67
|
+
*/
|
|
68
|
+
email: string;
|
|
69
|
+
/**
|
|
70
|
+
* Optional timeout in milliseconds for the request. If the request takes longer
|
|
71
|
+
* than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
72
|
+
* value is 300000ms (5 minutes).
|
|
73
|
+
*/
|
|
74
|
+
timeoutMS?: number;
|
|
75
|
+
}
|
|
76
|
+
export declare namespace Utility {
|
|
77
|
+
export { type UtilityPrefetchResponse as UtilityPrefetchResponse, type UtilityPrefetchByEmailResponse as UtilityPrefetchByEmailResponse, type UtilityPrefetchParams as UtilityPrefetchParams, type UtilityPrefetchByEmailParams as UtilityPrefetchByEmailParams, };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=utility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../src/resources/utility.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIpG;;;;;;;OAOG;IACH,eAAe,CACb,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAG9C;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Utility = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class Utility extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Signal that you may fetch brand data for a particular domain soon to improve
|
|
9
|
+
* latency. This endpoint does not charge credits and is available for paid
|
|
10
|
+
* customers to optimize future requests. [You must be on a paid plan to use this
|
|
11
|
+
* endpoint]
|
|
12
|
+
*/
|
|
13
|
+
prefetch(body, options) {
|
|
14
|
+
return this._client.post('/brand/prefetch', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Signal that you may fetch brand data for a particular domain soon to improve
|
|
18
|
+
* latency. This endpoint accepts an email address, extracts the domain from it,
|
|
19
|
+
* validates that it's not a disposable or free email provider, and queues the
|
|
20
|
+
* domain for prefetching. This endpoint does not charge credits and is available
|
|
21
|
+
* for paid customers to optimize future requests. [You must be on a paid plan to
|
|
22
|
+
* use this endpoint]
|
|
23
|
+
*/
|
|
24
|
+
prefetchByEmail(body, options) {
|
|
25
|
+
return this._client.post('/brand/prefetch-by-email', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Utility = Utility;
|
|
29
|
+
//# sourceMappingURL=utility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../src/resources/utility.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,IAA2B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CACb,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAzBD,0BAyBC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class Utility extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Signal that you may fetch brand data for a particular domain soon to improve
|
|
6
|
+
* latency. This endpoint does not charge credits and is available for paid
|
|
7
|
+
* customers to optimize future requests. [You must be on a paid plan to use this
|
|
8
|
+
* endpoint]
|
|
9
|
+
*/
|
|
10
|
+
prefetch(body, options) {
|
|
11
|
+
return this._client.post('/brand/prefetch', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Signal that you may fetch brand data for a particular domain soon to improve
|
|
15
|
+
* latency. This endpoint accepts an email address, extracts the domain from it,
|
|
16
|
+
* validates that it's not a disposable or free email provider, and queues the
|
|
17
|
+
* domain for prefetching. This endpoint does not charge credits and is available
|
|
18
|
+
* for paid customers to optimize future requests. [You must be on a paid plan to
|
|
19
|
+
* use this endpoint]
|
|
20
|
+
*/
|
|
21
|
+
prefetchByEmail(body, options) {
|
|
22
|
+
return this._client.post('/brand/prefetch-by-email', { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=utility.mjs.map
|