@expandai/sdk 0.14.0 → 0.16.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.0 (2026-02-19)
4
+
5
+ Full Changelog: [v0.15.0...v0.16.0](https://github.com/expandai/expandai-node/compare/v0.15.0...v0.16.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([3ed3cb7](https://github.com/expandai/expandai-node/commit/3ed3cb7118c42bbba9b0d6b4afffba60e5b74c0a))
10
+
11
+ ## 0.15.0 (2026-02-19)
12
+
13
+ Full Changelog: [v0.14.0...v0.15.0](https://github.com/expandai/expandai-node/compare/v0.14.0...v0.15.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([caec526](https://github.com/expandai/expandai-node/commit/caec526ac68b6b400126e3f1e38508fd2a5476a6))
18
+
3
19
  ## 0.14.0 (2026-02-18)
4
20
 
5
21
  Full Changelog: [v0.13.3...v0.14.0](https://github.com/expandai/expandai-node/compare/v0.13.3...v0.14.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expandai/sdk",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "The official TypeScript library for the Expand API",
5
5
  "author": "Expand <support@expand.ai>",
6
6
  "types": "./index.d.ts",
@@ -18,27 +18,49 @@ export declare namespace FetchResponse {
18
18
  * HTTP response information (URL, status code, optionally headers)
19
19
  */
20
20
  response: Data.Response;
21
- appendix?: unknown;
21
+ /**
22
+ * Extracted links and sidebar content
23
+ */
24
+ appendix?: string;
22
25
  /**
23
26
  * Unique identifier for the browser session that performed this fetch
24
27
  */
25
28
  browserSessionId?: string;
26
- html?: unknown;
29
+ /**
30
+ * The HTML content of the fetched page
31
+ */
32
+ html?: string;
27
33
  /**
28
34
  * Pruned JSON objects extracted from the page (from HTML and network responses).
29
35
  * This is recomputed on every fetch and is not persisted.
30
36
  */
31
- json?: unknown;
32
- links?: unknown;
33
- markdown?: unknown;
37
+ json?: Array<{
38
+ [key: string]: string | number | boolean | unknown;
39
+ }>;
40
+ /**
41
+ * Links extracted from the page
42
+ */
43
+ links?: Array<Data.Link>;
44
+ /**
45
+ * The markdown-formatted content extracted from the page
46
+ */
47
+ markdown?: string;
34
48
  /**
35
- * Page metadata extracted from HTML head (title, description, Open Graph, Twitter
36
- * Card, icons)
49
+ * Comprehensive metadata extracted from the page HTML head section
37
50
  */
38
- meta?: unknown;
39
- screenshot?: unknown;
40
- snippets?: unknown;
41
- summary?: unknown;
51
+ meta?: Data.Meta;
52
+ /**
53
+ * Base64-encoded data URI of the screenshot image
54
+ */
55
+ screenshot?: string;
56
+ /**
57
+ * Relevant snippets extracted from the page based on the search query
58
+ */
59
+ snippets?: Array<Data.UnionMember0 | Data.UnionMember1>;
60
+ /**
61
+ * AI-generated summary of the page content
62
+ */
63
+ summary?: string;
42
64
  }
43
65
  namespace Data {
44
66
  /**
@@ -61,6 +83,210 @@ export declare namespace FetchResponse {
61
83
  [key: string]: string;
62
84
  };
63
85
  }
86
+ /**
87
+ * A link extracted from the page
88
+ */
89
+ interface Link {
90
+ /**
91
+ * The URL of the link
92
+ */
93
+ url: string;
94
+ /**
95
+ * The anchor text of the link
96
+ */
97
+ text?: string;
98
+ }
99
+ /**
100
+ * Comprehensive metadata extracted from the page HTML head section
101
+ */
102
+ interface Meta {
103
+ /**
104
+ * Canonical URL from <link rel="canonical">
105
+ */
106
+ canonicalUrl?: string;
107
+ /**
108
+ * Character encoding from <meta charset="...">
109
+ */
110
+ charset?: string;
111
+ /**
112
+ * Meta description from <meta name="description">
113
+ */
114
+ description?: string;
115
+ /**
116
+ * Primary favicon URL (first icon found)
117
+ */
118
+ favicon?: string;
119
+ /**
120
+ * All icon links (favicons, apple-touch-icons, etc.)
121
+ */
122
+ icons?: Array<Meta.Icon>;
123
+ /**
124
+ * Page language from <html lang="...">
125
+ */
126
+ language?: string;
127
+ /**
128
+ * Open Graph protocol metadata for rich link previews
129
+ */
130
+ openGraph?: Meta.OpenGraph;
131
+ /**
132
+ * Page title from <title> tag
133
+ */
134
+ title?: string;
135
+ /**
136
+ * Twitter Card metadata for social sharing previews
137
+ */
138
+ twitter?: Meta.Twitter;
139
+ }
140
+ namespace Meta {
141
+ /**
142
+ * Favicon or app icon metadata from <link> tags
143
+ */
144
+ interface Icon {
145
+ /**
146
+ * Icon URL or path
147
+ */
148
+ href: string;
149
+ /**
150
+ * Link relationship type
151
+ */
152
+ rel: string;
153
+ /**
154
+ * Icon dimensions
155
+ */
156
+ sizes?: string;
157
+ /**
158
+ * MIME type of the icon
159
+ */
160
+ type?: string;
161
+ }
162
+ /**
163
+ * Open Graph protocol metadata for rich link previews
164
+ */
165
+ interface OpenGraph {
166
+ /**
167
+ * Open Graph description (og:description)
168
+ */
169
+ description?: string;
170
+ /**
171
+ * Open Graph images (og:image and related properties)
172
+ */
173
+ images?: Array<OpenGraph.Image>;
174
+ /**
175
+ * Locale in language_TERRITORY format (og:locale)
176
+ */
177
+ locale?: string;
178
+ /**
179
+ * Site name (og:site_name)
180
+ */
181
+ siteName?: string;
182
+ /**
183
+ * Open Graph title (og:title)
184
+ */
185
+ title?: string;
186
+ /**
187
+ * Open Graph type (og:type) - website, article, product, etc.
188
+ */
189
+ type?: string;
190
+ /**
191
+ * Canonical URL for the content (og:url)
192
+ */
193
+ url?: string;
194
+ }
195
+ namespace OpenGraph {
196
+ /**
197
+ * Open Graph image with optional dimensions and alt text
198
+ */
199
+ interface Image {
200
+ /**
201
+ * Image URL
202
+ */
203
+ url: string;
204
+ /**
205
+ * Image alt text for accessibility
206
+ */
207
+ alt?: string;
208
+ /**
209
+ * Image height in pixels
210
+ */
211
+ height?: number;
212
+ /**
213
+ * Image width in pixels
214
+ */
215
+ width?: number;
216
+ }
217
+ }
218
+ /**
219
+ * Twitter Card metadata for social sharing previews
220
+ */
221
+ interface Twitter {
222
+ /**
223
+ * Twitter card type (twitter:card)
224
+ */
225
+ card?: string;
226
+ /**
227
+ * Twitter @username of content creator (twitter:creator)
228
+ */
229
+ creator?: string;
230
+ /**
231
+ * Description for Twitter card (twitter:description)
232
+ */
233
+ description?: string;
234
+ /**
235
+ * Image URL for Twitter card (twitter:image)
236
+ */
237
+ image?: string;
238
+ /**
239
+ * Twitter @username of the website (twitter:site)
240
+ */
241
+ site?: string;
242
+ /**
243
+ * Title for Twitter card (twitter:title)
244
+ */
245
+ title?: string;
246
+ }
247
+ }
248
+ interface UnionMember0 {
249
+ _tag: 'MarkdownSnippet';
250
+ /**
251
+ * Original chunk index
252
+ */
253
+ index: number;
254
+ /**
255
+ * Relevance score from the reranker (0-1)
256
+ */
257
+ score: number;
258
+ /**
259
+ * The text content of the snippet
260
+ */
261
+ text: string;
262
+ /**
263
+ * Type identifier for TextPart compatibility
264
+ */
265
+ type?: 'text';
266
+ }
267
+ interface UnionMember1 {
268
+ _tag: 'JsonSnippet';
269
+ /**
270
+ * Original chunk index
271
+ */
272
+ index: number;
273
+ /**
274
+ * The structured JSON subtree value
275
+ */
276
+ json: unknown;
277
+ /**
278
+ * Relevance score from the reranker (0-1)
279
+ */
280
+ score: number;
281
+ /**
282
+ * Pretty-printed JSON chunk text
283
+ */
284
+ text: string;
285
+ /**
286
+ * Type identifier for TextPart compatibility
287
+ */
288
+ type?: 'text';
289
+ }
64
290
  }
65
291
  }
66
292
  export interface FetchParams {
@@ -1 +1 @@
1
- {"version":3,"file":"top-level.d.mts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC;CAC1B;AAED,yBAAiB,aAAa,CAAC;IAC7B;;;OAGG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC;QAExB,QAAQ,CAAC,EAAE,OAAO,CAA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iB,OAAO,CAAC;gBACvB;;mBAEG;gBACH,UAAiB,eAAe;oBAC9B;;uBAEG;oBACH,eAAe,CAAC,EAAE,MAAM,CAAC;iBAC1B;gBAED;;mBAEG;gBACH,UAAiB,UAAU;oBACzB;;uBAEG;oBACH,UAAU,CAAC,EAAE,MAAM,CAAC;iBACrB;aACF;SACF;QAED;;WAEG;QACH,UAAiB,MAAM;YACrB;;eAEG;YACH,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;CACjF"}
@@ -18,27 +18,49 @@ export declare namespace FetchResponse {
18
18
  * HTTP response information (URL, status code, optionally headers)
19
19
  */
20
20
  response: Data.Response;
21
- appendix?: unknown;
21
+ /**
22
+ * Extracted links and sidebar content
23
+ */
24
+ appendix?: string;
22
25
  /**
23
26
  * Unique identifier for the browser session that performed this fetch
24
27
  */
25
28
  browserSessionId?: string;
26
- html?: unknown;
29
+ /**
30
+ * The HTML content of the fetched page
31
+ */
32
+ html?: string;
27
33
  /**
28
34
  * Pruned JSON objects extracted from the page (from HTML and network responses).
29
35
  * This is recomputed on every fetch and is not persisted.
30
36
  */
31
- json?: unknown;
32
- links?: unknown;
33
- markdown?: unknown;
37
+ json?: Array<{
38
+ [key: string]: string | number | boolean | unknown;
39
+ }>;
40
+ /**
41
+ * Links extracted from the page
42
+ */
43
+ links?: Array<Data.Link>;
44
+ /**
45
+ * The markdown-formatted content extracted from the page
46
+ */
47
+ markdown?: string;
34
48
  /**
35
- * Page metadata extracted from HTML head (title, description, Open Graph, Twitter
36
- * Card, icons)
49
+ * Comprehensive metadata extracted from the page HTML head section
37
50
  */
38
- meta?: unknown;
39
- screenshot?: unknown;
40
- snippets?: unknown;
41
- summary?: unknown;
51
+ meta?: Data.Meta;
52
+ /**
53
+ * Base64-encoded data URI of the screenshot image
54
+ */
55
+ screenshot?: string;
56
+ /**
57
+ * Relevant snippets extracted from the page based on the search query
58
+ */
59
+ snippets?: Array<Data.UnionMember0 | Data.UnionMember1>;
60
+ /**
61
+ * AI-generated summary of the page content
62
+ */
63
+ summary?: string;
42
64
  }
43
65
  namespace Data {
44
66
  /**
@@ -61,6 +83,210 @@ export declare namespace FetchResponse {
61
83
  [key: string]: string;
62
84
  };
63
85
  }
86
+ /**
87
+ * A link extracted from the page
88
+ */
89
+ interface Link {
90
+ /**
91
+ * The URL of the link
92
+ */
93
+ url: string;
94
+ /**
95
+ * The anchor text of the link
96
+ */
97
+ text?: string;
98
+ }
99
+ /**
100
+ * Comprehensive metadata extracted from the page HTML head section
101
+ */
102
+ interface Meta {
103
+ /**
104
+ * Canonical URL from <link rel="canonical">
105
+ */
106
+ canonicalUrl?: string;
107
+ /**
108
+ * Character encoding from <meta charset="...">
109
+ */
110
+ charset?: string;
111
+ /**
112
+ * Meta description from <meta name="description">
113
+ */
114
+ description?: string;
115
+ /**
116
+ * Primary favicon URL (first icon found)
117
+ */
118
+ favicon?: string;
119
+ /**
120
+ * All icon links (favicons, apple-touch-icons, etc.)
121
+ */
122
+ icons?: Array<Meta.Icon>;
123
+ /**
124
+ * Page language from <html lang="...">
125
+ */
126
+ language?: string;
127
+ /**
128
+ * Open Graph protocol metadata for rich link previews
129
+ */
130
+ openGraph?: Meta.OpenGraph;
131
+ /**
132
+ * Page title from <title> tag
133
+ */
134
+ title?: string;
135
+ /**
136
+ * Twitter Card metadata for social sharing previews
137
+ */
138
+ twitter?: Meta.Twitter;
139
+ }
140
+ namespace Meta {
141
+ /**
142
+ * Favicon or app icon metadata from <link> tags
143
+ */
144
+ interface Icon {
145
+ /**
146
+ * Icon URL or path
147
+ */
148
+ href: string;
149
+ /**
150
+ * Link relationship type
151
+ */
152
+ rel: string;
153
+ /**
154
+ * Icon dimensions
155
+ */
156
+ sizes?: string;
157
+ /**
158
+ * MIME type of the icon
159
+ */
160
+ type?: string;
161
+ }
162
+ /**
163
+ * Open Graph protocol metadata for rich link previews
164
+ */
165
+ interface OpenGraph {
166
+ /**
167
+ * Open Graph description (og:description)
168
+ */
169
+ description?: string;
170
+ /**
171
+ * Open Graph images (og:image and related properties)
172
+ */
173
+ images?: Array<OpenGraph.Image>;
174
+ /**
175
+ * Locale in language_TERRITORY format (og:locale)
176
+ */
177
+ locale?: string;
178
+ /**
179
+ * Site name (og:site_name)
180
+ */
181
+ siteName?: string;
182
+ /**
183
+ * Open Graph title (og:title)
184
+ */
185
+ title?: string;
186
+ /**
187
+ * Open Graph type (og:type) - website, article, product, etc.
188
+ */
189
+ type?: string;
190
+ /**
191
+ * Canonical URL for the content (og:url)
192
+ */
193
+ url?: string;
194
+ }
195
+ namespace OpenGraph {
196
+ /**
197
+ * Open Graph image with optional dimensions and alt text
198
+ */
199
+ interface Image {
200
+ /**
201
+ * Image URL
202
+ */
203
+ url: string;
204
+ /**
205
+ * Image alt text for accessibility
206
+ */
207
+ alt?: string;
208
+ /**
209
+ * Image height in pixels
210
+ */
211
+ height?: number;
212
+ /**
213
+ * Image width in pixels
214
+ */
215
+ width?: number;
216
+ }
217
+ }
218
+ /**
219
+ * Twitter Card metadata for social sharing previews
220
+ */
221
+ interface Twitter {
222
+ /**
223
+ * Twitter card type (twitter:card)
224
+ */
225
+ card?: string;
226
+ /**
227
+ * Twitter @username of content creator (twitter:creator)
228
+ */
229
+ creator?: string;
230
+ /**
231
+ * Description for Twitter card (twitter:description)
232
+ */
233
+ description?: string;
234
+ /**
235
+ * Image URL for Twitter card (twitter:image)
236
+ */
237
+ image?: string;
238
+ /**
239
+ * Twitter @username of the website (twitter:site)
240
+ */
241
+ site?: string;
242
+ /**
243
+ * Title for Twitter card (twitter:title)
244
+ */
245
+ title?: string;
246
+ }
247
+ }
248
+ interface UnionMember0 {
249
+ _tag: 'MarkdownSnippet';
250
+ /**
251
+ * Original chunk index
252
+ */
253
+ index: number;
254
+ /**
255
+ * Relevance score from the reranker (0-1)
256
+ */
257
+ score: number;
258
+ /**
259
+ * The text content of the snippet
260
+ */
261
+ text: string;
262
+ /**
263
+ * Type identifier for TextPart compatibility
264
+ */
265
+ type?: 'text';
266
+ }
267
+ interface UnionMember1 {
268
+ _tag: 'JsonSnippet';
269
+ /**
270
+ * Original chunk index
271
+ */
272
+ index: number;
273
+ /**
274
+ * The structured JSON subtree value
275
+ */
276
+ json: unknown;
277
+ /**
278
+ * Relevance score from the reranker (0-1)
279
+ */
280
+ score: number;
281
+ /**
282
+ * Pretty-printed JSON chunk text
283
+ */
284
+ text: string;
285
+ /**
286
+ * Type identifier for TextPart compatibility
287
+ */
288
+ type?: 'text';
289
+ }
64
290
  }
65
291
  }
66
292
  export interface FetchParams {
@@ -1 +1 @@
1
- {"version":3,"file":"top-level.d.ts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC;CAC1B;AAED,yBAAiB,aAAa,CAAC;IAC7B;;;OAGG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC;QAExB,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB;;WAEG;QACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAE1B,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf;;;WAGG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf,KAAK,CAAC,EAAE,OAAO,CAAC;QAEhB,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB;;;WAGG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAED,UAAiB,IAAI,CAAC;QACpB;;WAEG;QACH,UAAiB,QAAQ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jF"}
@@ -22,36 +22,56 @@ export namespace FetchResponse {
22
22
  */
23
23
  response: Data.Response;
24
24
 
25
- appendix?: unknown;
25
+ /**
26
+ * Extracted links and sidebar content
27
+ */
28
+ appendix?: string;
26
29
 
27
30
  /**
28
31
  * Unique identifier for the browser session that performed this fetch
29
32
  */
30
33
  browserSessionId?: string;
31
34
 
32
- html?: unknown;
35
+ /**
36
+ * The HTML content of the fetched page
37
+ */
38
+ html?: string;
33
39
 
34
40
  /**
35
41
  * Pruned JSON objects extracted from the page (from HTML and network responses).
36
42
  * This is recomputed on every fetch and is not persisted.
37
43
  */
38
- json?: unknown;
44
+ json?: Array<{ [key: string]: string | number | boolean | unknown }>;
39
45
 
40
- links?: unknown;
46
+ /**
47
+ * Links extracted from the page
48
+ */
49
+ links?: Array<Data.Link>;
41
50
 
42
- markdown?: unknown;
51
+ /**
52
+ * The markdown-formatted content extracted from the page
53
+ */
54
+ markdown?: string;
43
55
 
44
56
  /**
45
- * Page metadata extracted from HTML head (title, description, Open Graph, Twitter
46
- * Card, icons)
57
+ * Comprehensive metadata extracted from the page HTML head section
47
58
  */
48
- meta?: unknown;
59
+ meta?: Data.Meta;
49
60
 
50
- screenshot?: unknown;
61
+ /**
62
+ * Base64-encoded data URI of the screenshot image
63
+ */
64
+ screenshot?: string;
51
65
 
52
- snippets?: unknown;
66
+ /**
67
+ * Relevant snippets extracted from the page based on the search query
68
+ */
69
+ snippets?: Array<Data.UnionMember0 | Data.UnionMember1>;
53
70
 
54
- summary?: unknown;
71
+ /**
72
+ * AI-generated summary of the page content
73
+ */
74
+ summary?: string;
55
75
  }
56
76
 
57
77
  export namespace Data {
@@ -75,6 +95,253 @@ export namespace FetchResponse {
75
95
  */
76
96
  headers?: { [key: string]: string };
77
97
  }
98
+
99
+ /**
100
+ * A link extracted from the page
101
+ */
102
+ export interface Link {
103
+ /**
104
+ * The URL of the link
105
+ */
106
+ url: string;
107
+
108
+ /**
109
+ * The anchor text of the link
110
+ */
111
+ text?: string;
112
+ }
113
+
114
+ /**
115
+ * Comprehensive metadata extracted from the page HTML head section
116
+ */
117
+ export interface Meta {
118
+ /**
119
+ * Canonical URL from <link rel="canonical">
120
+ */
121
+ canonicalUrl?: string;
122
+
123
+ /**
124
+ * Character encoding from <meta charset="...">
125
+ */
126
+ charset?: string;
127
+
128
+ /**
129
+ * Meta description from <meta name="description">
130
+ */
131
+ description?: string;
132
+
133
+ /**
134
+ * Primary favicon URL (first icon found)
135
+ */
136
+ favicon?: string;
137
+
138
+ /**
139
+ * All icon links (favicons, apple-touch-icons, etc.)
140
+ */
141
+ icons?: Array<Meta.Icon>;
142
+
143
+ /**
144
+ * Page language from <html lang="...">
145
+ */
146
+ language?: string;
147
+
148
+ /**
149
+ * Open Graph protocol metadata for rich link previews
150
+ */
151
+ openGraph?: Meta.OpenGraph;
152
+
153
+ /**
154
+ * Page title from <title> tag
155
+ */
156
+ title?: string;
157
+
158
+ /**
159
+ * Twitter Card metadata for social sharing previews
160
+ */
161
+ twitter?: Meta.Twitter;
162
+ }
163
+
164
+ export namespace Meta {
165
+ /**
166
+ * Favicon or app icon metadata from <link> tags
167
+ */
168
+ export interface Icon {
169
+ /**
170
+ * Icon URL or path
171
+ */
172
+ href: string;
173
+
174
+ /**
175
+ * Link relationship type
176
+ */
177
+ rel: string;
178
+
179
+ /**
180
+ * Icon dimensions
181
+ */
182
+ sizes?: string;
183
+
184
+ /**
185
+ * MIME type of the icon
186
+ */
187
+ type?: string;
188
+ }
189
+
190
+ /**
191
+ * Open Graph protocol metadata for rich link previews
192
+ */
193
+ export interface OpenGraph {
194
+ /**
195
+ * Open Graph description (og:description)
196
+ */
197
+ description?: string;
198
+
199
+ /**
200
+ * Open Graph images (og:image and related properties)
201
+ */
202
+ images?: Array<OpenGraph.Image>;
203
+
204
+ /**
205
+ * Locale in language_TERRITORY format (og:locale)
206
+ */
207
+ locale?: string;
208
+
209
+ /**
210
+ * Site name (og:site_name)
211
+ */
212
+ siteName?: string;
213
+
214
+ /**
215
+ * Open Graph title (og:title)
216
+ */
217
+ title?: string;
218
+
219
+ /**
220
+ * Open Graph type (og:type) - website, article, product, etc.
221
+ */
222
+ type?: string;
223
+
224
+ /**
225
+ * Canonical URL for the content (og:url)
226
+ */
227
+ url?: string;
228
+ }
229
+
230
+ export namespace OpenGraph {
231
+ /**
232
+ * Open Graph image with optional dimensions and alt text
233
+ */
234
+ export interface Image {
235
+ /**
236
+ * Image URL
237
+ */
238
+ url: string;
239
+
240
+ /**
241
+ * Image alt text for accessibility
242
+ */
243
+ alt?: string;
244
+
245
+ /**
246
+ * Image height in pixels
247
+ */
248
+ height?: number;
249
+
250
+ /**
251
+ * Image width in pixels
252
+ */
253
+ width?: number;
254
+ }
255
+ }
256
+
257
+ /**
258
+ * Twitter Card metadata for social sharing previews
259
+ */
260
+ export interface Twitter {
261
+ /**
262
+ * Twitter card type (twitter:card)
263
+ */
264
+ card?: string;
265
+
266
+ /**
267
+ * Twitter @username of content creator (twitter:creator)
268
+ */
269
+ creator?: string;
270
+
271
+ /**
272
+ * Description for Twitter card (twitter:description)
273
+ */
274
+ description?: string;
275
+
276
+ /**
277
+ * Image URL for Twitter card (twitter:image)
278
+ */
279
+ image?: string;
280
+
281
+ /**
282
+ * Twitter @username of the website (twitter:site)
283
+ */
284
+ site?: string;
285
+
286
+ /**
287
+ * Title for Twitter card (twitter:title)
288
+ */
289
+ title?: string;
290
+ }
291
+ }
292
+
293
+ export interface UnionMember0 {
294
+ _tag: 'MarkdownSnippet';
295
+
296
+ /**
297
+ * Original chunk index
298
+ */
299
+ index: number;
300
+
301
+ /**
302
+ * Relevance score from the reranker (0-1)
303
+ */
304
+ score: number;
305
+
306
+ /**
307
+ * The text content of the snippet
308
+ */
309
+ text: string;
310
+
311
+ /**
312
+ * Type identifier for TextPart compatibility
313
+ */
314
+ type?: 'text';
315
+ }
316
+
317
+ export interface UnionMember1 {
318
+ _tag: 'JsonSnippet';
319
+
320
+ /**
321
+ * Original chunk index
322
+ */
323
+ index: number;
324
+
325
+ /**
326
+ * The structured JSON subtree value
327
+ */
328
+ json: unknown;
329
+
330
+ /**
331
+ * Relevance score from the reranker (0-1)
332
+ */
333
+ score: number;
334
+
335
+ /**
336
+ * Pretty-printed JSON chunk text
337
+ */
338
+ text: string;
339
+
340
+ /**
341
+ * Type identifier for TextPart compatibility
342
+ */
343
+ type?: 'text';
344
+ }
78
345
  }
79
346
  }
80
347
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.14.0'; // x-release-please-version
1
+ export const VERSION = '0.16.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.14.0";
1
+ export declare const VERSION = "0.16.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.14.0";
1
+ export declare const VERSION = "0.16.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.14.0'; // x-release-please-version
4
+ exports.VERSION = '0.16.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.14.0'; // x-release-please-version
1
+ export const VERSION = '0.16.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map