@microsoft/webiq 0.1.7 → 0.1.8

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/dist/index.d.mts CHANGED
@@ -89,21 +89,38 @@ declare enum SafeSearch {
89
89
  STRICT = "strict"
90
90
  }
91
91
 
92
+ type WebQuerySignals = {
93
+ /**
94
+ * Indicates whether fresh documents should be prioritized over other documents for this query.
95
+ */
96
+ freshness?: boolean | null;
97
+ };
98
+
92
99
  declare enum ContentTier {
93
100
  STANDARD = "standard",
94
101
  ENTITLED = "entitled",
95
102
  PREMIUM = "premium"
96
103
  }
97
104
 
105
+ declare enum SourceQuality {
106
+ INSUFFICIENT = "insufficient",
107
+ ADEQUATE = "adequate",
108
+ PREFERRED = "preferred"
109
+ }
110
+
98
111
  type WebResult = {
99
112
  /**
100
113
  * The title of the webpage.
101
114
  */
102
115
  title?: string | null;
103
116
  /**
104
- * The source URL of the webpage.
117
+ * The source URL of the webpage. For China users with URL redirection enabled, this field instead contains the same redirect URL as clickUrl.
105
118
  */
106
119
  url?: string | null;
120
+ /**
121
+ * The destination host for the result. Returned only for China users with URL redirection enabled.
122
+ */
123
+ domain?: string | null;
107
124
  /**
108
125
  * The detailed content of the webpage.
109
126
  */
@@ -125,6 +142,7 @@ type WebResult = {
125
142
  */
126
143
  isAdult?: boolean;
127
144
  contentTier?: ContentTier;
145
+ sourceQuality?: SourceQuality;
128
146
  /**
129
147
  * Redirect URL that proxies through Bing. Only present when redirect is enabled.
130
148
  */
@@ -140,6 +158,7 @@ type WebResponse = {
140
158
  * List of web page results.
141
159
  */
142
160
  webResults?: Array<WebResult> | null;
161
+ querySignals?: WebQuerySignals;
143
162
  /**
144
163
  * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
145
164
  */
@@ -228,9 +247,13 @@ type NewsItem = {
228
247
  */
229
248
  title?: string | null;
230
249
  /**
231
- * The source URL of the news.
250
+ * The source URL of the news article. For China users with URL redirection enabled, this field instead contains the same redirect URL as clickUrl.
232
251
  */
233
252
  url?: string | null;
253
+ /**
254
+ * The destination host for the result. Returned only for China users with URL redirection enabled.
255
+ */
256
+ domain?: string | null;
234
257
  /**
235
258
  * The detailed content of the news.
236
259
  */
@@ -244,6 +267,10 @@ type NewsItem = {
244
267
  * The last crawled date of the news, follows ISO8601 format.
245
268
  */
246
269
  crawledAt?: string | null;
270
+ /**
271
+ * The language of the news article, uses ISO 639-1 language code.
272
+ */
273
+ language?: string | null;
247
274
  /**
248
275
  * Publisher name, such as 'USA TODAY | MSN', 'CNN', etc.
249
276
  */
@@ -398,9 +425,13 @@ type VideoItem = {
398
425
  */
399
426
  title?: string | null;
400
427
  /**
401
- * The video source URL.
428
+ * The source URL of the video. For China users with URL redirection enabled, this field instead contains the same redirect URL as clickUrl.
402
429
  */
403
430
  url?: string | null;
431
+ /**
432
+ * The destination host for the result. Returned only for China users with URL redirection enabled.
433
+ */
434
+ domain?: string | null;
404
435
  /**
405
436
  * Description of the video content. This is either given by video uploader or generated by LLM
406
437
  */
@@ -569,9 +600,13 @@ type ImageItem = {
569
600
  */
570
601
  title?: string | null;
571
602
  /**
572
- * The source URL of the image.
603
+ * The source URL of the image. For China users with URL redirection enabled, this field instead contains the same redirect URL as clickUrl.
573
604
  */
574
605
  url?: string | null;
606
+ /**
607
+ * The destination host for the result. Returned only for China users with URL redirection enabled.
608
+ */
609
+ domain?: string | null;
575
610
  /**
576
611
  * The host page URL of the image.
577
612
  */
@@ -1253,4 +1288,4 @@ declare class HttpTransport implements Transport {
1253
1288
  close(): Promise<void>;
1254
1289
  }
1255
1290
 
1256
- export { APIConnectionError, APIStatusError, type ApiErrorResponse, ApiKeyAuth, type AuthProvider, AuthenticationError, BrowseContentFormat, type BrowseFetchOptions, type BrowseParams, type BrowseRequest, BrowseResource, type BrowseResponse, ContentFormat, ContentTier, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, type FetchFunction, HttpTransport, type HttpTransportOptions, ImageAspectRatio, ImageColor, type ImageItem, type ImageSearchOptions, ImageSize, type ImagesRequest, ImagesResource, type ImagesResponse, type ImagesSearchParams, LiveCrawlMode, type NewsItem, type NewsRequest, NewsResource, type NewsResponse, type NewsSearchOptions, type NewsSearchParams, type NewsThumbnail, PermissionDeniedError, type PlaylistItem, type PlaylistVideo, RateLimitError, RetryPolicy, type RetryPolicyOptions, SafeSearch, type TelemetryEvent, type TelemetryHook, type TokenCredential, type Transport, type TransportRequestOptions, VideoDuration, type VideoItem, type VideoMoment, VideoResolution, type VideoSearchOptions, type VideosRequest, VideosResource, type VideosResponse, type VideosSearchParams, WebIQClient, type WebIQClientOptions, WebIQError, type WebRequest, WebResource, type WebResponse, type WebResult, type WebSearchOptions, type WebSearchParams, createAuth, createClient, createTelemetryEvent, safeCall };
1291
+ export { APIConnectionError, APIStatusError, type ApiErrorResponse, ApiKeyAuth, type AuthProvider, AuthenticationError, BrowseContentFormat, type BrowseFetchOptions, type BrowseParams, type BrowseRequest, BrowseResource, type BrowseResponse, ContentFormat, ContentTier, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, type FetchFunction, HttpTransport, type HttpTransportOptions, ImageAspectRatio, ImageColor, type ImageItem, type ImageSearchOptions, ImageSize, type ImagesRequest, ImagesResource, type ImagesResponse, type ImagesSearchParams, LiveCrawlMode, type NewsItem, type NewsRequest, NewsResource, type NewsResponse, type NewsSearchOptions, type NewsSearchParams, type NewsThumbnail, PermissionDeniedError, type PlaylistItem, type PlaylistVideo, RateLimitError, RetryPolicy, type RetryPolicyOptions, SafeSearch, SourceQuality, type TelemetryEvent, type TelemetryHook, type TokenCredential, type Transport, type TransportRequestOptions, VideoDuration, type VideoItem, type VideoMoment, VideoResolution, type VideoSearchOptions, type VideosRequest, VideosResource, type VideosResponse, type VideosSearchParams, WebIQClient, type WebIQClientOptions, WebIQError, type WebQuerySignals, type WebRequest, WebResource, type WebResponse, type WebResult, type WebSearchOptions, type WebSearchParams, createAuth, createClient, createTelemetryEvent, safeCall };
package/dist/index.d.ts CHANGED
@@ -89,21 +89,38 @@ declare enum SafeSearch {
89
89
  STRICT = "strict"
90
90
  }
91
91
 
92
+ type WebQuerySignals = {
93
+ /**
94
+ * Indicates whether fresh documents should be prioritized over other documents for this query.
95
+ */
96
+ freshness?: boolean | null;
97
+ };
98
+
92
99
  declare enum ContentTier {
93
100
  STANDARD = "standard",
94
101
  ENTITLED = "entitled",
95
102
  PREMIUM = "premium"
96
103
  }
97
104
 
105
+ declare enum SourceQuality {
106
+ INSUFFICIENT = "insufficient",
107
+ ADEQUATE = "adequate",
108
+ PREFERRED = "preferred"
109
+ }
110
+
98
111
  type WebResult = {
99
112
  /**
100
113
  * The title of the webpage.
101
114
  */
102
115
  title?: string | null;
103
116
  /**
104
- * The source URL of the webpage.
117
+ * The source URL of the webpage. For China users with URL redirection enabled, this field instead contains the same redirect URL as clickUrl.
105
118
  */
106
119
  url?: string | null;
120
+ /**
121
+ * The destination host for the result. Returned only for China users with URL redirection enabled.
122
+ */
123
+ domain?: string | null;
107
124
  /**
108
125
  * The detailed content of the webpage.
109
126
  */
@@ -125,6 +142,7 @@ type WebResult = {
125
142
  */
126
143
  isAdult?: boolean;
127
144
  contentTier?: ContentTier;
145
+ sourceQuality?: SourceQuality;
128
146
  /**
129
147
  * Redirect URL that proxies through Bing. Only present when redirect is enabled.
130
148
  */
@@ -140,6 +158,7 @@ type WebResponse = {
140
158
  * List of web page results.
141
159
  */
142
160
  webResults?: Array<WebResult> | null;
161
+ querySignals?: WebQuerySignals;
143
162
  /**
144
163
  * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
145
164
  */
@@ -228,9 +247,13 @@ type NewsItem = {
228
247
  */
229
248
  title?: string | null;
230
249
  /**
231
- * The source URL of the news.
250
+ * The source URL of the news article. For China users with URL redirection enabled, this field instead contains the same redirect URL as clickUrl.
232
251
  */
233
252
  url?: string | null;
253
+ /**
254
+ * The destination host for the result. Returned only for China users with URL redirection enabled.
255
+ */
256
+ domain?: string | null;
234
257
  /**
235
258
  * The detailed content of the news.
236
259
  */
@@ -244,6 +267,10 @@ type NewsItem = {
244
267
  * The last crawled date of the news, follows ISO8601 format.
245
268
  */
246
269
  crawledAt?: string | null;
270
+ /**
271
+ * The language of the news article, uses ISO 639-1 language code.
272
+ */
273
+ language?: string | null;
247
274
  /**
248
275
  * Publisher name, such as 'USA TODAY | MSN', 'CNN', etc.
249
276
  */
@@ -398,9 +425,13 @@ type VideoItem = {
398
425
  */
399
426
  title?: string | null;
400
427
  /**
401
- * The video source URL.
428
+ * The source URL of the video. For China users with URL redirection enabled, this field instead contains the same redirect URL as clickUrl.
402
429
  */
403
430
  url?: string | null;
431
+ /**
432
+ * The destination host for the result. Returned only for China users with URL redirection enabled.
433
+ */
434
+ domain?: string | null;
404
435
  /**
405
436
  * Description of the video content. This is either given by video uploader or generated by LLM
406
437
  */
@@ -569,9 +600,13 @@ type ImageItem = {
569
600
  */
570
601
  title?: string | null;
571
602
  /**
572
- * The source URL of the image.
603
+ * The source URL of the image. For China users with URL redirection enabled, this field instead contains the same redirect URL as clickUrl.
573
604
  */
574
605
  url?: string | null;
606
+ /**
607
+ * The destination host for the result. Returned only for China users with URL redirection enabled.
608
+ */
609
+ domain?: string | null;
575
610
  /**
576
611
  * The host page URL of the image.
577
612
  */
@@ -1253,4 +1288,4 @@ declare class HttpTransport implements Transport {
1253
1288
  close(): Promise<void>;
1254
1289
  }
1255
1290
 
1256
- export { APIConnectionError, APIStatusError, type ApiErrorResponse, ApiKeyAuth, type AuthProvider, AuthenticationError, BrowseContentFormat, type BrowseFetchOptions, type BrowseParams, type BrowseRequest, BrowseResource, type BrowseResponse, ContentFormat, ContentTier, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, type FetchFunction, HttpTransport, type HttpTransportOptions, ImageAspectRatio, ImageColor, type ImageItem, type ImageSearchOptions, ImageSize, type ImagesRequest, ImagesResource, type ImagesResponse, type ImagesSearchParams, LiveCrawlMode, type NewsItem, type NewsRequest, NewsResource, type NewsResponse, type NewsSearchOptions, type NewsSearchParams, type NewsThumbnail, PermissionDeniedError, type PlaylistItem, type PlaylistVideo, RateLimitError, RetryPolicy, type RetryPolicyOptions, SafeSearch, type TelemetryEvent, type TelemetryHook, type TokenCredential, type Transport, type TransportRequestOptions, VideoDuration, type VideoItem, type VideoMoment, VideoResolution, type VideoSearchOptions, type VideosRequest, VideosResource, type VideosResponse, type VideosSearchParams, WebIQClient, type WebIQClientOptions, WebIQError, type WebRequest, WebResource, type WebResponse, type WebResult, type WebSearchOptions, type WebSearchParams, createAuth, createClient, createTelemetryEvent, safeCall };
1291
+ export { APIConnectionError, APIStatusError, type ApiErrorResponse, ApiKeyAuth, type AuthProvider, AuthenticationError, BrowseContentFormat, type BrowseFetchOptions, type BrowseParams, type BrowseRequest, BrowseResource, type BrowseResponse, ContentFormat, ContentTier, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, type FetchFunction, HttpTransport, type HttpTransportOptions, ImageAspectRatio, ImageColor, type ImageItem, type ImageSearchOptions, ImageSize, type ImagesRequest, ImagesResource, type ImagesResponse, type ImagesSearchParams, LiveCrawlMode, type NewsItem, type NewsRequest, NewsResource, type NewsResponse, type NewsSearchOptions, type NewsSearchParams, type NewsThumbnail, PermissionDeniedError, type PlaylistItem, type PlaylistVideo, RateLimitError, RetryPolicy, type RetryPolicyOptions, SafeSearch, SourceQuality, type TelemetryEvent, type TelemetryHook, type TokenCredential, type Transport, type TransportRequestOptions, VideoDuration, type VideoItem, type VideoMoment, VideoResolution, type VideoSearchOptions, type VideosRequest, VideosResource, type VideosResponse, type VideosSearchParams, WebIQClient, type WebIQClientOptions, WebIQError, type WebQuerySignals, type WebRequest, WebResource, type WebResponse, type WebResult, type WebSearchOptions, type WebSearchParams, createAuth, createClient, createTelemetryEvent, safeCall };
package/dist/index.js CHANGED
@@ -726,6 +726,14 @@ var SafeSearch = /* @__PURE__ */ ((SafeSearch2) => {
726
726
  return SafeSearch2;
727
727
  })(SafeSearch || {});
728
728
 
729
+ // src/generated-otc/models/SourceQuality.ts
730
+ var SourceQuality = /* @__PURE__ */ ((SourceQuality2) => {
731
+ SourceQuality2["INSUFFICIENT"] = "insufficient";
732
+ SourceQuality2["ADEQUATE"] = "adequate";
733
+ SourceQuality2["PREFERRED"] = "preferred";
734
+ return SourceQuality2;
735
+ })(SourceQuality || {});
736
+
729
737
  // src/generated-otc/models/VideoDuration.ts
730
738
  var VideoDuration = /* @__PURE__ */ ((VideoDuration2) => {
731
739
  VideoDuration2["SHORT"] = "short";
@@ -765,6 +773,7 @@ exports.PermissionDeniedError = PermissionDeniedError;
765
773
  exports.RateLimitError = RateLimitError;
766
774
  exports.RetryPolicy = RetryPolicy;
767
775
  exports.SafeSearch = SafeSearch;
776
+ exports.SourceQuality = SourceQuality;
768
777
  exports.VideoDuration = VideoDuration;
769
778
  exports.VideoResolution = VideoResolution;
770
779
  exports.VideosResource = VideosResource;
package/dist/index.mjs CHANGED
@@ -724,6 +724,14 @@ var SafeSearch = /* @__PURE__ */ ((SafeSearch2) => {
724
724
  return SafeSearch2;
725
725
  })(SafeSearch || {});
726
726
 
727
+ // src/generated-otc/models/SourceQuality.ts
728
+ var SourceQuality = /* @__PURE__ */ ((SourceQuality2) => {
729
+ SourceQuality2["INSUFFICIENT"] = "insufficient";
730
+ SourceQuality2["ADEQUATE"] = "adequate";
731
+ SourceQuality2["PREFERRED"] = "preferred";
732
+ return SourceQuality2;
733
+ })(SourceQuality || {});
734
+
727
735
  // src/generated-otc/models/VideoDuration.ts
728
736
  var VideoDuration = /* @__PURE__ */ ((VideoDuration2) => {
729
737
  VideoDuration2["SHORT"] = "short";
@@ -741,4 +749,4 @@ var VideoResolution = /* @__PURE__ */ ((VideoResolution2) => {
741
749
  return VideoResolution2;
742
750
  })(VideoResolution || {});
743
751
 
744
- export { APIConnectionError, APIStatusError, ApiKeyAuth, AuthenticationError, BrowseContentFormat, BrowseResource, ContentFormat, ContentTier, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, HttpTransport, ImageAspectRatio, ImageColor, ImageSize, ImagesResource, LiveCrawlMode, NewsResource, PermissionDeniedError, RateLimitError, RetryPolicy, SafeSearch, VideoDuration, VideoResolution, VideosResource, WebIQClient, WebIQError, WebResource, createAuth, createClient, createTelemetryEvent, safeCall };
752
+ export { APIConnectionError, APIStatusError, ApiKeyAuth, AuthenticationError, BrowseContentFormat, BrowseResource, ContentFormat, ContentTier, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, HttpTransport, ImageAspectRatio, ImageColor, ImageSize, ImagesResource, LiveCrawlMode, NewsResource, PermissionDeniedError, RateLimitError, RetryPolicy, SafeSearch, SourceQuality, VideoDuration, VideoResolution, VideosResource, WebIQClient, WebIQError, WebResource, createAuth, createClient, createTelemetryEvent, safeCall };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/webiq",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Web IQ API TypeScript SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -19,8 +19,8 @@
19
19
  "scripts": {
20
20
  "build": "tsup",
21
21
  "dev": "tsup --watch",
22
- "lint": "eslint src --ext .ts",
23
- "lint:fix": "eslint src --ext .ts --fix",
22
+ "lint": "eslint src",
23
+ "lint:fix": "eslint src --fix",
24
24
  "format": "prettier --write \"src/**/*.ts\" \"*.md\" \"*.json\" --ignore-path ../../.prettierignore",
25
25
  "format:check": "prettier --check \"src/**/*.ts\" \"*.md\" \"*.json\" --ignore-path ../../.prettierignore",
26
26
  "typecheck": "tsc --noEmit",
@@ -36,7 +36,7 @@
36
36
  "author": "Microsoft <webiqsdk@microsoft.com>",
37
37
  "license": "MIT",
38
38
  "engines": {
39
- "node": ">=22",
39
+ "node": "^22.13.0 || >=24",
40
40
  "npm": ">=10"
41
41
  },
42
42
  "publishConfig": {
@@ -45,9 +45,10 @@
45
45
  "sideEffects": false,
46
46
  "devDependencies": {
47
47
  "@azure/identity": ">=4.13.1",
48
+ "@eslint/js": "^10.0.1",
48
49
  "@types/js-yaml": "^4.0.9",
49
50
  "@types/node": "^20.10.0",
50
- "eslint": "^8.56.0",
51
+ "eslint": "^10.8.0",
51
52
  "js-yaml": "^5.2.0",
52
53
  "openapi-typescript-codegen": "^0.30.0",
53
54
  "prettier": "^3.5.3",
@@ -55,6 +56,7 @@
55
56
  "tsup": "^8.0.0",
56
57
  "tsx": "^4.21.0",
57
58
  "typescript": "^5.3.0",
59
+ "typescript-eslint": "^8.68.0",
58
60
  "vitest": "^4.0.18"
59
61
  },
60
62
  "peerDependencies": {